Commit graph

2174 commits

Author SHA1 Message Date
Paul Kehrer
c898871daa
support PKCS7 certificate parsing (#5371)
* support PKCS7 certificate parsing

* refcounts are different in 1.0.2

* rename the functions

* black

* empty commit

* review feedback
2020-08-04 23:50:02 -04:00
Paul Kehrer
143f56f65c
add docker builders, migrate travis to focal by default (#5372)
* add docker builders, migrate travis to focal by default

* get it right

* use older versions where necessary
2020-08-03 00:56:49 -04:00
Paul Kehrer
6d68bfdaee
add basic PKCS7 test vectors (#5370) 2020-08-02 17:28:54 -04:00
Paul Kehrer
ace8a92be9
remove idna support finally (#5351)
* remove idna support finally

* remove unused import
2020-07-26 13:07:31 -04:00
Sviatoslav Sydorenko
b1250e4519
Add deprecation warning handling advice note (#5346)
* Add deprecation warning handling advice note

This tip is being added to help the library maintainers keep
testing cryptography where supporting multiple Python runtime
is still necessary.

Resolves https://github.com/pyca/cryptography/issues/5335

* Move deprecation suppression advice to FAQ
2020-07-25 20:32:58 -05:00
Alex Gaynor
c3a5e082c5
fixed copyright year (#5337) 2020-07-21 11:36:08 -05:00
Alex Gaynor
f7bc5ef7c3
fixes #5321 -- deprecate support for OpenSSL 1.0.2 (#5333) 2020-07-20 21:58:57 -05:00
Alex Gaynor
6bd3faa114
Tell people to use black in our dev docs (#5328)
* Tell people to use black in our dev docs

* For codecov
2020-07-20 15:16:29 -05:00
Alex Gaynor
60aa04481f
Paint it Black by the Rolling Stones (#5324) 2020-07-20 13:06:29 -05:00
Paul Kehrer
2fdb7472af
PKCS12 support (#5325)
* generate_pkcs12 (#4952)

* pkcs12 support

* simplify

* remove fixtures

* reorg and other improvements. memleak check

* ugh

* more fixes

* last changes hopefully

Co-authored-by: Tomer Shalev <tshalev@proofpoint.com>
2020-07-20 10:26:43 -04:00
Paul Kehrer
084da16ebc
disable the osrandom engine on 1.1.1d+ (#5317)
* disable the osrandom engine on 1.1.1d+

* skip (and run) some tests on 1.1.1d+

* simplify our conditionals

* Update src/_cffi_src/openssl/src/osrandom_engine.c

Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>

* words

* more words

* language

* get coverage more cleverly

* a word

* Update .github/workflows/ci.yml

Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>

Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>
2020-07-19 12:33:18 -04:00
Paul Kehrer
c51f7957dd
raise a valueerror on multi-SINGLERESP valued OCSP responses (#5316)
InternalErrors are bad when we know they're reachable
2020-07-18 20:59:56 -04:00
Paul Kehrer
aded1cd02f
support encoding attributes via CertificateSigningRequestBuilder (#5315)
* support encoding attributes via CertificateSigningRequestBuilder

* use a constant. now you know what 12 means!

* pep8
2020-07-18 20:55:25 -04:00
Paul Kehrer
e41177372f
change KeyUsage repr to be less confusing (#5314)
fixes #5127
2020-07-18 18:40:06 -04:00
Paul Kehrer
b8146690ec
support unstructured name x509 attributes (#5313) 2020-07-18 18:35:25 -04:00
Paul Kehrer
84514ee6ee
switch to a newer CSR with SHA256 and a challenge password (#5303)
we'll parse the challenge password in a doctest after another PR lands
2020-07-05 22:56:39 -04:00
Paul Kehrer
28e2783a81
support x509 request challenge password parsing (#4944)
* support x509 request challenge password parsing

* switch to a more generic (but not too generic) attribute parsing

* make it raise a valueerror

* Update tests/x509/test_x509.py

Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>

Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>
2020-07-05 22:29:32 -04:00
Paul Kehrer
7a233b9a60
support 4096 bit DSA parsing from numbers classes (#5301)
* support 4096 bit DSA parsing from numbers classes

* need to get local linting fixed.

* reorder

* add a link to more reasons why DSA sucks
2020-07-05 21:19:39 -04:00
Paul Kehrer
c868961033
add unstructured name x509 csr attribute vector (#5302)
* add unstructured name x509 csr attribute vector

* Update docs/development/test-vectors.rst

Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>

Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>
2020-07-05 21:06:39 -04:00
Paul Kehrer
bd48e0f693
invalid challenge value csr (#5300) 2020-07-05 16:55:24 -04:00
Paul Kehrer
210dc86628
Support parsing SCTs in OCSPResponse (#5298)
* Support parsing SCTs in OCSPResponse

* s/typically/only and pep8

* remove unused vector

Co-authored-by: Szilárd Pfeiffer <szilard.pfeiffer@balasys.hu>
2020-07-05 11:01:07 -04:00
Marko Kreen
8fa84f50f6
Reorganize KDF docs (#5297)
* Add variable/fixed cost section
* Add subtitle to each algorithm
* Reorder alphabetically
2020-07-05 09:33:56 -05:00
Alex Gaynor
5d0c8e0b5f
Run tests on centos8 (#5051)
* Run tests on centos8

* Document that we test this

* debugging

* Try adding this?

* Remove this
2020-07-04 18:17:35 -05:00
Paul Kehrer
13fae162da
add SubjectInformationAccess extension support (#5295)
* add SubjectInformationAccess extension support

* fixes
2020-07-02 01:13:33 -04:00
Paul Kehrer
63d337e5cc
constrain RSA key generation more heavily (#5288)
* constrain RSA key generation more heavily

* constraint to just 3 & 65537

* explain change
2020-06-28 00:18:00 -04:00
Alex Gaynor
51fe7e659c
Bumped the minimum macOS version to 10.10 (#5286) 2020-06-25 19:59:15 -05:00
Marko Kreen
0f8626093c
Support OpenSSH private key serialization format (#5146)
* ssh.py contains load/serialize code.
* Add PrivateFormat.OpenSSH to .private_bytes() format.
* Add load_ssh_private_key().
* Use new code for PublicFormat.OpenSSH too.
* load_ssh_public_key() now supports reading signed public keys.
* Supported algorithms: rsa, dsa, ec, ed25519.
* Optional dependency on 'bcrypt' package via [ssh] extra
2020-06-20 19:06:26 -05:00
Alex Gaynor
f0bc6620d9
Fix for linkcheck (#5281)
* Fix for linkcheck

* attempted linkcheck fix
2020-06-20 17:39:22 -05:00
Jakub Stasiak
0d0d70bd78
Add a way to pass current time to Fernet (#5256)
* Add a way to pass current time to Fernet

The motivation behind this is to be able to unit test code using Fernet
easily without having to monkey patch global state.

* Reformat to satisfy flake8

* Trigger a Fernet.encrypt() branch missing from coverage

* Revert specifying explicit current time in MultiFernet.rotate()

Message's timestamp is not verified anyway since ttl is None.

* Change the Fernet's explicit current time API slightly

This's been suggested in code review.

* Fix a typo

* Fix a typo

* Restore full MultiFernet test coverage and fix a typo

* Restore more coverage

time.time() is not called by MultiFernet.rotate() anymore so the monkey
patching and lambda need to go, because the patched function is not used
and coverage calculation will rightfully notice it.

* Remove an unused import

* Document when the *_at_time Fernet methods were added
2020-06-14 13:30:18 -05:00
Alex Gaynor
09b9fd924d
Update the link to CERT's website for linkcheck (#5278) 2020-06-14 13:29:16 -05:00
Henry Turner
bf7def7424
Add missing exceptions to documentation in key derivation function primitives (#5271)
* Update key-derivation-functions.rst

Add missing exception to documentation

* Update key-derivation-functions.rst

Adding missing exception documentation for AlreadyFinalized to all the derive() functions missing it

* Removed trailing whitespace
2020-06-12 22:09:47 -05:00
twosigmajab
03c5d84036
Clarify that static linkage only applies to wheels (#5265) 2020-06-03 11:15:28 -05:00
Marko Kreen
bf175454a8
Test vectors for OpenSSH serialization format (#5151) 2020-05-25 13:24:17 -05:00
Jakub Stasiak
27f04412b5
Document that Fernet accepts text keys (#5255)
Keys are passed to base64.urlsafe_b64decode for decoding and it accepts
text as well as bytes.
2020-05-25 13:13:35 -05:00
Charles Y
e05795897c
Update symmetric-encryption.rst (#5240)
mis-named parameter
2020-04-29 14:41:56 -05:00
Alex Gaynor
12e85b5916
Added wycheproof hmac vectors (#5238) 2020-04-26 15:53:58 -05:00
Paul Kehrer
5526dca15b
goodbye azure (#5207)
* goodbye azure

* Update tox.ini

Co-Authored-By: Alex Gaynor <alex.gaynor@gmail.com>

* review comments

* update a comment

* delete final azure yaml

* linting

Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>
2020-04-19 20:32:28 -04:00
Alex Gaynor
59d8bc6fb9
Document that we test on bullseye (#5197)
* Document that we test on bullseye

* Update spelling_wordlist.txt

* Update installation.rst
2020-04-17 20:14:19 -05:00
Alex Gaynor
55f3b7d71b
fixed linkcheck (#5188) 2020-04-11 17:21:48 -05:00
Alex Gaynor
56143e1adb
Update insallation.rst to reflect our current test matrix (#5183)
* Update insallation.rst to reflect our current test matrix

* Update installation.rst

* Update installation.rst

* Update installation.rst
2020-04-05 22:03:44 -05:00
Alex Gaynor
3b2102af54
Removed deprecated behavior in AKI.from_issuer_subject_key_identifier (#5182) 2020-04-05 20:00:55 -05:00
Alex Gaynor
aece5b3d47
Drop support for OpenSSL 1.0.1 (#5178) 2020-04-04 16:08:08 -05:00
Alex Gaynor
7a2523eca4
fixed linkcheck for CVE website configuration failure (#5169) 2020-03-31 19:24:42 -05:00
Alex Gaynor
0ecb4c5644
linkcheck: remove domain that fixed it's tls from ignore (#5144) 2020-03-19 22:34:30 -05:00
Alex Gaynor
416d6856f1
Fixed linkcheck (#5142)
* Fixed linkcheck

* linkcheck
2020-03-19 14:18:04 -05:00
Alex Gaynor
e320adfe3e
Fix several CI breakages (#5138)
* Replace dead link

* Explicitly run for all PRs

* Update azure-pipelines.yml

* Update wheel-builder.yml
2020-03-19 11:54:34 -05:00
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