summaryrefslogtreecommitdiff
path: root/src/cryptography/hazmat/primitives/serialization/base.py
Commit message (Collapse)AuthorAgeFilesLines
* Use from __future__ import annotations everywhere (#8643)Alex Gaynor2023-03-311-2/+3
|
* Make Union type aliases a documented public API (#8168)Marti Raudsepp2023-03-071-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* add unsafe_skip_rsa_key_validation (#7667)Paul Kehrer2022-10-031-2/+10
| | | | | | | | | | | | | | | | | | | * add unsafe_skip_rsa_key_validation This allows users to skip RSA key validation when calling load_pem_private_key, load_der_private_key, and RSAPrivateNumbers.private_key. This is a significant performance improvement but is **only safe if you know the key is valid**. If you use this when the key is invalid OpenSSL makes no guarantees about what might happen. Infinite loops, crashes, and all manner of terrible things become possible if that occurs. Beware, beware, beware. * Apply suggestions from code review Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com> * remove unneeded variable Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>
* deprecate backend part 10 of n (#6529)Paul Kehrer2021-11-031-20/+24
|
* make PRIVATE/PUBLIC_KEY_TYPES a public API (#6001)Mathias Ertl2021-04-241-8/+8
|
* more typing (#5887)Paul Kehrer2021-03-021-6/+19
| | | | | | | | | | | * backend typing for twofactor package and more otp work * even more typing * style fixes * no generic typing for _get_backend * remove unneeded typing
* fixed a circular import error (due to type hints) (#5800)Alex Gaynor2021-02-091-2/+2
| | | | fixes #5794 closes #5795
* dsa type hinting (#5726)Paul Kehrer2021-01-311-47/+0
|
* type updates from turning on unchecked-defs on tests (#5720)Paul Kehrer2021-01-311-1/+4
| | | test changes themselves will be in a separate PR
* add serialization type hinting (#5718)Paul Kehrer2021-01-301-12/+16
| | | | | | | | | * add serialization type hinting * reorganize to prevent circular dependency * review feedback * damn you black
* Complete removal of py2 (#5533)Alex Gaynor2020-12-091-4/+1
| | | | | * Drop Python 2 * Black everything
* Remove __future__ import from our code (#5610)Alex Gaynor2020-12-091-1/+0
|
* PKCS7SignatureBuilder now supports three serializations (#5497)Paul Kehrer2020-10-241-0/+1
| | | | | | | | * PKCS7SignatureBuilder now supports three serializations PEM, DER, and SMIME. SMIME embeds the S/MIME headers and has the detached signature concept. * thanks libre
* make backend optional in serialization (#5392)Paul Kehrer2020-08-151-6/+13
|
* Support OpenSSH private key serialization format (#5146)Marko Kreen2020-06-201-0/+1
| | | | | | | | | * 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
* add support for encoding compressed points (#4638)Paul Kehrer2019-01-201-0/+3
| | | | | | * add support for encoding compressed points * review feedback
* support x448 public/private serialization both raw and pkcs8 (#4653)Paul Kehrer2019-01-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * support x448 public/private serialization both raw and pkcs8 * add tests for all other asym key types to prevent Raw * more tests * better tests * fix a test * funny story, I'm actually illiterate. * pep8 * require PrivateFormat.Raw or PublicFormat.Raw with Encoding.Raw * missing docs * parametrize * docs fixes * remove dupe line * assert something
* Move SSH serialization to it's own file (#4607)Alex Gaynor2018-11-241-133/+0
| | | | | | * Move SSH serialization to it's own file * flake8
* refactor serialization module into package (#4606)Paul Kehrer2018-11-231-0/+209
* refactor serialization into a package so we can add a pkcs12 module * oops