diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /security/nss/gtests/pk11_gtest/pk11_keygen.cc | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-upstream/125.0.1.tar.xz firefox-upstream/125.0.1.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'security/nss/gtests/pk11_gtest/pk11_keygen.cc')
-rw-r--r-- | security/nss/gtests/pk11_gtest/pk11_keygen.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/security/nss/gtests/pk11_gtest/pk11_keygen.cc b/security/nss/gtests/pk11_gtest/pk11_keygen.cc index 1a300ca4c1..92c8ba7ed8 100644 --- a/security/nss/gtests/pk11_gtest/pk11_keygen.cc +++ b/security/nss/gtests/pk11_gtest/pk11_keygen.cc @@ -82,9 +82,11 @@ class DhParamHolder : public PqgParamHolder { SECKEYDHParams params_; }; +/* Also used for EdDSA. */ class EcParamHolder : public ParamHolder { public: EcParamHolder(SECOidTag curve_oid) { + /* For the case of ED curve_oid contains a EdDSA OID. */ SECOidData* curve = SECOID_FindOIDByTag(curve_oid); EXPECT_NE(nullptr, curve); @@ -142,6 +144,11 @@ std::unique_ptr<ParamHolder> Pkcs11KeyPairGenerator::MakeParams() const { return std::unique_ptr<ParamHolder>(new DhParamHolder(pqg_params)); } + case CKM_EC_EDWARDS_KEY_PAIR_GEN: + std::cerr << "Generate ED pair on " << curve_ << std::endl; + return std::unique_ptr<ParamHolder>( + new EcParamHolder(SEC_OID_ED25519_PUBLIC_KEY)); + case CKM_EC_KEY_PAIR_GEN: std::cerr << "Generate EC pair on " << curve_ << std::endl; return std::unique_ptr<ParamHolder>(new EcParamHolder(curve_)); |