Commit graph

2469 commits

Author SHA1 Message Date
Paul Kehrer
9425d2376b
add one more RSA PSS invalid test vector (#8798) 2023-04-23 20:22:50 +00:00
Paul Kehrer
5f3871e4df
add two RSA PSS certificate vectors that have invalid encodings (#8797)
* add two RSA PSS certificate vectors that have invalid encodings

The signatures on these vectors are not valid.

* spelling
2023-04-23 19:51:35 +00:00
Paul Kehrer
49dee344a1
update MAC docs (#8777)
* Update hmac.rst

* Update poly1305.rst
2023-04-21 16:04:45 -06:00
Alex Gaynor
34edbb2e17
Update FAQ (#8773)
Add a Q on the scope of our issue tracker, and remove a legacy Q.
2023-04-21 11:16:35 -06:00
Paul Kehrer
45bddbfb19
add support for aes256-gcm@openssh.com decryption for SSH keys (#8738)
* add support for aes256-gcm@openssh.com decryption for SSH keys

* review feedback

* skip when bcrypt isn't present
2023-04-15 04:05:11 +00:00
Paul Kehrer
253a97a34b
update docs for rust versions in debian and rhel (#8702) 2023-04-10 12:34:46 +00:00
Alex Gaynor
f8e929a225
Fix alpine installation docs (#8701) 2023-04-10 12:28:50 +00:00
Paul Kehrer
7d3f8a43d4
we made WithSerialization an alias to the main types long ago (#8698)
stop documenting them entirely
2023-04-10 00:13:55 -04:00
Paul Kehrer
40c16dc180
OCSP responses are responses, not certificates (#8696) 2023-04-10 03:32:50 +00:00
Paul Kehrer
f724c9b2fd
Support msCertificateTemplate extension (#8695)
* support ms certificate template

* contortions for rust coverage

* review feedback
2023-04-10 03:10:41 +00:00
Paul Kehrer
5fef27733c
update docs for macOS dev with rust openssl (#8653) 2023-04-02 09:01:31 -04:00
Alex Gaynor
1e49cb9c13
Switch from tox to nox (#8651) 2023-04-02 16:28:22 +09:00
Alex Gaynor
89228a9deb
Added support for OCSP AcceptableResponses extension (#8617)
fixes #8589
2023-03-27 00:51:04 +00:00
Alex Gaynor
e030da4b54
fix copyright years (#8595)
* fix copyright year in docs

* update copyright year
2023-03-25 04:50:08 +08:00
Paul Kehrer
0794b0e31a
update MSRV 1.48.0 -> 1.56.0 (#8587)
* update MSRV 1.48.0 -> 1.56.0

* bump some deps for MSRV
2023-03-24 13:36:14 +00:00
Paul Kehrer
b5170bf26d
drop python 3.6 support (#8448)
* drop python 3.6 support

* Update tests/hazmat/bindings/test_openssl.py

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

---------

Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>
2023-03-24 13:15:13 +00:00
Paul Kehrer
5e6476a4c6
drop support for openssl < 1.1.1d (#8449)
This removes the OS random engine, which contained the only CPython PSF
licensed code in the repository. Accordingly, that license has now been
removed.
2023-03-24 08:36:58 -04:00
Paul Kehrer
2daf74aabf
update docs about testing, switch to 3.1.0 across more of our CI (#8558) 2023-03-21 07:29:52 -04:00
Alex Gaynor
f371af837a
Added support for handling python buffers in Rust code (#8556)
This is extra mega cursed, and strictly speaking unsound. It does, however, match the status quo ante, where someone mutating a buffer while its being used in cffi code will basically always be UB.
2023-03-21 08:16:53 +08:00
Alex Gaynor
6c39999b40
Ressurect the PoC of OpenSSL from Rust (#7164) 2023-03-15 13:06:16 +08:00
shane-kearns
d85db128fb
Fix sample code for policy extension (#8489) 2023-03-10 07:16:13 -05:00
Alex Gaynor
f84327556a
remove out of date details in random numbers docs (#8482) 2023-03-10 05:19:39 +08:00
Alexandre Duc
7ae97f8988
On Windows, os.urandom doesn't use CryptGenRandom anymore (deprecated) (#8481)
but BCryptGenRandom()
2023-03-09 12:24:55 -05:00
Marti Raudsepp
79e38a379e
Make Union type aliases a documented public API (#8168)
* Rename Union type aliases to CamelCase

Many `typing.Union` type aliases were previously using `UPPER_SNAKE_CASE`, but Python's convention is `CamelCase` for these (e.g. https://docs.python.org/3/library/typing.html#type-aliases)

* Add utils.deprecated for the old non-underscore type aliases

* Added documentation for new type aliases & minor tweaks

* Use 'versionadded:: 40.0.0'

* Fix CertificatePublicKeyTypes vs CertificateIssuerPublicKeyTypes. Rename CertificatePrivateKeyTypes to CertificateIssuerPrivateKeyTypes

* Fix imports (ruff)

* Fix one more versionadded

* Tweak docs & Reorder: CertificateIssuerPublicKeyTypes before CertificateIssuerPrivateKeyTypes

* Fix test mypy errors using cast()

* Fix black, oops

* Revert "Fix black, oops"

This reverts commit 85344e231d697bdc0940e105f7aed729445f9743.

* Revert "Fix test mypy errors using cast()"

This reverts commit b272d8ca95fbbbc62060663f9e8930a139a7a43e.

* Revert type of SubjectKeyIdentifier.from_public_key arg

* Changelog tweak
2023-03-07 19:20:32 +08:00
Marty Hill
a28ad12125
Update serialization.rst (#8464)
Proposed update to parameter in example call to pkcs12.serialize_key_and_certificates() on line 908.
2023-03-06 08:26:20 -05:00
Alex Gaynor
c4ff4f92ef
ignore ntt in linkcheck (#8423) 2023-03-02 23:02:58 +00:00
Alex Gaynor
d05a8ac6cd
Update to the new wycheproof (#8403) 2023-02-28 05:07:54 +00:00
Paul Kehrer
1937b4bb33
improve the custom build script slightly (#8392)
this will make it more robust to some upcoming pip changes
2023-02-26 22:27:48 +00:00
Alex Gaynor
94debb12c6
fixes #8374 -- removed docs for removed method (#8377)
* fixes #8374 -- removed docs for removed method

* Update CHANGELOG.rst
2023-02-22 08:08:33 -06:00
David Buchanan
db6905d69c
Add shortcut methods for exporting EC keys as raw bytes (#8357)
* WIP: Add raw export alias method for x25519 keys

* Ditto for x448, ed448, ed25519

* Document new private_bytes_raw public_bytes_raw methods

* docs: Populate versionadded to be 40

* docs: Fix PublicFormat -> PrivateFormat where applicable

* formatting

* Update tests for test_pub_priv_bytes_raw in x25519, x448, ed448 (TODO: ed25519)

* Add test_pub_priv_bytes_raw test for Ed25519
2023-02-22 08:09:34 -05:00
Jake
50fec7e541
Fix SSHCertificateBuilder sample code (#8373)
Update SSHCertificateBuilder sample code to:
* Correctly use the signing key when signing the certificate, rather than the user's own private key.
* Generate the user's public key in one line, making it clearer to the reader that only the public key is an input to the certificate builder.
2023-02-22 07:03:26 -05:00
Paul Kehrer
5a34d492bc
embrace my inner nitpicker (#8361)
fixes all our versionadded/changed to match actual versions we released
2023-02-20 23:57:08 +00:00
Paul Kehrer
49965cc078
use the modern invocation for our sphinx rtd theme (#8243)
* use the modern invocation for our sphinx rtd theme

* works with sphinx6?
2023-02-08 14:19:35 +00:00
Alex Gaynor
64a5498901
document that inheritance is not the way (#8204)
resolves #8186
2023-02-03 07:21:32 -08:00
Mat
b467358344
add support for bytes-like objects in data and associated_data in aead algorithms (#8187)
* add support for bytes-like objects in data and associated_data in aead algorithms

* flake

* flake again

* rework AESSIV _check_params

* flake and 80char columns

* associated_data cannot be None in _check_params, set to [] in calling function

* Update src/cryptography/hazmat/primitives/ciphers/aead.py

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

* flake fix

---------

Co-authored-by: mat gas <none@none.com>
Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>
2023-02-02 13:56:49 +00:00
Alex Gaynor
ab5ffdc13a
update our security reporting instructions (#8171) 2023-01-31 02:57:19 +00:00
Paul Kehrer
957524e02e
add CRL vector with an inner/outer signature OID mismatch (#8163) 2023-01-29 22:00:59 +00:00
Alex Gaynor
5d3db676cf
Use the ruff 'pyupgrade' checks (#8104) 2023-01-20 05:36:01 +08:00
Paul Kehrer
361835d91c
test on jammy arm64 (and not focal) (#8101)
* test on jammy arm64 (and not focal)

* actually py310
2023-01-19 04:43:41 +00:00
Alex Gaynor
276b727165
Update installation.rst (#8067) 2023-01-15 05:07:31 +08:00
Alex Gaynor
cef402f921
fixes #8052 -- correct NameAttribute.value documentation (#8060) 2023-01-14 04:31:49 +08:00
Alex Gaynor
171bce1d3b
serial_number is not a function (#8061) 2023-01-14 04:31:00 +08:00
Paul Kehrer
db7dd61de3
Add Certificate.verify_signed_by (#8011)
* Add Certificate.verify_signed_by

Verify that the signature on a certificate was created by the
private key belonging to another certificate's public key.

This code does not validate anything else! It is not a path builder,
general x509 validator, etc.

* switch to issued_by

validate issuer subject matches certificate issuer and refactor

* two fixes

* signed_by isn't the right target now

* coverage

* skip test on some *ssls

* extensive refactoring

* lol

* does any of this work

* final commit i swear
2023-01-12 04:32:52 +00:00
Alex Gaynor
796ebf6702
fixes #8035 -- added a test for loading a cert with another PEM block containing headers (#8045) 2023-01-12 04:07:33 +00:00
Paul Kehrer
587eb98e7e
mismatched inner/outer signature algorithm x509 cert (#8038) 2023-01-10 22:00:35 -05:00
Paul Kehrer
17da400b65
deprecate the rest of DSA support for SSH (#8013)
* deprecate the rest of DSA support for SSH

* review comments
2023-01-09 01:14:00 +00:00
Paul Kehrer
5c48b8917a
more rigorously document that our verify methods return none (#8010)
they raise an exception!
2023-01-08 08:59:47 -05:00
Paul Kehrer
79937e9242
switch to using integers for valid_after/valid_before in SSH certs (#8007)
* switch to using integers for valid_after/valid_before in SSH certs

* i know this, it's a unix timestamp

* one more review nit
2023-01-08 03:29:05 +00:00
Paul Kehrer
2d99b89046
UNIX is a trademark, Unix is a category (#8008)
If I'm willing to be pedantic about Apple's Mac OS vs macOS vs OS X
vs Mac OS X I'm willing to die on this hill too
2023-01-08 03:19:27 +00:00
Paul Kehrer
1b4ad81ff3
SSHCertificateBuilder (#8004)
* SSHCertificateBuilder

This adds support for generating SSH certificates

* add deterministic signing tests and valid_for_all_principals

* test another edge

* one of these two fixes makes no sense
2023-01-08 01:08:22 +00:00