aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* OpenSSL DH backend implementation [Second attempt] (#2914)Aviv Palivoda2016-11-2615-75/+845
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* updated authors.rst (#3277)Erik Daguerre2016-11-221-0/+1
|
* Error out on OpenSSL 1.0.0 by default (#3276)Alex Gaynor2016-11-226-13/+39
| | | | | | * Error out on OpenSSL 1.0.0 by default * what the heck
* let's get rolling on 1.7! (#3274)Paul Kehrer2016-11-223-2/+8
|
* bump version and set changelog date for 1.6 release (#3271)Paul Kehrer2016-11-213-6/+4
|
* error if private_value is <= 0 in ec.derive_private_key (#3273)Paul Kehrer2016-11-212-0/+6
|
* PyPy's ssl module, the last missing macro and three macro functions (#3270)Richard Plangger2016-11-212-1/+4
| | | | | | | | * missing macro and three macro functions * removed space before function name (style issue) * remove macro which always will not be set by cryptography
* update docs and changelog for prehashed support (#3268)Paul Kehrer2016-11-202-4/+16
|
* add support for prehashing in ECDSA sign/verify (#3267)Paul Kehrer2016-11-203-25/+106
| | | | | | * add support for prehashing in ECDSA sign/verify * move signature_algorithm check to its own function
* support prehashed sign/verify in DSA (#3266)Paul Kehrer2016-11-203-10/+71
|
* support RSA verify with prehashing (#3265)Paul Kehrer2016-11-206-20/+82
| | | | | | | | | | * support RSA verify with prehashing * review feedback * more dedupe * refactor and move to a separate module
* support prehashing in RSA sign (#3238)Paul Kehrer2016-11-206-7/+112
| | | | | | | | * support prehashing in RSA sign * check to make sure digest size matches prehashed data provided * move doctest for prehashed
* refactor RSA signature verification to prep for prehash support (#3261)Paul Kehrer2016-11-201-98/+73
|
* refactor ecdsa sign/verify for prehash (#3263)Paul Kehrer2016-11-191-34/+31
|
* refactor dsa sign/verify as prep for prehash (#3262)Paul Kehrer2016-11-191-23/+32
|
* bind a few things pypy ssl stdlib needs in x509v3 (#3255)Paul Kehrer2016-11-191-0/+7
|
* refactor RSA signing to prep for prehash support (#3240)Paul Kehrer2016-11-191-110/+131
|
* Additions to the changelog for 1.6 (#3258)Paul Kehrer2016-11-191-1/+5
| | | | | | * Additions to the changelog for 1.6 * explain why
* Add DHparams_dup to DH bindings (#3260)Aviv Palivoda2016-11-191-0/+1
|
* add a few more OIDs (#3259)Paul Kehrer2016-11-192-0/+24
| | | pulled from #3244
* bind GENERAL_NAME_free and move GENERAL_NAME_new to macros... (#3257)Paul Kehrer2016-11-191-1/+2
| | | where it belongs!
* add error codes and ERR_get_state for pypy stdlib ssl (#3256)Paul Kehrer2016-11-191-2/+29
|
* add some x509_object handling for pypy stdlib (#3254)Paul Kehrer2016-11-192-0/+30
|
* add two error codes for pypy ssl stdlib (#3253)Paul Kehrer2016-11-191-0/+3
|
* add OPENSSL_NPN_NEGOTIATED (#3252)Paul Kehrer2016-11-192-1/+16
|
* add some NIDs (#3251)Paul Kehrer2016-11-181-0/+3
|
* add SSL_CTX_set_ecdh_auto where supported (#3250)Paul Kehrer2016-11-182-0/+12
| | | | In 1.1.0 this is a noop and occurs by default, and this wasn't supported < 1.0.2
* add some BIO functions for pypy's ssl stdlib (#3249)Paul Kehrer2016-11-182-0/+13
| | | refs #3248
* change derive_elliptic_curve_public_point to return EllipticCurvePubl… (#3243)Paul Kehrer2016-11-187-24/+28
| | | | | | | | | | | | | | * change derive_elliptic_curve_public_point to return EllipticCurvePublicKey * also rename the backend interface method * review feedback * Rename to derive_elliptic_curve_private_key * Returns EllipticCurvePrivateKey * Reuses the EC_POINT in the openssl impl * Rename "secret" arg to "private_value" which is consistent with our naming for the value in ECPrivateNumbers.
* update travis to use xcode8.1 image so we have sierra coverage (#3246)Paul Kehrer2016-11-181-9/+9
| | | | | | * update travis to use xcode8.1 image so we have sierra coverage * docs too
* Random flake8 cleanups for the latest release (#3242)Alex Gaynor2016-11-156-0/+7
|
* Raise padding block_size limit to what is allowed by the specs. (#3108)Terry Chia2016-11-155-20/+38
| | | | | | | | | | | | | | | | | | | | * Raize padding block_size limit to what is allowed by the specs. * Add tests for raising padding limits. * Amend C code for padding check to use uint16_t instead of uint8_t. * Fix test to work in Python 3. * Fix typo. * Fix another typo. * Fix return type of the padding checks. * Change hypothesis test on padding. * Update comment.
* workaround for application bundling tools (#3235)Paul Kehrer2016-11-143-1/+50
| | | | | | | | | | | | | | | | | | | | | | | | * cx_freeze support for default_backend * updated tabing to spaces * corrected spacing * moved finding backend to backends __init__ * update to check to see if sys is frozen * corrected pep8 issues * update based on comments * changes to simplify, support testing, and improve comments * add changelog entry * right, coverage. I remember now. Time for some contortions. * updated with review feedback
* Add a bytes method to get the DER ASN.1 encoding of an X509 name. (#3236)Paul Kehrer2016-11-139-0/+65
| | | | | | | | | | * 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
* C locking callback (#3226)Alex Gaynor2016-11-135-95/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove Python OpenSSL locking callback and replace it with one in C The Python OpenSSL locking callback is unsafe; if GC is triggered during the callback's invocation, it can result in the callback being invoked reentrantly, which can lead to deadlocks. This patch replaces it with one in C that gets built at compile time via cffi along with the rest of the OpenSSL binding. * fixes for some issues * unused * revert these changes * these two for good measure * missing param * sigh, syntax * delete tests that assumed an ability to mess with locks * style fixes * licensing stuff * utf8 * Unicode. Huh. What it isn't good for, absolutely nothing.
* Fix the docs-linkcheck tox target (#3239)Paul Kehrer2016-11-131-0/+1
|
* Turns out we shouldn't call it uniqueIdentifier (#3234)Paul Kehrer2016-11-122-3/+3
| | | http://www.ca.com/us/services-support/ca-support/ca-support-online/knowledge-base-articles.tec465360.html
* add some new oids (#3233)Paul Kehrer2016-11-112-0/+16
| | | | | | * add some new oids * As Alex pointed out, it's streetAddress
* update CHANGELOG.rst & AUTHORS.rst (#3231)Ofek Lev2016-11-112-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * finish https://github.com/pyca/cryptography/pull/1973 * change API & add test Function will now return an instance of EllipticCurvePrivateKey, as that is the users' ultimate goal anyway. * fix test * improve coverage * complete coverage * final fix * centos fix * try ec.SECT283K1 * try ec.SECT571K1 * try ec.SECT409K1 * try ec.SECT283K1 * try ec.SECT233K1 * try ec.SECT163K1 * try ec.SECT571R1 * try ec.SECT409R1 * try ec.SECT283R1 * try ec.SECT233R1 * try ec.SECT163R2 * try ec.SECP521R1 * try ec.SECP256R1 * retry * cleanup asserts * use openssl_assert * skip unsupported platforms * change API name to derive_private_key * change version added * improve description of `secret` param * separate successful and failure test cases * simplify successful case * add docs for derive_elliptic_curve_public_point * add period * update CHANGELOG.rst & AUTHORS.rst for https://github.com/pyca/cryptography/pull/3225 * added reST prefix * reduce line length
* add alternate signature OID for RSA with SHA1 + test and vector (#3227)Paul Kehrer2016-11-115-0/+32
| | | | | | * add alternate signature OID for RSA with SHA1 + test and vector * mozilla is a proper noun leave me alone spellchecker
* add ec.private_key_from_secret_and_curve (#3225)Ofek Lev2016-11-118-0/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * finish https://github.com/pyca/cryptography/pull/1973 * change API & add test Function will now return an instance of EllipticCurvePrivateKey, as that is the users' ultimate goal anyway. * fix test * improve coverage * complete coverage * final fix * centos fix * retry * cleanup asserts * use openssl_assert * skip unsupported platforms * change API name to derive_private_key * change version added * improve description of `secret` param * separate successful and failure test cases * simplify successful case * add docs for derive_elliptic_curve_public_point * add period
* Name: add support for multi-value RDNs (#3202)Fraser Tweedale2016-11-119-49/+144
| | | | | | | | 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
* Bump OpenSSL version on Travis (#3230)Alex Gaynor2016-11-111-2/+2
|
* Include the CVE (#3228)Alex Gaynor2016-11-101-1/+1
|
* Make DistributionPoint relative_name a set of NameAttribute (#3210)Fraser Tweedale2016-11-079-22/+187
| | | | | | | | | | | * 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.
* Last pass over fixing the links (#3224)Alex Gaynor2016-11-067-8/+7
|
* Update the commoncrypto links (#3223)Alex Gaynor2016-11-062-2/+2
|
* Add myself to AUTHORS.rst (#3222)Thomas Sileo2016-11-061-0/+1
|
* Export missing OpenSSL `X509_VERIFY_PARAM_free` (#3221)Thomas Sileo2016-11-061-0/+1
| | | | | | * Export missing OpenSSL `X509_VERIFY_PARAM_free` * Remove un-needed export in conditional names
* Use the canonical host for two urls on the OpenSSL website (#3219)Alex Gaynor2016-11-062-2/+2
|