commit | a12920058060382d99ab4ac946563de09064e593 | [log] [tgz] |
---|---|---|
author | David Drysdale <drysdale@google.com> | Thu Aug 18 12:15:50 2022 +0100 |
committer | David Drysdale <drysdale@google.com> | Fri Sep 09 14:22:36 2022 +0100 |
tree | ae644a3860e0c5431a702f4c411107a35e9de0b1 | |
parent | 2a8eac2e98c69762cd0b4a54deb7a0718988c192 [diff] |
Add ec::EcKey::private_key_from_der_for_group In the `ECPrivateKey` schema (RFC 5915 s3) the parameters field which holds the NamedCurve is optional. If an EC key was originally enclosed in a PKCS#8 (RFC 5208 s5) wrapper, the curve may be identified in the wrapper (in the `AlgorithmIdentifier.parameters` field) rather than in the `ECPrivateKey`. In this case, the existing `ec::EcKey::private_key_from_der()` method (which corresponds to `d2i_ECPrivateKey()`) cannot determine the curve and so cannot import such a key. Add a new method that includes explicit specification of the curve to cope with this situation, passing through to the (BoringSSL-specific) `EC_KEY_parse_private_key` function. Test: VtsAidlKeyMintTargetTest against in-development Rust KeyMint Change-Id: I7f1b9be822a10917a39bbf438caa1ddaafdbf091
OpenSSL bindings for the Rust programming language.
The current supported release of openssl
is 0.10 and openssl-sys
is 0.9.
New major versions will be published at most once per year. After a new release, the previous major version will be partially supported with bug fixes for 3 months, after which support will be dropped entirely.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed under the terms of both the Apache License, Version 2.0 and the MIT license without any additional terms or conditions.