Commit graph

2195 commits

Author SHA1 Message Date
Alex Gaynor
0b35c5d701
Remove bindings docs (#5469) 2020-09-20 16:49:09 -05:00
Paul Kehrer
20c0388086
smime signer support (#5465)
* smime signer support

* fix ed25519 check

* change some wording

* python 2.7...

* review feedback

* s/secure/signed

* do some verification in the tests

* review feedback

* doc return value
2020-09-19 19:07:26 -04:00
Paul Kehrer
00ba159220
add RSA 4096-bit self-signed CA for some upcoming tests (#5464) 2020-09-14 19:40:05 -04:00
Paul Kehrer
1a9e2e1ad7
allow bytes-like for padding (#5462)
this doesn't improve efficiency in any way (copies galore!), but it does
make it consistent between a cipher context and a padding context
2020-09-13 20:04:18 -04:00
Alex Gaynor
bfe7b455c5
Account for Bruce redoing his website or something (#5461) 2020-09-13 19:03:36 -05:00
Alex Gaynor
3367c18bf2
Be clear that a lack of authentication often means you don't have secrecy (#5454) 2020-09-05 10:46:34 -05:00
Alex Gaynor
63dfc57fca
fixed verify script that couldn't have ever worked (#5443) 2020-08-29 09:39:31 -05:00
Paul Kehrer
31a5da73f8
update docs to not use backends (#5404) 2020-08-29 09:28:32 -04:00
Alex Gaynor
8bc6920444
Break users on OpenSSL 1.0.2 (#5438)
fixes #5432
2020-08-28 09:55:41 -05:00
Paul Kehrer
b9d26d2608
add some words about separating ECDH and ECDSA (#5423)
* add some words about separating ECDH and ECDSA

* Thomas Pornin wrote some good words about why you should try not to mix
your ECDH and ECDSA keys.
2020-08-24 14:01:45 -04:00
Paul Kehrer
b2c5ac8919
Docs testing (#5413)
* document we test on aarch64

even odds this angers the spellchecker

* Just as my previous commit msg prophesied

* Update docs/spelling_wordlist.txt

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

Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>
2020-08-16 21:10:47 -04:00
Paul Kehrer
872835ea0d
update submitting patches docs to be a bit more true (#5407)
For now best practice is that they should be optional.
2020-08-16 15:23:02 -04:00
Paul Kehrer
0fa77f1530
HOTP and TOTP should also have optional backends (#5402) 2020-08-15 16:34:59 -04:00
Paul Kehrer
e52b861d75
add changelog and update backend docs for optional change (#5401) 2020-08-15 16:16:50 -04:00
Paul Kehrer
ab9a65ba18
make backend arg optional for rsa (#5396) 2020-08-15 09:51:42 -04:00
Paul Kehrer
f317452e96
optional backend for dh, dsa, ec (#5395) 2020-08-15 09:51:21 -04:00
Paul Kehrer
4fe585447a
optional backend for hash, cipher, cmac, hmac, keywrap (#5394) 2020-08-15 09:50:47 -04:00
Paul Kehrer
24070d7954
make backend optional in serialization (#5392) 2020-08-15 01:05:47 -04:00
Paul Kehrer
519cae6a2d
x509 optional backend args (#5390) 2020-08-15 00:34:04 -04:00
Paul Kehrer
40bfc7f75b
remove KDF backend requirements (#5389) 2020-08-14 23:48:08 -04:00
Alex Gaynor
dabc36d7e4
Update which PyPy versions we test against (#5377)
refs #5376
2020-08-05 21:11:36 -05:00
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