Add brainpoolP224r1 and brainpoolP224t1 NID constants#2642
Merged
Conversation
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
approved these changes
May 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add
NID_brainpoolP224r1/NID_brainpoolP224t1constants to openssl-sys and the correspondingBRAINPOOL_P224R1/BRAINPOOL_P224T1constants 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: AddNID_brainpoolP224r1(925/926) andNID_brainpoolP224t1(926/927), with the standardossl110/libresslcfg splitopenssl/src/nid.rs: AddBRAINPOOL_P224R1andBRAINPOOL_P224T1wrapping the FFI constants, gated behindcfg(any(ossl110, libressl))Both follow the exact pattern of the existing P256/P320/P384/P512 entries.