Skip to content

Add brainpoolP224r1 and brainpoolP224t1 NID constants#2642

Merged
alex merged 1 commit into
rust-openssl:masterfrom
sfarestam-iproov:add-brainpool-p224
May 26, 2026
Merged

Add brainpoolP224r1 and brainpoolP224t1 NID constants#2642
alex merged 1 commit into
rust-openssl:masterfrom
sfarestam-iproov:add-brainpool-p224

Conversation

@sfarestam-iproov

Copy link
Copy Markdown
Contributor

Summary

Add NID_brainpoolP224r1 / NID_brainpoolP224t1 constants to openssl-sys and the corresponding BRAINPOOL_P224R1 / BRAINPOOL_P224T1 constants to openssl. These are the only Brainpool curve sizes missing — P256 through P512 are already present.

Motivation

These curves are defined in RFC 5639 and supported by OpenSSL since 1.1.0 (NID 925/926). They are needed by pyca/cryptography to add brainpoolP224r1 support for ICAO 9303 ePassport certificate processing. Belgium uses brainpoolP224r1 for Active Authentication keys, and Germany has Document Signer certificates using this curve.

Changes

  • openssl-sys/src/obj_mac.rs: Add NID_brainpoolP224r1 (925/926) and NID_brainpoolP224t1 (926/927), with the standard ossl110/libressl cfg split
  • openssl/src/nid.rs: Add BRAINPOOL_P224R1 and BRAINPOOL_P224T1 wrapping the FFI constants, gated behind cfg(any(ossl110, libressl))

Both follow the exact pattern of the existing P256/P320/P384/P512 entries.

The other Brainpool variants (P256 through P512) already have NID
constants — P224 was the only size missing. These curves are defined
in RFC 5639 and supported by OpenSSL since 1.1.0 (NID 925/926).

Needed by pyca/cryptography for ICAO 9303 ePassport certificate
support (Belgium uses brainpoolP224r1 for Active Authentication keys).
@alex alex merged commit 47f7777 into rust-openssl:master May 26, 2026
258 of 261 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants