aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_x509.py
Commit message (Collapse)AuthorAgeFilesLines
* Don't raise an UnsupportedExtension for critical extensions. (#3550)Alex Gaynor2017-05-201-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | * Don't raise an UnsupportedExtension for critical extensions. Fixes #2903 Fixes #2901 Fixes #3325 * Don't link * Revert "Don't link" This reverts commit 4fe847f91d9dd45cdc28a4984c4e44aad62a5de6. * fix * Revert "Revert "Don't link"" This reverts commit 856031b5a1fbad04ac218fa94ebf37dcd402f3ed. * fix * Deprecate this * Better changelog entry
* Remove API deprecated in 1.6, clean up the legacy deprecations (#3468)Alex Gaynor2017-03-211-2/+2
| | | | | | * Remove API deprecated in 1.6, clean up the legacy deprecations * flake8, unused import
* replace pyasn1 with asn1crypto (#3361)Ofek Lev2017-02-081-14/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | * replace pyasn1 with asn1crypto * allow trailing bytes * fix x509 test * update CHANGELOG.rst * fix assert * make asn1crypto code more idiomatic * find tag * final clean-up * leave trailing byte logic unchanged * document dependency change * spelling * fix spelling
* Drop 1.0.0 (#3312)Alex Gaynor2016-12-131-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * delete the 1.0.0 support * drop the version check * drop the AES-CTR stuff * Update the example * openssl truncates for us now * delete unused test * unused imports * Remove a bunch of conditional bindings for NPN * no more 1.0.0 builders * libressl fix * update the docs * remove dead branches * oops * this is a word, damnit * spelling * try removing this * this test is not needed * unused import
* friendly error if you put a date too far in the future on windows (#3279)Paul Kehrer2016-12-051-0/+30
|
* Add a bytes method to get the DER ASN.1 encoding of an X509 name. (#3236)Paul Kehrer2016-11-131-0/+11
| | | | | | | | | | * Add a bytes method to get the DER ASN.1 encoding of an X509 name. This is useful for creating an OpenSSL style subject_name_hash (#3011) * add to backend interface and update multibackend * bytes -> public_bytes
* add alternate signature OID for RSA with SHA1 + test and vector (#3227)Paul Kehrer2016-11-111-0/+12
| | | | | | * add alternate signature OID for RSA with SHA1 + test and vector * mozilla is a proper noun leave me alone spellchecker
* Name: add support for multi-value RDNs (#3202)Fraser Tweedale2016-11-111-25/+59
| | | | | | | | Update the Name class to accept and internally store a list of RelativeDistinguishedName objects. Add the 'rdns' attribute to give access to the RDNs. Update ASN.1 routines to correctly decode and encode multi-value RDNs. Fixes: https://github.com/pyca/cryptography/issues/3199
* Make DistributionPoint relative_name a set of NameAttribute (#3210)Fraser Tweedale2016-11-071-1/+72
| | | | | | | | | | | * Add RelativeDistinguishedName class * Make relative_name a RelativeDistinguishedName DistributionPoint relative_name is currently a Name but RFC 5280 defines it as RelativeDistinguishedName, i.e. a non-empty SET OF name attributes. Change the DistributionPoint relative_name attribute to be a RelativeDistinguishedName.
* support encoding IPv4Network and IPv6Network, useful for NameConstraints (#3182)Paul Kehrer2016-10-011-6/+32
| | | | | | | | | | * support encoding IPv4Network and IPv6Network, useful for NameConstraints * add changelog entry * add more networks with full and no masking (/32, /128, /0) * parametrize the nc tests to fix coverage
* reduce a bit of duplication in x509 tests (#3183)Paul Kehrer2016-09-291-55/+29
|
* support random_serial_number in the CertificateBuilder (#3132)Paul Kehrer2016-09-031-0/+17
| | | | | | | | | | * support random_serial_number in the CertificateBuilder * turns out pytest's monkeypatch has an undo * random_serial_number now a function * just certs
* add support for signature_algorithm_oid to cert, CSR, and CRL (#3124)Paul Kehrer2016-08-311-1/+13
| | | | | | * add support for signature_algorithm_oid to cert, CSR, and CRL * refactor _SIG_OIDS_TO_HASH to use ObjectIdentifiers and use that
* fix an overindented line. not sure why our linters didn't catch this (#3123)Paul Kehrer2016-08-301-1/+1
|
* Allow passing iterators where collections are expected (#3078)Marti2016-08-261-0/+12
| | | | | | | | | | | | | | Iterators can only be enumerated once, breaking code like this in Python 3 for example: san = SubjectAlternativeName(map(DNSName, lst)) This is also a slight behavior change if the caller modifies the list after passing it to the constructor, because input lists are now copied. Which seems like a good thing. Also: * Name now checks that attributes elements are of type NameAttribute * NoticeReference now allows notice_numbers to be any iterable
* CertificateBuilder accepts aware datetimes for not_valid_after and ↵InvalidInterrupt2016-08-161-0/+50
| | | | | | | | | | | | | | | | | | | not_valid_before (#2920) * CertificateBuilder accepts aware datetimes for not_valid_after and not_valid_before These functions now accept aware datetimes and convert them to UTC * Added pytz to test requirements * Correct pep8 error and improve Changelog wording * Improve tests and clarify changelog message * Trim Changelog line length * Allow RevokedCertificateBuilder and CertificateRevocationListBuilder to accept aware datetimes * Fix accidental changelog entry
* Disallow X509 certificate serial numbers bigger than 159 bits (#3064) (#3067)Коренберг Марк2016-08-021-3/+46
|
* Use a series of constants for OpenSSL version checks (#3037)Alex Gaynor2016-07-111-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | * Use a series of constants for OpenSSL version checks. N.B. I removed several qualifiers that were being used to express beta vs. release in OpenSSL version numbers. Reviewers please look closely! * Convert some python as well, also add the file * flake8 * Simplify code, remove functionality that can be expressed more simply * clean up the tests as well * more constants * wrap long lines * reflect feedback * unused * add this back?
* Add alias for Certificate serial as serial number (#2950)Chelsea Winfree2016-06-021-5/+30
| | | | | | | | * Add alias for Certificate serial as serial number * Adding deprecation to utils * Now with catch warnings and proper vers
* Fixed #2747 -- allow creating x509 exts with unknown extensionsAlex Gaynor2016-03-141-0/+33
|
* support PolicyConstraints in the CertificateBuilderPaul Kehrer2016-03-131-0/+48
|
* Merge pull request #2670 from joernheissler/x509_req_verifyPaul Kehrer2016-03-061-0/+16
|\ | | | | Add verify method on CertificateSigningRequest
| * Change method to propertyJoern Heissler2016-01-181-7/+5
| |
| * Add verify method on CertificateSigningRequestJoern Heissler2016-01-131-1/+19
| |
* | raise ValueError if > 2 byte value for NameAttribute with CN OIDPaul Kehrer2016-03-061-0/+14
|/
* support unrecognized extensions in x509Paul Kehrer2015-12-301-1/+5
|
* move two tests to the openssl backend tests where they belongPaul Kehrer2015-12-261-51/+0
|
* add invaliditydate class for crl entry extensionsPaul Kehrer2015-12-261-3/+3
|
* switch CRLReason to use a classPaul Kehrer2015-12-261-5/+5
|
* start switching the CRL entry extensions to be full-fledged classesPaul Kehrer2015-12-251-7/+6
| | | | first up: CertificateIssuer
* full indexing support + testsgAlex Gaynor2015-12-241-3/+8
|
* tests on indexingAlex Gaynor2015-12-241-1/+12
|
* address review commentsPaul Kehrer2015-12-231-8/+3
|
* add test that fails if CRL references aren't properly retainedPaul Kehrer2015-12-231-0/+19
| | | | | | If the X509_CRL reference is not properly retained then this test will return an openssl error or potentially a crash as it's reading freed memory to obtain the revocation_date and serial_number
* CRLNumber needs to be a class for reasons.Paul Kehrer2015-12-221-1/+1
|
* add support for parsing AuthorityInfoAccess and IssuerAltName CRL extsPaul Kehrer2015-12-221-3/+18
| | | | Expand the CRL extensions test to check the value
* support parsing CRL extensions in the OpenSSL backendPaul Kehrer2015-12-211-5/+17
|
* add test for byte matchingPaul Kehrer2015-12-211-0/+24
|
* add a CRL public_bytes methodPaul Kehrer2015-12-201-0/+42
|
* Merge pull request #2538 from reaperhulk/empty-crls-are-beautiful-tooAlex Gaynor2015-12-201-0/+8
|\ | | | | support CRLs with no revoked certificates
| * support CRLs with no revoked certificatesPaul Kehrer2015-12-201-0/+8
| |
* | Dealing with the pedantry of pep8Nick Bastin2015-12-201-2/+0
| |
* | Test for non-standard AIA support in CertificateBuilderNick Bastin2015-12-201-0/+32
|/
* Merge pull request #2530 from nbastin/20151214-oid-valPaul Kehrer2015-12-181-27/+50
|\ | | | | OID validation
| * Avoid IndexError on too-short OIDs, add test for regressionNick Bastin2015-12-171-0/+4
| |
| * OID validationNick Bastin2015-12-141-27/+46
| |
* | require not_valid_after >= not_valid_beforePaul Kehrer2015-12-131-0/+22
|/
* add some missing skipsPaul Kehrer2015-12-031-0/+2
|
* expose tbs_certrequest_bytes and signature on CertificateSigningRequestPaul Kehrer2015-12-031-0/+132
|
* implement support for encoding name constraintsPaul Kehrer2015-12-021-0/+35
|