Commit graph

11448 commits

Author SHA1 Message Date
Paul Kehrer
761ef4b955
bump for 42.0.8 release (#11072)
* bump for 42.0.8 release

* backport insanity

* oh right

* oops
2024-06-04 15:28:45 -04:00
Alex Gaynor
0cc7fc3843
Prepare for 42.0.7 release (#10949)
* Prepare for 42.0.7 release

* Fix build with Rust nightly (#10936)

* Extra cfg
2024-05-06 09:37:54 -07:00
Alex Gaynor
cfad00478a
Prepare backports for 42.0.6 release (#10929)
* Upgrade openssl package for libressl 3.9.1 support

* Ensure a good error message when cffi module fails to import

* CHANGELOG

* Bump version for 42.0.6 release

* It's not FIPS anymore

* Resolve new clippy warnings (#10755)

The fixes themselves are of marginal value 🙃

* fix warning from latest nightly rust (#10486)

* fix warning from latest nightly rust

* Update lib.rs
2024-05-04 08:09:40 -07:00
Alex Gaynor
33833f031d
Release 42.0.5 (#10470) 2024-02-24 01:03:55 +00:00
Alex Gaynor
4be53bf20c
Added a budget for NC checks to protect against DoS (#10467) (#10468) 2024-02-24 00:40:59 +00:00
Paul Kehrer
8e9de309f8
Bump pyo3 from 0.20.2 to 0.20.3 in /src/rust (#10462) (#10465)
Bumps [pyo3](https://github.com/pyo3/pyo3) from 0.20.2 to 0.20.3.
- [Release notes](https://github.com/pyo3/pyo3/releases)
- [Changelog](https://github.com/PyO3/pyo3/blob/v0.20.3/CHANGELOG.md)
- [Commits](https://github.com/pyo3/pyo3/compare/v0.20.2...v0.20.3)

---
updated-dependencies:
- dependency-name: pyo3
  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>
2024-02-23 18:21:03 +00:00
Alex Gaynor
fe18470f7d
Bump for 42.0.4 release (#10445) 2024-02-20 20:48:23 -06:00
Alex Gaynor
aaa2dd06ed
Fix ASN.1 issues in PKCS#7 and S/MIME signing (#10373) (#10442)
* Fix ASN.1 for S/MIME capabilities.

The current implementation defines the SMIMECapabilities attribute
so that its value is a SEQUENCE of all the algorithm OIDs that are
supported.
However, the S/MIME v3 spec (RFC 2633) specifies that each algorithm
should be specified in its own SEQUENCE:

SMIMECapabilities ::= SEQUENCE OF SMIMECapability

SMIMECapability ::= SEQUENCE {
   capabilityID OBJECT IDENTIFIER,
   parameters ANY DEFINED BY capabilityID OPTIONAL }

(RFC 2633, Appendix A)

This commit changes the implementation so that each algorithm
is inside its own SEQUENCE. This also matches the OpenSSL
implementation.

* Fix the RSA OID used for signing PKCS#7/SMIME

The current implementation computes the algorithm identifier used
in the `digest_encryption_algorithm` PKCS#7 field
(or `SignatureAlgorithmIdentifier` in S/MIME) based on both the
algorithm used to sign (e.g. RSA) and the digest algorithm (e.g. SHA512).

This is correct for ECDSA signatures, where the OIDs used include the
digest algorithm (e.g: ecdsa-with-SHA512). However, due to historical
reasons, when signing with RSA the OID specified should be the one
corresponding to just RSA ("1.2.840.113549.1.1.1" rsaEncryption),
rather than OIDs which also include the digest algorithm (such as
"1.2.840.113549.1.1.13", sha512WithRSAEncryption).

This means that the logic to compute the algorithm identifier is the
same except when signing with RSA, in which case the OID will always
be `rsaEncryption`. This is consistent with the OpenSSL implementation,
and the RFCs that define PKCS#7 and S/MIME.

See RFC 3851 (section 2.2), and RFC 3370 (section 3.2) for more details.

* Add tests for the changes in PKCS7 signing

* PKCS7 fixes from code review

* Update CHANGELOG

Co-authored-by: Facundo Tuesca <facundo.tuesca@trailofbits.com>
2024-02-20 19:53:59 -06:00
Alex Gaynor
7a4d012991
Fixes #10422 -- don't crash when a PKCS#12 key and cert don't match (#10423) (#10425) 2024-02-19 17:09:10 +00:00
Paul Kehrer
df314bb182
backport actions m1 switch to 42.0.x (#10415)
* Check to see if we can use the hosted M1 runners (#10340)

* Stop pretending to be x64 on M1 in CI (#10341)

---------

Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>
2024-02-18 05:20:20 +00:00
Paul Kehrer
c49a7a5271
changelog and version bump for 42.0.3 (#10396) 2024-02-15 22:41:19 -05:00
Paul Kehrer
396bcf64c5
fix provider loading take two (#10390) (#10395)
we previously hoisted this into rust, but we used the try_load feature
which supposedly retains fallbacks. Something about that doesn't behave
the way we expect though and the machinery in providers is sufficiently
complex that we are just going to load the default provider explicitly.

this matches our behavior pre-rust.
2024-02-16 03:01:07 +00:00
Paul Kehrer
0e0e46f5f7
backport: initialize openssl's legacy provider in rust (#10323) (#10333)
* initialize openssl's legacy provider in rust (#10323)

* initialize openssl's legacy provider in rust

as we oxidize we need to do this here to ensure it actually happens

* alex is a comment format pedant

* remove the memleak tests (#10322)

they are fragile, haven't caught regressions, and increasingly pointless
as we oxidize.
2024-02-03 15:02:48 -05:00
Paul Kehrer
2202123b50
changelog and version bump 42.0.2 (#10268) 2024-01-30 17:16:58 +00:00
Paul Kehrer
f7032bdd40
bump openssl in CI (#10298) (#10299) 2024-01-30 17:05:07 +00:00
Alex Gaynor
002e886f16
Fixes #10294 -- correct accidental change to exchange kwarg (#10295) (#10296) 2024-01-30 04:41:28 +00:00
Paul Kehrer
92fa9f2f60
support bytes-like consistently across our asym sign/verify APIs (#10260) (#10265)
and update our docs to show it as well
2024-01-26 11:48:45 -05:00
Paul Kehrer
6478f7e28b
explicitly support bytes-like for signature/data in RSA sign/verify (#10259) (#10261)
this was never documented but previously worked in <42. we now also
document that this is supported to confuse ourselves less.
2024-01-25 21:09:56 +00:00
Paul Kehrer
4bb8596ae0
fix the release script (#10233) (#10254)
we removed version as an arg, but didn't remove it from the click decorator
2024-01-25 02:45:39 +00:00
Paul Kehrer
337437dc2e
42.0.1 bump (#10252)
* 42.0.1 bump

* Update CHANGELOG.rst

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

---------

Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>
2024-01-24 21:25:05 -05:00
Paul Kehrer
56255de6b2
allow SPKI RSA keys to be parsed even if they have an incorrect delimiter (#10248) (#10251)
* allow SPKI RSA keys to be parsed even if they have an incorrect delimiter

This allows RSA SPKI keys (typically delimited with PUBLIC KEY) to be parsed
even if they are using the RSA PUBLIC KEY delimiter.

* formatting

* use original error if nothing parses, don't let it parse non-RSA
2024-01-25 02:02:37 +00:00
Paul Kehrer
12f038b38a
fixes #10237 -- correct EC sign parameter name (#10239) (#10240)
Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>
2024-01-23 07:43:30 -05:00
Paul Kehrer
4e64baf360
42.0.0 version bump (#10232) 2024-01-22 20:05:18 -05:00
Paul Kehrer
7cb13a3bc9
we'll ship 3.2.0 for 42 (#9951)
* we'll ship 3.2.0 for 42

* invalidate the caches, sigh
2024-01-23 00:45:02 +00:00
pyca-boringbot[bot]
605c74e41c
Bump x509-limbo and/or wycheproof in CI (#10231)
Co-authored-by: pyca-boringbot[bot] <pyca-boringbot[bot]+106132319@users.noreply.github.com>
2024-01-23 00:31:24 +00:00
pyca-boringbot[bot]
97578b98ff
Bump BoringSSL and/or OpenSSL in CI (#10230)
Co-authored-by: pyca-boringbot[bot] <pyca-boringbot[bot]+106132319@users.noreply.github.com>
2024-01-23 00:17:25 +00:00
William Woodruff
972a7b5896
verification: add test_verify_tz_aware (#10229)
* verification: add test_verify_tz_aware

Signed-off-by: William Woodruff <william@trailofbits.com>

* py_to_datetime handles tzinfo, add test

Signed-off-by: William Woodruff <william@trailofbits.com>

* Update src/rust/src/x509/common.rs

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

* x509/common: coverage for the coverage god

Signed-off-by: William Woodruff <william@trailofbits.com>

---------

Signed-off-by: William Woodruff <william@trailofbits.com>
Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>
2024-01-22 22:14:50 +00:00
Facundo Tuesca
41daf2d86d
Migrate PKCS7 backend to Rust (#10228)
* Migrate PKCS7 backend to Rust

* Disable PKCS7 functions under BoringSSL

* Misc PKCS7 fixes
2024-01-22 21:22:05 +00:00
Alex Gaynor
d54093e62e
Remove some skips in tests that aren't needed anymore (#10223) 2024-01-22 07:07:53 -06:00
Alex Gaynor
71929bd91f
Remove binding that's not used anymore (#10224) 2024-01-22 07:01:37 -06:00
Alex Gaynor
7ea4b89cea
fixed formatting in changelog (#10225) 2024-01-22 07:01:14 -06:00
Alex Gaynor
410f4a1ee4
Allow brainpool on libressl (#10222) 2024-01-21 15:25:00 -03:00
Alex Gaynor
6b4a4de78a
Migrate SPKI parsing from OpenSSL to Rust (#10121) 2024-01-21 15:11:17 -03:00
Alex Gaynor
2c56719281
Reduce the amount of data that needs to be hashed to check if a cert is in a trust store (#10218) 2024-01-21 07:45:27 -03:00
Alex Gaynor
8d3b4b57bf
Avoid allocating a Vec -- directly create a list (#10217) 2024-01-21 07:40:11 -03:00
Alex Gaynor
39e3011170
Remove unused test utility (#10216) 2024-01-21 07:39:18 -03:00
Alex Gaynor
742267b159
bump bitflags (#10219) 2024-01-21 07:38:30 -03:00
dependabot[bot]
aaad6cbd33
Bump dnspython from 2.4.2 to 2.5.0 in /.github/requirements (#10221)
Bumps [dnspython](https://github.com/rthalley/dnspython) from 2.4.2 to 2.5.0.
- [Release notes](https://github.com/rthalley/dnspython/releases)
- [Changelog](https://github.com/rthalley/dnspython/blob/master/doc/whatsnew.rst)
- [Commits](https://github.com/rthalley/dnspython/compare/v2.4.2...v2.5.0)

---
updated-dependencies:
- dependency-name: dnspython
  dependency-type: indirect
  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>
2024-01-20 23:44:12 -05:00
dependabot[bot]
75d81bb882
Bump proc-macro2 from 1.0.76 to 1.0.78 in /src/rust (#10220)
Bumps [proc-macro2](https://github.com/dtolnay/proc-macro2) from 1.0.76 to 1.0.78.
- [Release notes](https://github.com/dtolnay/proc-macro2/releases)
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.76...1.0.78)

---
updated-dependencies:
- dependency-name: proc-macro2
  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>
2024-01-21 04:34:55 +00:00
dependabot[bot]
d6ddd41dcf
Bump openssl from 0.10.62 to 0.10.63 in /src/rust (#10215)
Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.62 to 0.10.63.
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.62...openssl-v0.10.63)

---
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>
2024-01-20 00:19:59 +00:00
pyca-boringbot[bot]
663492e4f0
Bump BoringSSL and/or OpenSSL in CI (#10214)
Co-authored-by: pyca-boringbot[bot] <pyca-boringbot[bot]+106132319@users.noreply.github.com>
2024-01-20 00:15:19 +00:00
dependabot[bot]
a5973d1453
Bump openssl-sys from 0.9.98 to 0.9.99 in /src/rust (#10213)
Bumps [openssl-sys](https://github.com/sfackler/rust-openssl) from 0.9.98 to 0.9.99.
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-sys-v0.9.98...openssl-sys-v0.9.99)

---
updated-dependencies:
- dependency-name: openssl-sys
  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>
2024-01-20 00:10:22 +00:00
dependabot[bot]
35dedf46d9
Bump ruff from 0.1.13 to 0.1.14 (#10212)
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.1.13 to 0.1.14.
- [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/v0.1.13...v0.1.14)

---
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>
2024-01-19 23:09:31 +00:00
dependabot[bot]
74273aba09
Bump markupsafe from 2.1.3 to 2.1.4 (#10211)
Bumps [markupsafe](https://github.com/pallets/markupsafe) from 2.1.3 to 2.1.4.
- [Release notes](https://github.com/pallets/markupsafe/releases)
- [Changelog](https://github.com/pallets/markupsafe/blob/2.1.4/CHANGES.rst)
- [Commits](https://github.com/pallets/markupsafe/compare/2.1.3...2.1.4)

---
updated-dependencies:
- dependency-name: markupsafe
  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>
2024-01-19 23:07:17 +00:00
dependabot[bot]
23acc7f8df
Bump smallvec from 1.13.0 to 1.13.1 in /src/rust (#10210)
Bumps [smallvec](https://github.com/servo/rust-smallvec) from 1.13.0 to 1.13.1.
- [Release notes](https://github.com/servo/rust-smallvec/releases)
- [Commits](https://github.com/servo/rust-smallvec/compare/v1.13.0...v1.13.1)

---
updated-dependencies:
- dependency-name: smallvec
  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>
2024-01-19 23:04:44 +00:00
dependabot[bot]
a65879560e
Bump smallvec from 1.12.0 to 1.13.0 in /src/rust (#10206)
Bumps [smallvec](https://github.com/servo/rust-smallvec) from 1.12.0 to 1.13.0.
- [Release notes](https://github.com/servo/rust-smallvec/releases)
- [Commits](https://github.com/servo/rust-smallvec/compare/v1.12.0...v1.13.0)

---
updated-dependencies:
- dependency-name: smallvec
  dependency-type: indirect
  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>
2024-01-19 08:57:04 -03:00
pyca-boringbot[bot]
17404b61fc
Bump BoringSSL and/or OpenSSL in CI (#10205)
Co-authored-by: pyca-boringbot[bot] <pyca-boringbot[bot]+106132319@users.noreply.github.com>
2024-01-19 01:26:57 +00:00
Hacksawfred3232
bd0a0648a8
Added warning about SHA1 being used for response signing in ocsp.rst (#10204)
* Update ocsp.rst

Added warning about SHA1 being used for sign()

* Update ocsp.rst

Fixed spelling issues, at least according to en-GB dictionary.

* Update ocsp.rst

Spell checker didn't catch "algorithim" somehow.

* Update ocsp.rst

Attempting to rephrase the warning.

* Update ocsp.rst

Removing rouge space.
2024-01-19 01:26:45 +00:00
dependabot[bot]
82f715cfb0
Bump pkg-config from 0.3.28 to 0.3.29 in /src/rust (#10202)
Bumps [pkg-config](https://github.com/rust-lang/pkg-config-rs) from 0.3.28 to 0.3.29.
- [Changelog](https://github.com/rust-lang/pkg-config-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/pkg-config-rs/compare/0.3.28...0.3.29)

---
updated-dependencies:
- dependency-name: pkg-config
  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>
2024-01-19 01:26:33 +00:00
pyca-boringbot[bot]
1bf2d29b40
Bump x509-limbo and/or wycheproof in CI (#10201)
Co-authored-by: pyca-boringbot[bot] <pyca-boringbot[bot]+106132319@users.noreply.github.com>
2024-01-18 00:35:02 +00:00