Commit graph

7120 commits

Author SHA1 Message Date
Paul Kehrer
ed5a7717a5 changelog and version bump (#4030) 2017-11-29 08:20:48 -05:00
Paul Kehrer
e85fceec5a Backport x509_up_ref (#4029)
* pytest 3.3.0 has an issue with parametrized null bytes again (#4026)

* add X509_up_ref (#4028)
2017-11-29 07:42:44 -05:00
Paul Kehrer
2219ea7609 changelog and version bump for 2.1.3 (#4007)
* changelog and version bump for 2.1.3

* buster is 3.6 now (#4003)

* Fix a few new flake8 issues (#4008)
2017-11-02 13:57:52 -04:00
Alex Gaynor
106de1cb97 Bump version for 2.1.2 release (#3997)
* Bump version for 2.1.2 release

* rolling has 36 now that it is artful (#3991)

* Latest flake8 has some rules about variable names (#3996)
2017-10-24 10:32:21 -05:00
Alex Gaynor
85fa6ce5b2 Bumped version for release (#3974)
* Bumped version for release

* attempt to be precise
2017-10-12 12:38:11 +08:00
Alex Gaynor
785ebd8400 random hack to maybe support older pips (#3970) (#3973) 2017-10-12 12:35:07 +08:00
Alex Gaynor
78ae67cff4 Debian sid is python3.6 now (#3968) (#3972)
* Debian sid is python3.6 now

* Workaround because apparently measuring coverage correctly isn't a legitimate use case
2017-10-12 11:37:11 +08:00
Paul Kehrer
0ed0e7e87b update changelog release date and bump version for 2.1 release (#3958) 2017-10-11 08:31:09 -04:00
Paul Kehrer
e885bd65a8 Update docs and changelog for URI, RFC822Name, and DNSName (#3955)
* Update docs and changelog for URI, RFC822Name, and DNSName

As of 2.1 we want users to pass A-label strings, but we still accept
U-label strings and auto-encode on their behalf (with a deprecation
warning). However, we do not return U-label in the value attribute so
we are making a backwards incompatible change for users that utilize
internationalized domain names.

* language updates

* add presentational to the word list

* the linux dictionary is pathetic
2017-10-11 08:29:23 -04:00
Paul Kehrer
1aac78c4d0 let's talk about bits baby (#3956) 2017-10-11 07:49:57 -04:00
Paul Kehrer
a3facfae09 parallelize docs work and always give full traceback on exception (#3957)
In local testing this didn't seem to gain much, but it also doesn't hurt
so what the hell.
2017-10-11 07:49:27 -04:00
Paul Kehrer
1b43b51599 backwards incompatible change to UniformResourceIdentifier (#3954)
* backwards incompatible change to UniformResourceIdentifier

During this release cycle we decided to officially deprecate passing
U-labels to our GeneralName constructors. At first we tried changing
this in a purely backwards compatible way but get_values_for_type made
that untenable. This PR modifies URI to accept two types:
U-label strings (which raises a deprecation warning) and A-label strings
(the new preferred type). There is also a constructor for URI
that bypasses validation so we can parse garbage out of certificates
(and round trip it if necessary)

* nonsense empty commit 2.6 and codecov are the worst
2017-10-10 23:47:46 -04:00
Paul Kehrer
d3f73e0de5 backwards incompatible change to RFC822Name (#3953)
* backwards incompatible change to RFC822Name

During this release cycle we decided to officially deprecate passing
U-labels to our GeneralName constructors. At first we tried changing
this in a purely backwards compatible way but get_values_for_type made
that untenable. This PR modifies RFC822Name to accept two types:
U-label strings (which raises a deprecation warning) and A-label strings
(the new preferred type). There is also a constructor for RFC822Name
that bypasses validation so we can parse garbage out of certificates
(and round trip it if necessary)

* whoops
2017-10-10 21:48:40 -04:00
Paul Kehrer
ed32105be8 Backwards incompatible change to DNSName (#3951)
* Backwards incompatible change to DNSName

During this release cycle we decided to officially deprecate passing
U-labels to our GeneralName constructors. At first we tried changing
this in a purely backwards compatible way but get_values_for_type made
that untenable. This PR modifies DNSName to take three different types.
U-label strings (which raises a deprecation warning), A-label strings
(the new preferred type), and bytes (which are assumed to be decodable
to unicode strings). The latter, while supported, is primarily intended
for use by our parser and allows us to return the actual encoded data in
a certificate even if it has not been properly encoded to A-label before
the certificate is created. (Of course, if the certificate contains
invalid utf8 sequences this will still fail, but let's handle one
catastrophic failure at a time).

* coverage

* don't delete that asterisk from a test. it does things.

* no bytes in DNSName. Private constructor for bypassing validation

* test unicode in dnsname (yuck)

* fix docs

* empty commit, you disappoint me codecov

* CI is the worst
2017-10-10 20:11:44 -04:00
Paul Kehrer
003f56fbd7 add utf8 DNSName x509 vector (#3952) 2017-10-09 22:23:24 -04:00
Alex Gaynor
56669aae2a update security docs to indicate we staticaly link openssl on linux too (#3949)
* update security docs to indicate we staticaly link openssl there too

* spelling
2017-10-05 09:25:55 +08:00
Paul Kehrer
3d96afd798 do downstream builds as part of our normal parallel jenkins pipeline (#3948)
* do downstream builds as part of our normal parallel jenkins pipeline

* empty
2017-10-03 22:53:18 -04:00
Paul Kehrer
fce63a57b4 disable smart quotes in sphinx to workaround a spellchecker issue (#3946)
This makes it so we don't have to pin sphinx while we wait for
sphinxcontrib-spelling to properly handle smart quotes
2017-10-03 21:16:50 -04:00
Paul Kehrer
a397d75a1e Add support for AES XTS (#3900)
* Add support for AES XTS

We drop the non-byte aligned test vectors because according to NIST
http://csrc.nist.gov/groups/STM/cavp/documents/aes/XTSVS.pdf
"An implementation may support a data unit length that is not a
multiple of 8 bits." OpenSSL does not support this, so we can't
use those test vectors.

* fix docs and pep8

* docs fix

* the spellchecker is so frustrating

* add note about AES 192 for XTS (it's not supported)

* docs work

* enforce key length on ECB mode in AES as well (thanks XTS)

* a few more words about why we exclude some test vectors for XTS
2017-10-01 22:03:20 -04:00
Alex Gaynor
dd567cbf73 Declare that 2.1 is the last version to support Python 2.6 (#3944)
* Declare that 2.1 is the last version to support Python 2.6

* It's the Final Countdown!
2017-10-01 09:22:07 +08:00
Paul Kehrer
62ebb429fe add ChaCha20 support (#3919)
* add ChaCha20 support

* review feedback

* 256 divided by 8 is what again?

* ...
2017-09-28 11:46:49 -04:00
Scott Sturdivant
ba61c2738e Expose FIPS funcs for OpenSSL. (#3939)
* Expose FIPS funcs for OpenSSL.

* Remove FIPS customization / conditionals.

It seems that the FIPS functions are always defined, regardless of if
the FIPS module is present.

* Do not include FIPS_selftest_check func.

* Libressl does not have FIPS.
2017-09-27 09:29:55 +08:00
Alex Gaynor
e6859232d4 Update the list of macOS versions we test on to match reality (#3942) 2017-09-27 08:03:53 +08:00
Paul Kehrer
72c92f5ed1 both parse and encode the ASN1 string type for Name attributes (#3896)
* both parse and encode the ASN1 string type for Name attributes

Previously cryptography encoded everything (except country names) as
UTF8String. This caused problems with chain building in libraries like
NSS where the subject and issuer are expected to match byte-for-byte.

With this change we now parse and store the ASN1 string type as a
private _type in NameAttribute. We then use this to encode when issuing
a new certificate. This allows the CertificateBuilder to properly
construct an identical issuer and fixes the issue with NSS.

* make the sentinel private too
2017-09-25 22:23:24 -04:00
Alex Gaynor
7bb0210ef9 blacklist yet another version of sphinx (#3940) 2017-09-26 09:52:04 +08:00
Paul Kehrer
b76bcf88bd FreshestCRL extension support (#3937)
* add freshest CRL support

* add tests

* add changelog

* add tests for FreshestCRL generation
2017-09-23 20:44:12 -04:00
Paul Kehrer
5e3cc98473 support delta crl indicator extension (#3936)
This is an extension for CRLs
2017-09-22 09:29:36 -04:00
Paul Kehrer
2fc5849960 refactor rsa signature/verification logic to remove duplication (#3903) 2017-09-21 22:10:33 -04:00
Paul Kehrer
2931b86094 parametrize a bunch of x509 extension tests that were identical (#3931) 2017-09-21 22:07:10 -04:00
Paul Kehrer
1b86dc527d docs for what bytes means for DNSName, URI, and RFC822Name (#3904) 2017-09-20 11:42:34 -04:00
Paul Kehrer
d02842b03b add Freshest CRL and Delta CRL Indicator test vectors (#3932) 2017-09-20 11:40:05 -04:00
Alex Gaynor
b5c5bbe478 Mark our custom sphinx extension as parallel safe (#3935) 2017-09-20 22:14:56 +08:00
Paul Kehrer
ce4d0845f5 correct the docs for CRLReason (#3930) 2017-09-20 10:14:26 -04:00
Alex Gaynor
53e4505861 Switch NIST PDFs from nvlpubs to csrc which is HTTPS (#3929) 2017-09-20 21:57:47 +08:00
Paul Kehrer
90375552fa disable travis mac builders and add a mac jenkins build (#3933)
we'll re-enable mac builders when travis recovers and remove the jenkins
build
2017-09-20 08:49:03 -04:00
Alex Gaynor
20721c9ad9 Update the rest of the NIST urls to their new HTTPS homes (#3928) 2017-09-20 16:39:45 +08:00
Paul Kehrer
ba7041596e add unique identifier test vector (#3925)
* add unique identifier test vector

* wrap a line I didn't even touch...
2017-09-19 20:03:11 -04:00
Paul Kehrer
872cdea547 remove py26 windows and macOS wheels (#3921)
The wheel package is starting to drop support and download counts for them represent less than .02% of downloads for the month.
2017-09-19 20:03:02 -04:00
Alex Gaynor
8cb1d36690 Update PKITS link (#3923) 2017-09-20 06:46:21 +08:00
Alex Gaynor
e3fc93af73 Update NIST CAVP url (#3922) 2017-09-19 13:28:53 +08:00
Alex Gaynor
b522324c43 bump libressl version (#3920) 2017-09-15 14:37:39 +08:00
Paul Kehrer
d8371a8290 add chacha20 test vectors from RFC 7539 (#3918) 2017-09-14 08:38:40 -04:00
Paul Kehrer
409a0c8d66 implement __hash__ on DistributionPoint and CRLDistributionPoints (#3915) 2017-09-13 23:15:58 -04:00
Paul Kehrer
5e9eeefe20 add __hash__ to GeneralNames, SAN, IAN, and CertificateIssuer (#3916) 2017-09-13 23:15:21 -04:00
Paul Kehrer
83bb406138 add __hash__ to PolicyConstraints and Extension (#3917) 2017-09-13 23:14:28 -04:00
Paul Kehrer
7b6be923e2 implement __hash__ on KeyUsage and ExtendedKeyUsage (#3913)
* implement __hash__ on KeyUsage and ExtendedKeyUsage

* properly use private values and alter test to catch that bug
2017-09-13 19:43:07 -04:00
Paul Kehrer
ab96a53bc9 implement __hash__ on CertificatePolicies and its child classes (#3914) 2017-09-13 19:42:33 -04:00
Paul Kehrer
979c26303f add aki hash (#3910)
* Implement __hash__ on AuthorityKeyIdentifier

* Adding dirname to fix build issue on AuthorityKeyIdentifier test

* .authority_cert_issuer to str

* use a tuple and not a str repr
2017-09-13 16:24:30 -04:00
Paul Kehrer
bdad051b99 name constraints __hash__ (#3912) 2017-09-13 16:24:20 -04:00
Paul Kehrer
54024493bd AIA hashing (#3911) 2017-09-13 13:55:31 -04:00