Commit graph

13161 commits

Author SHA1 Message Date
Alex Gaynor
9d2f41cfa2
fix test case, used wrong vector (#12405) 2025-02-05 20:35:32 -08:00
Alex Gaynor
3d4eb5f7a4
Added a test for RC2-CBC with an effectiveKeyLength (#12404)
* Added a test for RC2-CBC with an effectiveKeyLength

* Update docs/development/test-vectors.rst

Co-authored-by: Paul Kehrer <paul.l.kehrer@gmail.com>

---------

Co-authored-by: Paul Kehrer <paul.l.kehrer@gmail.com>
2025-02-06 00:52:22 +00:00
pyca-boringbot[bot]
5bfceabf06
Bump BoringSSL and/or OpenSSL in CI (#12403)
Co-authored-by: pyca-boringbot[bot] <pyca-boringbot[bot]+106132319@users.noreply.github.com>
2025-02-06 00:39:36 +00:00
Alex Gaynor
7fb6b880d7
Test cases for our new PKCS#8 test vectors (#12401) 2025-02-05 14:11:09 -08:00
Ivan Desiatov
4f9ca1c92c
PyPolicyDefinition and related Verifier API changes (#12390)
* Add PyPolicyDefinition, make accessible via verifiers.

* Add python Policy to x509.pyi

* Expose PyPolicyDefinition to Python.

* Rename PyPolicyDefinition to PyPolicy to match python name.

* `test_verification` uses `policy` property.

* Add additional PyPolicy tests.

* Add back direct getters on verifiers with deprecation warnings.

* Correct Policy.subject return type in x509.pyi

* Rename x509.verify.py_policy module to x509.verify.policy

* x509.verify uses mod.rs convention

* Use Optional<SubjectOwner> instead of adding None value to SubjectOwner.

* PyPolicy stores original subject + naming changes in Verifiers.
2025-02-05 12:46:43 -08:00
dependabot[bot]
594e745a13
chore(deps): bump mypy from 1.14.1 to 1.15.0 (#12400)
Bumps [mypy](https://github.com/python/mypy) from 1.14.1 to 1.15.0.
- [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/python/mypy/compare/v1.14.1...v1.15.0)

---
updated-dependencies:
- dependency-name: mypy
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-05 15:05:00 +00:00
dependabot[bot]
4b838f22e9
chore(deps): bump uv from 0.5.27 to 0.5.28 (#12399)
Bumps [uv](https://github.com/astral-sh/uv) from 0.5.27 to 0.5.28.
- [Release notes](https://github.com/astral-sh/uv/releases)
- [Changelog](https://github.com/astral-sh/uv/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/uv/compare/0.5.27...0.5.28)

---
updated-dependencies:
- dependency-name: uv
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-05 06:59:29 -08:00
dependabot[bot]
69c676436d
chore(deps): bump cc from 1.2.11 to 1.2.12 (#12398)
Bumps [cc](https://github.com/rust-lang/cc-rs) from 1.2.11 to 1.2.12.
- [Release notes](https://github.com/rust-lang/cc-rs/releases)
- [Changelog](https://github.com/rust-lang/cc-rs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.11...cc-v1.2.12)

---
updated-dependencies:
- dependency-name: cc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-05 06:58:55 -08:00
pyca-boringbot[bot]
9a778f4be8
Bump BoringSSL and/or OpenSSL in CI (#12397)
Co-authored-by: pyca-boringbot[bot] <pyca-boringbot[bot]+106132319@users.noreply.github.com>
2025-02-05 00:17:01 +00:00
Paul Kehrer
6377a5ec0b
add a bunch of pkcs8 test vectors (#12396)
* add a bunch of pkcs8 test vectors

these are encrypted PKCS8 keys for various parameters we haven't
explicitly tested in the past

* I hate the spellchecker so much
2025-02-04 23:57:42 +00:00
Alex Gaynor
dfe822b3dd
We need more cowbell^WOID (#12395) 2025-02-04 14:47:55 -08:00
dependabot[bot]
b8716fffa6
chore(deps): bump uv from 0.5.26 to 0.5.27 (#12394)
Bumps [uv](https://github.com/astral-sh/uv) from 0.5.26 to 0.5.27.
- [Release notes](https://github.com/astral-sh/uv/releases)
- [Changelog](https://github.com/astral-sh/uv/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/uv/compare/0.5.26...0.5.27)

---
updated-dependencies:
- dependency-name: uv
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-04 05:54:25 -08:00
Tanmay Ghai
938c6881d7
updated CertificateBuilder docs (#12386) 2025-02-04 02:33:18 +00:00
pyca-boringbot[bot]
e1153d7c55
Bump x509-limbo and/or wycheproof in CI (#12392)
Co-authored-by: pyca-boringbot[bot] <pyca-boringbot[bot]+106132319@users.noreply.github.com>
2025-02-03 18:25:19 -08:00
pyca-boringbot[bot]
5f77cd1a25
Bump BoringSSL and/or OpenSSL in CI (#12391)
Co-authored-by: pyca-boringbot[bot] <pyca-boringbot[bot]+106132319@users.noreply.github.com>
2025-02-03 18:25:02 -08:00
László Vaskó
d860aaa543
Remove conflicting name of rssassaPss OID (#12389)
The same OID is used as a signature algorithm and public key
algorithm, so they have to be defined twice, but they should be added
to `_OID_NAMES` only once.

Used the later introduced `rsassaPss` long name, instead of
`RSASSA-PSS` short name, as other algorithms also use long
names (i.e. `sha1WithRSAEncryption` instead of `RSA-SHA1`).

Resolves: #12388
2025-02-03 16:35:19 +00:00
Ivan Desiatov
a6d5311393
CryptoOps::PolicyExtra to allow passing user data inside a Policy. (#12387) 2025-02-03 07:53:08 -08:00
dependabot[bot]
116c5af19d
chore(deps): bump openssl from 0.10.69 to 0.10.70 (#12384)
Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.69 to 0.10.70.
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.69...openssl-v0.10.70)

---
updated-dependencies:
- dependency-name: openssl
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-02 20:24:18 +00:00
dependabot[bot]
d80033fff5
chore(deps): bump syn from 2.0.96 to 2.0.98 (#12383)
Bumps [syn](https://github.com/dtolnay/syn) from 2.0.96 to 2.0.98.
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/2.0.96...2.0.98)

---
updated-dependencies:
- dependency-name: syn
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-02 20:22:17 +00:00
Paul Kehrer
0ef7c1fa19
add XOFHash (#12380)
* add XOFHash

* refactors for comments

* use cfg_if

* fix docs, fix linting

* don't expose squeeze on unsupported things

* smaller strides

* ellipsis
2025-02-01 17:26:59 -08:00
Alex Gaynor
fd23bdac4f
Format all rust imports consistently (#12381) 2025-02-01 16:48:32 -08:00
Alex Gaynor
13a2e6f780
Turn openssl-sys into a workspace dep (#12379)
Annoyingly matching is done on the crate name, not the package name, so renaming a workspace dep doesn't work.
2025-02-01 13:02:26 -08:00
dependabot[bot]
098fe8789d
chore(deps): bump babel from 2.16.0 to 2.17.0 (#12377)
Bumps [babel](https://github.com/python-babel/babel) from 2.16.0 to 2.17.0.
- [Release notes](https://github.com/python-babel/babel/releases)
- [Changelog](https://github.com/python-babel/babel/blob/master/CHANGES.rst)
- [Commits](https://github.com/python-babel/babel/compare/v2.16.0...v2.17.0)

---
updated-dependencies:
- dependency-name: babel
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-01 17:20:00 +00:00
dependabot[bot]
c774223bbb
chore(deps): bump cc from 1.2.10 to 1.2.11 (#12376)
Bumps [cc](https://github.com/rust-lang/cc-rs) from 1.2.10 to 1.2.11.
- [Release notes](https://github.com/rust-lang/cc-rs/releases)
- [Changelog](https://github.com/rust-lang/cc-rs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.10...cc-v1.2.11)

---
updated-dependencies:
- dependency-name: cc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-01 17:17:12 +00:00
pyca-boringbot[bot]
b0169ecb4b
Bump BoringSSL and/or OpenSSL in CI (#12375)
Co-authored-by: pyca-boringbot[bot] <pyca-boringbot[bot]+106132319@users.noreply.github.com>
2025-01-31 20:44:19 -08:00
Alex Gaynor
aa531827c8
Added a utility for hex decoding (#12374) 2025-01-31 23:56:02 +00:00
Paul Kehrer
d20eea8809
raise ValueError if DH parameter numbers are invalid (#12373) 2025-01-31 23:34:21 +00:00
Alex Gaynor
9b59bb671e
Emit warnings on BER PKCS#7 and PKCS#12 (#12372)
* Emit warnings on BER PKCS#7 and PKCS#12

* Update src/rust/src/pkcs7.rs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-01-31 15:14:42 -08:00
Alex Gaynor
63a93bc0e6
Added PBKDF1, for use in #12296 (#12369) 2025-01-31 12:32:42 -08:00
Alex Gaynor
a2ce5b34ac
fix cache action (#12371)
the workspace config isn't needed now that we have cargo.toml in the base of the repo
2025-01-31 12:08:29 -08:00
Alex Gaynor
fe5f3a9217
Two more testscases for key loading (#12370)
* Two more testscases for key loading

* Update tests/hazmat/primitives/test_serialization.py

Co-authored-by: Paul Kehrer <paul.l.kehrer@gmail.com>

---------

Co-authored-by: Paul Kehrer <paul.l.kehrer@gmail.com>
2025-01-31 18:20:31 +00:00
dependabot[bot]
5baed58cdd
chore(deps): bump certifi from 2024.12.14 to 2025.1.31 (#12368)
Bumps [certifi](https://github.com/certifi/python-certifi) from 2024.12.14 to 2025.1.31.
- [Commits](https://github.com/certifi/python-certifi/compare/2024.12.14...2025.01.31)

---
updated-dependencies:
- dependency-name: certifi
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-31 06:41:20 -08:00
dependabot[bot]
561f9bf6b3
chore(deps): bump ruff from 0.9.3 to 0.9.4 (#12367)
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.9.3 to 0.9.4.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/0.9.3...0.9.4)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-31 06:41:02 -08:00
dependabot[bot]
d4e395c78e
chore(deps): bump uv from 0.5.25 to 0.5.26 (#12366)
Bumps [uv](https://github.com/astral-sh/uv) from 0.5.25 to 0.5.26.
- [Release notes](https://github.com/astral-sh/uv/releases)
- [Changelog](https://github.com/astral-sh/uv/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/uv/compare/0.5.25...0.5.26)

---
updated-dependencies:
- dependency-name: uv
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-31 06:40:47 -08:00
Alex Gaynor
26a4ee8f6d
fixes #10247 -- clarify negative serial number warning (#12365) 2025-01-30 18:28:10 -08:00
ohemorange
3b689cedb1
Update reference.rst:load_der_x509_certificate to note ValueError raised (#12364)
* Update reference.rst:load_der_x509_certificate to note error raised

It raises the error and therefore should be noted in the documentation.

```
>>> x509.load_der_x509_certificate(b64.b64decode("foobar".encode()))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: error parsing asn1 value: ParseError { kind: InvalidLength }
```

* Update docs/x509/reference.rst

Thanks!

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

---------

Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>
2025-01-30 02:59:28 +00:00
pyca-boringbot[bot]
fac5a99129
Bump BoringSSL and/or OpenSSL in CI (#12363)
Co-authored-by: pyca-boringbot[bot] <pyca-boringbot[bot]+106132319@users.noreply.github.com>
2025-01-30 00:16:42 +00:00
Alex Gaynor
11b15a309f
fixes #10808 -- allow empty plaintexts for aes-gcm-siv (#12355)
* fixes #10808 -- allow empty plaintexts for aes-gcm-siv

* Update src/rust/build.rs

Co-authored-by: Nick Pope <nick@nickpope.me.uk>

---------

Co-authored-by: Nick Pope <nick@nickpope.me.uk>
2025-01-29 12:21:40 -08:00
dependabot[bot]
ad537914d5
chore(deps): bump uv from 0.5.24 to 0.5.25 (#12358)
Bumps [uv](https://github.com/astral-sh/uv) from 0.5.24 to 0.5.25.
- [Release notes](https://github.com/astral-sh/uv/releases)
- [Changelog](https://github.com/astral-sh/uv/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/uv/compare/0.5.24...0.5.25)

---
updated-dependencies:
- dependency-name: uv
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-29 07:38:34 -05:00
pyca-boringbot[bot]
b0b6c8d5f2
Bump x509-limbo and/or wycheproof in CI (#12357)
Co-authored-by: pyca-boringbot[bot] <pyca-boringbot[bot]+106132319@users.noreply.github.com>
2025-01-28 20:48:05 -05:00
pyca-boringbot[bot]
aad6a0a2c9
Bump BoringSSL and/or OpenSSL in CI (#12356)
Co-authored-by: pyca-boringbot[bot] <pyca-boringbot[bot]+106132319@users.noreply.github.com>
2025-01-28 20:47:52 -05:00
pyca-boringbot[bot]
25161ff1d9
Bump BoringSSL and/or OpenSSL in CI (#12354)
Co-authored-by: pyca-boringbot[bot] <pyca-boringbot[bot]+106132319@users.noreply.github.com>
2025-01-28 20:23:30 +00:00
dependabot[bot]
fd74350495
chore(deps): bump actions/setup-python from 5.3.0 to 5.4.0 (#12352)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5.3.0 to 5.4.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](0b93645e9f...42375524e2)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-28 08:14:56 -05:00
dependabot[bot]
c2428ebf96
chore(deps): bump unicode-ident from 1.0.15 to 1.0.16 (#12353)
Bumps [unicode-ident](https://github.com/dtolnay/unicode-ident) from 1.0.15 to 1.0.16.
- [Release notes](https://github.com/dtolnay/unicode-ident/releases)
- [Commits](https://github.com/dtolnay/unicode-ident/compare/1.0.15...1.0.16)

---
updated-dependencies:
- dependency-name: unicode-ident
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-28 13:12:46 +00:00
pyca-boringbot[bot]
ff429b5cc5
Bump x509-limbo and/or wycheproof in CI (#12351)
Co-authored-by: pyca-boringbot[bot] <pyca-boringbot[bot]+106132319@users.noreply.github.com>
2025-01-28 00:35:23 +00:00
pyca-boringbot[bot]
55a0ceaf51
Bump BoringSSL and/or OpenSSL in CI (#12350)
Co-authored-by: pyca-boringbot[bot] <pyca-boringbot[bot]+106132319@users.noreply.github.com>
2025-01-28 00:18:57 +00:00
Alex Gaynor
cf55513de0
Added OID for 3DES-EDE-CBC (#12349) 2025-01-27 14:50:17 +00:00
Alex Gaynor
535f134411
Extract ec_params_to_group from SPKI parsing (#12348)
To be used in #12296
2025-01-27 06:43:17 -08:00
Alex Gaynor
ad65dc5231
Provide a password for encryption tests (#12347)
It's never used, because of malformations, but provide one.
2025-01-27 06:39:53 -08:00
Alex Gaynor
f0ca2140a9
Use workspace openssl version everywhere (#12346) 2025-01-27 06:39:00 -08:00