summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Converted DER parsing of SPKIs to rust (#5963)Alex Gaynor2021-04-114-28/+35
|
* Port a tiny tiny bit of the ASN.1 parsing to Rust (#5357)Alex Gaynor2021-04-115-17/+135
|
* Bump syn from 1.0.68 to 1.0.69 in /src/rust (#5957)dependabot[bot]2021-04-081-2/+2
| | | | | | | | | Bumps [syn](https://github.com/dtolnay/syn) from 1.0.68 to 1.0.69. - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](https://github.com/dtolnay/syn/compare/1.0.68...1.0.69) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump libc from 0.2.92 to 0.2.93 in /src/rust (#5955)dependabot[bot]2021-04-071-2/+2
| | | | | | | | | Bumps [libc](https://github.com/rust-lang/libc) from 0.2.92 to 0.2.93. - [Release notes](https://github.com/rust-lang/libc/releases) - [Commits](https://github.com/rust-lang/libc/compare/0.2.92...0.2.93) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump lock_api from 0.4.2 to 0.4.3 in /src/rust (#5953)dependabot[bot]2021-04-051-2/+2
| | | | | | | | | | Bumps [lock_api](https://github.com/Amanieu/parking_lot) from 0.4.2 to 0.4.3. - [Release notes](https://github.com/Amanieu/parking_lot/releases) - [Changelog](https://github.com/Amanieu/parking_lot/blob/master/CHANGELOG.md) - [Commits](https://github.com/Amanieu/parking_lot/compare/lock_api-0.4.2...lock_api-0.4.3) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump syn from 1.0.67 to 1.0.68 in /src/rust (#5949)dependabot[bot]2021-04-031-4/+4
| | | | | | | | | Bumps [syn](https://github.com/dtolnay/syn) from 1.0.67 to 1.0.68. - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](https://github.com/dtolnay/syn/compare/1.0.67...1.0.68) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Update annotation for key (#5951)Sam Bull2021-04-031-1/+5
| | | | | | | * Update annotation for key * Update fernet.py * Update fernet.py
* Bump libc from 0.2.91 to 0.2.92 in /src/rust (#5946)dependabot[bot]2021-03-311-2/+2
| | | | | | | | | Bumps [libc](https://github.com/rust-lang/libc) from 0.2.91 to 0.2.92. - [Release notes](https://github.com/rust-lang/libc/releases) - [Commits](https://github.com/rust-lang/libc/compare/0.2.91...0.2.92) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump syn from 1.0.64 to 1.0.67 in /src/rust (#5940)dependabot[bot]2021-03-301-2/+2
| | | | | | | | | Bumps [syn](https://github.com/dtolnay/syn) from 1.0.64 to 1.0.67. - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](https://github.com/dtolnay/syn/compare/1.0.64...1.0.67) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump libc from 0.2.90 to 0.2.91 in /src/rust (#5929)dependabot[bot]2021-03-231-2/+2
| | | | | | | | | Bumps [libc](https://github.com/rust-lang/libc) from 0.2.90 to 0.2.91. - [Release notes](https://github.com/rust-lang/libc/releases) - [Commits](https://github.com/rust-lang/libc/compare/0.2.90...0.2.91) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump ctor from 0.1.19 to 0.1.20 in /src/rust (#5930)dependabot[bot]2021-03-231-2/+2
| | | | | | | | | Bumps [ctor](https://github.com/mmastrac/rust-ctor) from 0.1.19 to 0.1.20. - [Release notes](https://github.com/mmastrac/rust-ctor/releases) - [Commits](https://github.com/mmastrac/rust-ctor/commits) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* fix XTS less than one block length. fixes #5885 (#5925)Paul Kehrer2021-03-211-1/+7
| | | | | * fix XTS less than one block length. fixes #5885 * make XTS test key happy
* make get_extension_for_class a generic function (#5923)Mathias Ertl2021-03-201-2/+2
|
* Bump libc from 0.2.89 to 0.2.90 in /src/rust (#5922)dependabot[bot]2021-03-191-2/+2
| | | | | | | | | Bumps [libc](https://github.com/rust-lang/libc) from 0.2.89 to 0.2.90. - [Release notes](https://github.com/rust-lang/libc/releases) - [Commits](https://github.com/rust-lang/libc/compare/0.2.89...0.2.90) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump libc from 0.2.88 to 0.2.89 in /src/rust (#5917)dependabot[bot]2021-03-161-2/+2
| | | | | | | | | Bumps [libc](https://github.com/rust-lang/libc) from 0.2.88 to 0.2.89. - [Release notes](https://github.com/rust-lang/libc/releases) - [Commits](https://github.com/rust-lang/libc/compare/0.2.88...0.2.89) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* typehint x509.base (#5899)Mathias Ertl2021-03-154-31/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * start typing x509.base * statically type x509.base * typehint X509Backend interface * typehint at least the X509Backend interface * make _CertificateRevocationList/_CertificateSigningRequest actual subclasses of the interface (as done before for Certificate in f16bff2cb) * tell mypy to ignore lines with deliberately wrong types * signature_hash_algorithm always returns a hash algorithm (it's not optional) * Revert "signature_hash_algorithm always returns a hash algorithm (it's not optional)" This reverts commit f6a5b172b416f8ddea561203c0cf03b55e4ec50e. * hash algorithm is actually optional * fix import style * typehint parsed_version to int, which it de facto always is * minimize changes * break import cycle with conditional imports * ignore access to private members of openssl implementation * reformat code with Black * test check for missing public key
* Bump syn from 1.0.63 to 1.0.64 in /src/rust (#5915)dependabot[bot]2021-03-151-2/+2
| | | | | | | | | Bumps [syn](https://github.com/dtolnay/syn) from 1.0.63 to 1.0.64. - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](https://github.com/dtolnay/syn/compare/1.0.63...1.0.64) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Typehint x509.base (only) (#5904)Mathias Ertl2021-03-112-23/+54
| | | | | | | | | | | | | | | | | * typehint x509.base * cast extension class * don't use string in typecast * use lists as default argument values (see #5904) * restore import since this is now re-exported * ignore linting errors * empty commit to trigger github actions * fix formatting issue
* Bump syn from 1.0.62 to 1.0.63 in /src/rust (#5909)dependabot[bot]2021-03-111-2/+2
| | | | | | | | | Bumps [syn](https://github.com/dtolnay/syn) from 1.0.62 to 1.0.63. - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](https://github.com/dtolnay/syn/compare/1.0.62...1.0.63) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump syn from 1.0.61 to 1.0.62 in /src/rust (#5903)dependabot[bot]2021-03-081-2/+2
| | | | | | | | | Bumps [syn](https://github.com/dtolnay/syn) from 1.0.61 to 1.0.62. - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](https://github.com/dtolnay/syn/compare/1.0.61...1.0.62) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump libc from 0.2.87 to 0.2.88 in /src/rust (#5902)dependabot[bot]2021-03-081-2/+2
| | | | | | | | | Bumps [libc](https://github.com/rust-lang/libc) from 0.2.87 to 0.2.88. - [Release notes](https://github.com/rust-lang/libc/releases) - [Commits](https://github.com/rust-lang/libc/compare/0.2.87...0.2.88) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bugfix/issue 5889 typehint get values for types (#5900)Mathias Ertl2021-03-073-34/+258
| | | | | | | | | | | | | | | | | | | | | * add type alias for IP addresses * Re-export module attributes in cryptography.x509.oid Without exporting attributes via `__all__` mypy will consider typehints of classes imported from `cryptography.x509.oid` as type Any. Example: from cryptography.x509.oid import ObjectIdentifier oid = ObjectIdentifier("1.2.3") # Any, if we do not re-export Note that while the canonical location of ObjectIdentifier is in `crytography.x509`, it is imported many times from `crytography.x509.oid` instead * add return type annotiations to constructors * overload GeneralNames.get_values_for_type * overload all implementations
* Generic extension value/typehint x509.Name (#5897)Mathias Ertl2021-03-062-4/+22
| | | | | | | * make value property return the generic value * typehint x509.Name * also ignore overloaded functions
* Bump syn from 1.0.60 to 1.0.61 in /src/rust (#5895)dependabot[bot]2021-03-051-2/+2
| | | | | | | | | Bumps [syn](https://github.com/dtolnay/syn) from 1.0.60 to 1.0.61. - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](https://github.com/dtolnay/syn/compare/1.0.60...1.0.61) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump libc from 0.2.86 to 0.2.87 in /src/rust (#5891)dependabot[bot]2021-03-031-2/+2
| | | | | | | | | Bumps [libc](https://github.com/rust-lang/libc) from 0.2.86 to 0.2.87. - [Release notes](https://github.com/rust-lang/libc/releases) - [Commits](https://github.com/rust-lang/libc/compare/0.2.86...0.2.87) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* more typing (#5887)Paul Kehrer2021-03-0234-154/+326
| | | | | | | | | | | * backend typing for twofactor package and more otp work * even more typing * style fixes * no generic typing for _get_backend * remove unneeded typing
* Delete unused register_interface_if (#5883)Alex Gaynor2021-03-011-10/+0
|
* changes to support typing backend (#5882)Paul Kehrer2021-02-282-16/+24
| | | this gets rid of the conditional backend type registration
* keep on typing (#5881)Paul Kehrer2021-02-283-40/+33
| | | | | * keep on typing * swear i did this
* fix pkcs12 parse ordering. fixes #5872 (#5879)Paul Kehrer2021-02-281-4/+4
| | | | | | | | | | | | | | | | | * fix pkcs12 parse ordering. fixes #5872 * remove an unneeded print * simplify the test a bit more * index * black * Update tests/hazmat/primitives/test_pkcs12.py Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com> Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>
* Add SM4 symmetric block cipher (#5834)tobyp2021-02-282-0/+18
| | | Co-authored-by: Tobias Peter <tobias.peter@infineon.com>
* Add SM3 hash algorithm (#5833)tobyp2021-02-281-0/+6
| | | Co-authored-by: Tobias Peter <tobias.peter@infineon.com>
* Type a bunch of random functions (#5875)Alex Gaynor2021-02-273-15/+23
|
* Annotate asymetric contexts (#5874)Alex Gaynor2021-02-271-4/+4
|
* consistently typecast to list (#5873)Mathias Ertl2021-02-271-3/+6
|
* Strict typehints for extensions and OIDs (#5870)Mathias Ertl2021-02-272-224/+263
| | | | | | | | | | | | | | | | | | | | | | | | | * add typehint for name * strictly type ObjectIdentifier * explicit reexport for mypy * type (most) of extensions.py * minor cleanup * more consistently return None in constructors * revert explicit reexport, as requested * use _make_sequence_methods for now (#5870) * mark oid as normal type-hinted property so that classes can access it * fix spelling (upper case) use short form for reference * annotate as ClassVar * add type ignore for special extension class
* Remove unused X509 verification flags bindings (#5868)David Benjamin2021-02-262-40/+0
| | | | These don't appear to be used in pyopenssl or cryptography.io. One less source of conditionals.
* Convert unpadding code to Rust (#5668)Alex Gaynor2021-02-215-105/+90
|
* add typehint for name (#5856)Mathias Ertl2021-02-211-1/+1
|
* Add key_identifier property to SubjectKeyIdentifier (#5849)Arnaud Durand2021-02-211-0/+4
| | | Fix #5848
* make Extension a generic class (fixes #5830) (#5831)Mathias Ertl2021-02-202-6/+11
|
* Fix typo in error messages: can not => cannot (#5851)Robert Martin2021-02-203-3/+3
|
* protect against integer overfows in release rust (#5836)Alex Gaynor2021-02-161-0/+1
| | | this would have categorically prevented CVE-2020-36242
* add typehints for read only properties (#5826)Mathias Ertl2021-02-1510-86/+252
| | | | | | | | | | | | | | | | | | | | | | | | | | | * add typehints for read only properties * fix typing in test cases * fix last missing assertion * add typehints to all read_only_properties where type hints are already available * check for isnot None instead, as per PR suggestion * convert read_only_property to @property decorators * remove unused import * use List instead of Iterable for return values * use @property instead of read_only_property * fix type errors * remove last occurance of annotated read_only_property * use is not None check (works because we now return list) * fix unused import
* Bump redox_syscall from 0.2.4 to 0.2.5 in /src/rust (#5832)dependabot[bot]2021-02-151-2/+2
| | | | | | | Bumps redox_syscall from 0.2.4 to 0.2.5. Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump pyo3 and lower MSRV (#5823)Alex Gaynor2021-02-131-16/+58
|
* Start replacing read_only_property with dedicated functions (#5824)Alex Gaynor2021-02-135-35/+38
| | | read_only_property is basically impossible for mypy to check
* change to a new version scheme (#5825)Alex Gaynor2021-02-131-1/+1
| | | | | | | | | | | | | * change to a new version scheme fixes #5801 * Update docs/api-stability.rst Co-authored-by: Paul Kehrer <paul.l.kehrer@gmail.com> * line length Co-authored-by: Paul Kehrer <paul.l.kehrer@gmail.com>
* part 2 of typing x509 extensions (#5815)Alex Gaynor2021-02-112-31/+68
|
* Start typing a bunch of stuff from x509 extensions (#5812)masterAlex Gaynor2021-02-112-36/+45
|