Commit graph

293 commits

Author SHA1 Message Date
Mads Jensen
f89ce40b62 Replace legacy file handling with a context manager. (#5092)
* Replace legacy file handling with a context manager.

* flake8 fix

Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>
2020-01-12 17:32:21 -05:00
Mads Jensen
a849f40556 Use literals for collections and comprehensions. (#5091) 2020-01-12 17:29:17 -05:00
Paul Kehrer
d75335a7de drop python 3.4 support (#5087)
* drop python 3.4 support

Our dependencies have started dropping support so it is becoming
difficult to test. Additionally, Python 3.4 represents <2% of our
downloads, so taking on a large maintenance burden to maintain support
isn't a good use of limited time. Accordingly, we're dropping testing
infrastructure and migrating our abi3 wheels to py35+.

* use removed instead of dropped
2019-12-08 23:42:55 -05:00
Alex Gaynor
2bc47fe2fd Added a test vector of an OCSP response with SCT extension (#5066) 2019-11-16 11:25:20 +08:00
Paul Kehrer
2e86983a77 Parse single_extensions in OCSP responses (#5059)
* add single_extensions to OCSPResponse (#4753)

* new vector, updateed docs, more stringent parser, changelog, etc

* simplify PR (no SCT for now)

* add a comment

* finish pulling out the sct stuff so tests might actually run
2019-11-11 00:40:11 -05:00
Alex Gaynor
6d450f7fdc Fixed link for linkcheck (#5047) 2019-11-01 07:10:56 +01:00
Marko Kreen
f7c77712d6 Finish ed25519 and ed448 support in x509 module (#4972)
* Support ed25519 in csr/crl creation

* Tests for ed25519/x509

* Support ed448 in crt/csr/crl creation

* Tests for ed448/x509

* Support ed25519/ed448 in OCSPResponseBuilder

* Tests for eddsa in OCSPResponseBuilder

* Builder check missing in create_x509_csr

* Documentation update for ed25519+ed448 in x509
2019-09-09 07:44:02 +08:00
Paul Kehrer
b5b6bd13a2 fix coverage by adding two artificial DSA public keys (#4984)
* fix coverage by adding two artificial DSA public keys

One key removes the optional parameters from the structure to cover a
branch conditional, and the other key has its BITSTRING padding value
set to a non-zero value.

* lexicographic? never heard of it
2019-09-06 22:22:51 -05:00
Paul Kehrer
784676de33 add x509 CSR with challenge password (#4942) 2019-07-09 08:10:06 -04:00
Paul Kehrer
7c2cec8597 fix inaccurate ed25519 vector docs (#4938) 2019-07-06 17:01:54 -04:00
Paul Kehrer
60e83b2452 more ed25519 vectors, better description of RFC 8410 vector (#4936)
* more ed25519 vectors, better description of RFC 8410 vector

* typo

* oops, doc'd wrong
2019-07-06 16:04:15 -04:00
Paul Kehrer
de7c5e6d53 add ed25519ph x509 test vector (#4933) 2019-07-03 19:05:03 -04:00
Alex Gaynor
ea4d1ee3fa Order the elements in reviewing patches reasonably (#4883) 2019-05-09 19:11:21 -04:00
Paul Kehrer
6ec71fd045 add RSA PSS certificate (#4865)
* add RSA PSS certificate

* i still maintain that 257 is slightly better than 256
2019-05-04 14:42:28 -04:00
Alex Gaynor
9c7aa17ef9 Refs #4830 -- added a vector of an x.509 certificate with a negative … (#4842)
* Refs #4830 -- added a vector of an x.509 certificate with a negative serial number

* Line wrap
2019-04-13 10:38:00 +08:00
Paul Kehrer
88d836e10d add poly1305 test vectors from rfc 7539 (#4800) 2019-03-07 20:23:08 -05:00
Paul Kehrer
20a441870b add ed25519 PKCS8 and subjectPublicKeyInfo vectors (#4719)
* add ed25519 PKCS8 and subjectPublicKeyInfo vectors

* line length fix
2019-02-20 10:48:45 -05:00
Paul Kehrer
3ffa0e216a add ed448 PKCS8 and subjectPublicKeyInfo vectors (#4718) 2019-02-20 10:44:17 -05:00
Paul Kehrer
57f8a533c3 concede to digicert's garbage CDN (#4747)
Which, despite supporting HTTPS, is non-deterministically providing 404s and DigiCert has asserted that http is the only "supported" protocol.
2019-02-03 12:49:36 -05:00
Alex Gaynor
e5463ccb33 consistently linky RFC in the docs (#4716)
* consistently linky RFC in the docs

* oops
2019-01-18 15:19:34 -06:00
Alex Gaynor
aeb3acbe9a Update wycheproof commit in docs (#4687) 2019-01-13 18:11:33 -08:00
Paul Kehrer
638ab4ac77 add x25519 pkcs8/subjectpublickeyinfo vectors (#4685) 2019-01-13 13:09:38 -05:00
Paul Kehrer
60f264b0f2 add signature_hash_algorithm to OCSPResponse (#4681)
* add signature_hash_algorithm to OCSPResponse

* fix pointless asserts
2019-01-10 18:37:03 -05:00
Paul Kehrer
e57c63c34c add x448 private/public PEM/DER pkcs8/subjectpublickeyinfo vectors (#4667) 2019-01-01 18:11:33 -05:00
Alex Gaynor
ebaa570697 Sphinx's website is now https (#4662)
* Sphinx's website is now https

* Sphinx's website is now https
2018-12-30 14:28:48 -06:00
Alex Gaynor
9aeabd9d2a DigiCert's root is now available over https (#4664) 2018-12-30 14:28:19 -06:00
Paul Kehrer
489bae980a add compressed point EC vectors (#4637) 2018-12-10 22:26:48 -05:00
Paul Kehrer
8f3d259bd8 add ed448 test vectors (#4608) 2018-11-24 09:30:39 -06:00
Paul Kehrer
1cd33bc4f0 x448 test vectors (#4576) 2018-11-12 08:18:07 -05:00
Paul Kehrer
98420eac45 another pkcs12 vector (#4557)
* another pkcs12 vector

also fixed the pathing to be consistent in the docs for PKCS12 vectors

* add a cert with no key pkcs12 as well
2018-11-04 10:19:22 -05:00
Paul Kehrer
94c13bb5de additional pkcs12 test vector (#4554) 2018-11-03 11:30:57 -04:00
Paul Kehrer
f5ab0deff9 add pkcs12 test vectors (#4535)
* add pkcs12 test vectors

* add more explanatino
2018-10-30 00:48:53 -04:00
Paul Kehrer
328c314d5b add issuingDistributionPoint vectors (#4537) 2018-10-29 00:05:31 -04:00
Paul Kehrer
03eab03b88 add a new SCT vector (#4528)
* add a new SCT vector

* ridiculous
2018-10-27 22:12:49 -04:00
Paul Kehrer
a9b4f86de8 next_update is not a required field on OCSP responses (#4513) 2018-10-23 20:58:07 -04:00
Alex Gaynor
f6f2d7ebd5 Another URL goes https! (#4512) 2018-10-24 08:39:19 +08:00
André Almeida
8a35a20045 Enhance info on pip requirements intallation (#4499)
* Enhance info on pip requirements intallation

* Remove virtualenv files from remote

* Fix "pacakges" typo

* Removing trailling whitespaces
2018-10-19 10:20:03 +08:00
Paul Kehrer
3cc0079024 add OCSP request with a request extension (nonce) (#4462) 2018-09-07 09:06:17 -04:00
Paul Kehrer
1ded081139 More OCSP vectors (#4451)
* yet another ocsp response vector.

and yet there will be at least one more after this

* add one more
2018-09-01 15:09:10 -05:00
Paul Kehrer
8e499b2dfa add LE subordinate certificate to test vectors (#4450) 2018-09-01 14:07:44 -05:00
Paul Kehrer
5d9c8e2559 add more OCSP response vectors (#4445)
* add more OCSP response vectors

* another vector and better docs
2018-09-01 09:41:25 -05:00
Paul Kehrer
33dbd9365f OCSP response vector (#4443)
* OCSP response vector

* oops, wrong name

* move ocsp response vector docs

* make alex happy
2018-08-31 17:58:53 -05:00
Alex Gaynor
ef3b38d2ac Added vector for pre-certificate poison extension (#4432) 2018-08-30 12:46:47 -04:00
Alex Gaynor
2284eea988 Fixes #4426 -- use modern idiom in our bindings docs (#4428) 2018-08-30 09:40:46 -04:00
David Benjamin
3ce8883fd6 Fix encoding errors in RSA test keys. (#4410)
* Fix encoding errors in RSA test keys.

enc-rsa-pkcs8.pem and unenc-rsa-pkcs8.pem did not encode the RSA key
correctly. Per RFC 8017, appendix A.1:

   The object identifier rsaEncryption identifies RSA public and private
   keys as defined in Appendices A.1.1 and A.1.2.  The parameters field
   has associated with this OID in a value of type AlgorithmIdentifier
   SHALL have a value of type NULL.

      rsaEncryption    OBJECT IDENTIFIER ::= { pkcs-1 1 }

unenc-rsa-pkcs8.pem, however, was missing that NULL, which was, in turn,
carried into the encrypted payload of enc-rsa-pkcs8.pem. The DER
version, enc-rsa-pkcs8.der, carries this mistake too. Interestingly,
unenc-rsa-pkcs8.der does *not* have it. I'm guessing it was converted
with the openssl command-line tool which fixed the encoding in
conversion.

Current versions of OpenSSL are lax and ignore the parameters field, but
it's best to test against spec-compliant inputs. Fix unenc-rsa-pkcs8.pem
to match unenc-rsa-pkcs8.der and then refresh enc-rsa-pkcs8.{der,pem}
with the new encoding but otherwise the same encryption parameters.

I've refreshed the dumpasn1 (at least that's what it looks like)
preamble at the top of each file, but the current version of dumpasn1
appears to have changed the spacing slightly, so there's some whitespace
diff noise.

* Update test-vectors.rst.
2018-08-23 14:58:30 -05:00
Paul Kehrer
b3f4df1947 add new OCSP request vectors (#4399) 2018-08-15 10:19:15 -04:00
Alex Gaynor
37d2947b44 Document wycheproof revision we're current as of (#4390)
* Document wycheproof revision we're current as of

* Wycheproof is a real word!

* line length
2018-08-12 16:39:10 -05:00
Paul Kehrer
aedb3f0714 Add SHA512/224 and SHA512/256 test vectors from NIST CAVP (#4237) 2018-05-14 08:45:42 -04:00
Ville Skyttä
40c6d40512 Use pytest instead of py.test per upstream recommendation, #dropthedot (#4236)
http://blog.pytest.org/2016/whats-new-in-pytest-30/
https://twitter.com/hashtag/dropthedot
2018-05-13 10:23:49 -04:00
Paul Kehrer
2bc941d85d add SHA3 and SHAKE vectors (#4213)
These can be used when OpenSSL 1.1.1 is released
2018-05-09 12:45:55 -04:00