Commit graph

224 commits

Author SHA1 Message Date
Paul Kehrer
9a8e29eda7 add initial OCSP request test vector (#3890) 2017-09-07 07:11:47 -04:00
Paul Kehrer
64dc16b9f9 add test vector with invalid basicconstraints (#3866)
* add test vector with invalid basicconstraints

* sigh
2017-08-15 21:17:01 -04:00
Vincent Pelletier
6c02ee85bc Add is_signature_valid method on CertificateRevocationList (#3849) 2017-08-12 08:05:00 -05:00
Alex Gaynor
601ed631ad Attempt to use coverage to quantify how many of the CONDITIONAL_NAMES we really use (#3763)
* Attempt to use coverage to quantify how many of the CONDITIONAL_NAMES we really use

* rewrite file to improve coverage

* Write it this way so we can use line coverage

* lost this one :-(

* fix comment and flake8

* update the docs as well

* flake8
2017-07-08 19:35:02 -05:00
Paul Kehrer
bf128a470b add rfc 3526 DH groups (#3767) 2017-07-08 18:36:58 -04:00
Paul Kehrer
491fd7cc5a Funcs macros gone (#3695)
* No more FUNCS/MACROS distinction

* change the docs to not talk about MACROS since they're gone

* remove out of date comment
2017-06-27 14:15:37 -07:00
Paul Kehrer
e67354e9e9 add NIST CAVP CCM vectors (#3698)
http://csrc.nist.gov/groups/STM/cavp/documents/mac/ccmtestvectors.zip

No TLS :(
2017-06-18 20:35:05 -04:00
Paul Kehrer
cfdc6057e1 add X25519 test vectors from RFC 7748 section 5.2 (#3685) 2017-06-06 08:01:03 -04:00
Alex Gaynor
5afd5694d2 Change the link to appease linkcheck (#3677) 2017-06-04 13:25:53 -10:00
Paul Kehrer
66dcd38fad add ChaCha20Poly1305 test vectors from OpenSSL/RFC7539 (#3673)
* add ChaCha20Poly1305 test vectors from OpenSSL/RFC7539

* add the boringssl tests as well

* highlight the lines
2017-06-04 17:09:03 -04:00
Fraser Tweedale
d607dd7e5b Enlarge _oid2txt buffer to handle larger OIDs (#3612)
The OpenSSL manual recommends a buffer size of 80 for OBJ_oid2txt:
https://www.openssl.org/docs/crypto/OBJ_nid2ln.html#return_values.
But OIDs longer than this occur in real life (e.g. Active Directory
makes some very long OIDs).  If the length of the stringified OID
exceeds the buffer size, allocate a new buffer that is big enough to
hold the stringified OID, and re-do the conversion into the new
buffer.
2017-05-29 16:33:20 -05:00
Paul Kehrer
adeaacfa56 allow global suppression of link flags (#3592)
CRYPTOGRAPHY_SUPPRESS_LINK_FLAGS will now suppress link flags regardless
of platform. Additionally, CRYPTOGRAPHY_WINDOWS_LINK_LEGACY_OPENSSL is
now the flag you need if you want to link against < 1.1.0 on windows.
2017-05-24 12:49:18 -07:00
Paul Kehrer
5103235129 time to remove commoncrypto, fare thee well (#3551)
* time to remove commoncrypto, fare thee well

* remove even more

* update the changelog

* remove more things

* don't need this function

* remove CAST5 CTR tests since that was only supported in commoncrypto

* assert a thing
2017-05-20 10:09:02 -07:00
Alex Gaynor
89c2ce4652 Update docs to reflect a change that occured long ago with bindings (#3517) 2017-04-26 09:44:14 -05:00
Alex Gaynor
de569c58ff format some function names in docs (#3511) 2017-04-21 21:24:57 +08:00
Alex Gaynor
4a772a823d Another site goes HTTPS! (#3477) 2017-03-23 09:23:24 -04:00
Alex Gaynor
5f9c5cb4b8 Refs #3461 -- added a test vector with SCTs (#3462)
* Refs #3461 -- added a test vector with SCTs

* timestamp is a word
2017-03-19 23:12:19 -04:00
Paul Kehrer
4ce11b1b52 update dev docs to also say macOS and use openssl 1.1 (#3452) 2017-03-14 13:50:47 -04:00
Aviv Palivoda
e44efb634f DH subgroup order (q) (#3369)
* Support DH q (subgroup order)

* Change RFC5114.txt to NIST format

* Add tests for DH q

* Update docs for DH q

* Fix pep8

* Improve test covergae for DH q

* Create _dh_params_dup that copy q if DHparams_dup don't

On OpenSSL < 1.0.2 DHparams_dup don't copy q. _dh_params_dup
call DHparams_dup and if the version is smaller than 1.0.2
copy q manually

* Copy q manually on libressl

* Add to test vectors serialized RFC5114 2048 bit DH parameters with 224 bit subgroup

* Support serialization of DH with q

* Add tests for serialization of DH with q

* Support DH serialization with q only if Cryptography_HAS_EVP_PKEY_DHX is true

* Raise exception when trying to serialize DH X9.42 when not supported

* raise unsupported key type when deserilizing DH X9.42 if not supported

* pep8 fixes

* Fix test_serialization

* Add dhx_serialization_supported method to DHBacked

* document q in dh_parameters_supported

* Rename dhx_serialization_supported to dh_x942_serialization_supported
2017-03-05 22:24:55 -04:00
Alex Gaynor
64f1f429bb Update NIST urls in docs (#3418) 2017-02-27 19:25:37 -08:00
Alex Gaynor
9a59ad87f6 Use HTTPS urls for a few more websites (#3416) 2017-02-23 04:38:41 -06:00
Alex Gaynor
5ad6df9eb6 This is HTTPS now (#3407) 2017-02-18 11:52:50 -06:00
Aviv Palivoda
6723a12712 DH serialization (#3297)
* DH keys support serialization

* Add DH serialization documentation

* Add tests for DH keys serialization in DER encoding

* update version to 1.8

* Allow only SubjectPublicKeyInfo serialization

* Remove support in TraditionalOpenSSL format

* Fix pep8

* Refactor dh serialization tests
2017-02-07 21:24:56 +08:00
Alex Gaynor
0e8cdf1023 Drop 1.0.0 (#3312)
* 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
2016-12-13 20:05:35 -06:00
Aviv Palivoda
495f21a9c6 OpenSSL DH backend implementation [Second attempt] (#2914)
* Start of OpenSSL DH backend implementation

* Supporting DH in MultiBackend

* DHBackend has dh_parameters_supported method

* Removed DHParametersWithNumbers and DHPrivateKeyWithNumbers from documentation

* Removed ExchangeContext. exchange is a method of DHPrivateKeyWithSerialization

* PEP8 fixes

* Fixed TestDH.test_bad_tls_exchange

* Fixed generate_private_key reference in dh documentation

* test DH multibackend support

* testing DH coversion to serialized

* Validating that we receive serialized class in test_generate_dh

* Testing DH exchange symmetric key padding

* struct DH is now opaqued

* PEP8 fixes

* Testing load_dh_private_numbers throws ValueError when DH_check fails

* Using openssl_assert

* Passing keywords arguments in DH key exchange example

* test_dh::test_bad_tls_exchange now uses pre calculated parameters

* TestDH - Add test that the computed secret is equivalent to the definition by comparing with secret computed in pure python

* Add missing generator parameter to DHBackend interface docs.

* Include parameter type in DHBackend abc docs.

* Add docs for dh.generate_parameters function

* Remove the dh Numbers section, and move the DHNumbers class docs to where they are first used.

* Add note of big endian byte packing to DH exchange method.

* DH documentation updates.

Add single sentence overview with wikipedia link.
Add paragraph on assembling using Numbers objects.
Add link to backend interface docs.
First section was all indented, I think by mistake.

* Add exchange method to DHPrivateKey abstract base class.

* Small tweaks to DH documentation - remove Provider.

* Add endian to dictionary

* Use utils.int_from_bytes in test_tls_exchange_algorithm

* Removed duplicate line

* Change dh.rst exchange algorithm from doctest to code-block

The example in the Diffie-Hellman exhange algorithm is using
2048 bits key. Generating the parameters of 2048 takes long
time. This caused the automated tests to fail. In order to
pass the tests we change the example to code-block so it
will not run in the doc tests.

* Fix dh docs

* Document the generator in DHBackend relevant methods

* Fix dh tests

* use DHparams_dup

* Fix key type to unsigned char as expected by DH_compute_key

* Validate that DH generator is 2 or 5

* test dh exchange using botan vectors

* group all numbers classes

* Simplify _DHPrivateKey

* Rename test with serialized to numbers

* Move bad exchange params to external vector file

* update exchange versionadded to 1.7

* Make key_size bit accurate

* Change botan link

* Added CHANGELOG entry
2016-11-26 00:51:28 +08:00
Alex Gaynor
7ff4c8fe24 Random flake8 cleanups for the latest release (#3242) 2016-11-15 12:27:31 +08:00
Paul Kehrer
f6f238e4c0 add alternate signature OID for RSA with SHA1 + test and vector (#3227)
* add alternate signature OID for RSA with SHA1 + test and vector

* mozilla is a proper noun leave me alone spellchecker
2016-11-11 13:41:31 -05:00
Alex Gaynor
e51236d7c0 Last pass over fixing the links (#3224) 2016-11-06 23:13:35 +08:00
Alex Gaynor
769d5c66be Use the canonical host for two urls on the OpenSSL website (#3219) 2016-11-06 17:30:36 +08:00
Nick Badger
63bbf18e62 Clarified Windows development installation and docd upstream enchant bug (#3128)
* Clarified Windows development installation and doc'd upstream enchant bug

* Fixed whitespace problems

* Fixed merge resolution mistake
2016-09-03 12:10:36 -05:00
Gabriel Orisaka
b6e0ba0fb7 Add recommendation about terminology (#3079) 2016-08-02 22:25:49 -04:00
Alex Gaynor
0c11d0427e Random grammar stuff (#2955) 2016-06-02 22:24:22 -07:00
Paul Kehrer
3079299eab add RSA OAEP SHA2 vectors via custom vector creation (#2829)
* add RSA OAEP SHA2 vectors via custom vector creation

* update the docs

* retab

* remove sha2 oaep support (it will be added again in another PR)

* add header to each vector file

* Add Java 8 Bouncy Castle based verification of RSA-OAEP SHA-2 test vectors (#4)

* Update Java verifier to skip past test vector file header if present (#5)

* Update Java verifier to skip past test vector file header if present

* Fix tabs vs. space whitespace

* generate sha1 oaep permutations as well + verify support in java

* address review feedback
2016-06-02 15:11:03 -07:00
Alex Gaynor
988df9ba03 Update URLs for new RTD domain (#2879) 2016-04-28 09:57:16 -05:00
Chris Collis
2f27a8b2dc Update getting-started.rst to clarify OS X Homebrew pip install (#2876)
* Update getting-started.rst to clarify OS X Homebrew pip install
On OS X El Capitan following the current instructions fails with fatal error: 'openssl/opensslv.h' file not found on pip install -r dev-requirements.txt; this change adds to the instructions to clarify that CFLAGS and LDFLAGS may need to be set. I based this on the instructions in the Installation page.

* Address reaperhulk comments, OpenSSL must be installed.

Clarify that OpenSSL must be installed via Homebrew or MacPorts and how to build statically.

* Make Homebrew, MacPorts, OpenSSL links

* Fix doc errors and improve overall flow
Insert tip about tox needing the same flags
Make console example multi-line so that pip install is visible
Change heading levels to allow OS X sub-section
2016-04-23 09:28:23 -05:00
Alex Gaynor
4377454626 Use HTTPS for a link in our docs (#2869) 2016-04-09 10:51:09 -04:00
Terry Chia
7e6afe8be1 Add vectors for unkeyed blake2s and blake2b. (#2867)
* Add vectors for unkeyed blake2s and blake2b.

* Add short note describing source of vectors.

* Add link to OpenSSL repository.

* Amend docs.
2016-04-09 10:04:12 -04:00
Paul Kehrer
1c6e624631 Merge pull request #2773 from jared-mess/test-vectors-NIST-800-108-counter-mode
NIST SP 800-108 Counter Mode KDF test vectors.
2016-03-15 09:11:24 -04:00
Jared Messenger
fac4d649fe Fixing line > 79 characters, PEP8 2016-03-14 14:27:09 -07:00
Paul Kehrer
d3c21ca45d add e-trust russian x509 test vector 2016-03-11 23:38:00 -04:00
Jared Messenger
54035d3e82 NIST SP 800-108 Counter Mode KDF test vectors.
NIST CAVP test vectors for Counter Mode KDF using HMAC-SHA1, HMAC-SHA224, HMAC-SHA256 and HMAC-SHA512 as the PRF.
2016-03-07 12:10:05 -08:00
Alex Gaynor
6422d83d23 HTTPS some links, in the odd event users of a cryptographic library would care about authentication, integrity, or confidentiality 2016-03-06 21:40:57 -05:00
Paul Kehrer
a372db375a Merge pull request #2670 from joernheissler/x509_req_verify
Add verify method on CertificateSigningRequest
2016-03-06 20:47:06 -04:30
Paul Kehrer
4a6e2de83c add another policy constraints test vector 2016-02-27 10:31:17 -06:00
Alex Gaynor
0ab8e9e1c6 Document the vector 2016-02-26 12:29:56 -05:00
Joern Heissler
1bd77e2f4e Add verify method on CertificateSigningRequest 2016-01-13 22:51:37 +01:00
Paul Kehrer
277b701377 update some links with the redirects shown in the linkchecker 2016-01-01 09:58:53 -06:00
Paul Kehrer
249d9be377 new unsupported extension x509 test vector
see #2288
2015-12-30 10:23:02 -06:00
Paul Kehrer
93df8b7784 add new CRL test vector 2015-12-22 18:11:50 -06:00
Paul Kehrer
9543a33eb6 support CRLs with no revoked certificates 2015-12-20 18:48:24 -06:00