pkey: add support for OpenSSL 3 provider-only pkeys #898
+83
−33
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.
This includes two changes:
pkey: handle EVP_PKEY_KEYMGMT return by EVP_PKEY_id()
For algorithms implemented solely in an OpenSSL 3 provider, without an associated
EVP_PKEY_METHOD
,EVP_PKEY_id()
returns a special valueEVP_PKEY_KEYMGMT
.Let
OpenSSL::PKey::PKey#oid
raise an exception as necessary. UpdatePKey#inspect
to include the string returned byEVP_PKEY_get0_type_name()
, if available.pkey: use EVP_PKEY_new_raw_{private,public}_key_ex() if available
Algorithms implemented only in OpenSSL 3 providers may not have a corresponding NID. The
*_ex()
variants have been added in OpenSSL 3.0 to handle such algorithms, by taking algorithm names as a string.