diff --git a/src/crypto/crypto_ec.cc b/src/crypto/crypto_ec.cc index 606067e36af0fa..0c021eab60d509 100644 --- a/src/crypto/crypto_ec.cc +++ b/src/crypto/crypto_ec.cc @@ -965,26 +965,11 @@ KeyObjectData ImportJWKEcKey(Environment* env, return KeyObjectData::CreateAsymmetric(type, std::move(pkey)); } -<<<<<<< HEAD -Maybe GetEcKeyDetail(Environment* env, +Maybe GetEcKeyDetail(Environment* env, const KeyObjectData& key, Local target) { Mutex::ScopedLock lock(key.mutex()); const auto& m_pkey = key.GetAsymmetricKey(); -||||||| parent of 6b5b11a52a (src: convert more uses of Maybe to Maybe) -Maybe GetEcKeyDetail( - Environment* env, - std::shared_ptr key, - Local target) { - ManagedEVPPKey m_pkey = key->GetAsymmetricKey(); - Mutex::ScopedLock lock(*m_pkey.mutex()); -======= -Maybe GetEcKeyDetail(Environment* env, - std::shared_ptr key, - Local target) { - ManagedEVPPKey m_pkey = key->GetAsymmetricKey(); - Mutex::ScopedLock lock(*m_pkey.mutex()); ->>>>>>> 6b5b11a52a (src: convert more uses of Maybe to Maybe) CHECK_EQ(EVP_PKEY_id(m_pkey.get()), EVP_PKEY_EC); const EC_KEY* ec = EVP_PKEY_get0_EC_KEY(m_pkey.get()); diff --git a/src/crypto/crypto_keygen.cc b/src/crypto/crypto_keygen.cc index bceba6b724a225..8a17cde8b9cac5 100644 --- a/src/crypto/crypto_keygen.cc +++ b/src/crypto/crypto_keygen.cc @@ -80,7 +80,7 @@ KeyGenJobStatus SecretKeyGenTraits::DoKeyGen(Environment* env, } MaybeLocal SecretKeyGenTraits::EncodeKey(Environment* env, - SecretKeyGenConfig* params) { + SecretKeyGenConfig* params) { auto data = KeyObjectData::CreateSecret(std::move(params->out)); Local ret; if (!KeyObjectHandle::Create(env, data).ToLocal(&ret)) { diff --git a/src/crypto/crypto_keys.cc b/src/crypto/crypto_keys.cc index 8619c8243bed7e..1d280ddd068835 100644 --- a/src/crypto/crypto_keys.cc +++ b/src/crypto/crypto_keys.cc @@ -521,7 +521,7 @@ Maybe GetSecretKeyDetail(Environment* env, Local target) { // For the secret key detail, all we care about is the length, // converted to bits. - size_t length = key->GetSymmetricKeySize() * CHAR_BIT; + size_t length = key.GetSymmetricKeySize() * CHAR_BIT; if (target ->Set(env->context(), env->length_string(), diff --git a/src/crypto/crypto_sig.cc b/src/crypto/crypto_sig.cc index 77d13e24097613..903ab29cd7e701 100644 --- a/src/crypto/crypto_sig.cc +++ b/src/crypto/crypto_sig.cc @@ -648,11 +648,11 @@ Maybe SignTraits::AdditionalConfig( if (params->mode == SignConfiguration::kVerify) { auto data = KeyObjectData::GetPublicOrPrivateKeyFromJs(args, &keyParamOffset); - if (!data) return Nothing(); + if (!data) return Nothing(); params->key = std::move(data); } else { auto data = KeyObjectData::GetPrivateKeyFromJs(args, &keyParamOffset, true); - if (!data) return Nothing(); + if (!data) return Nothing(); params->key = std::move(data); }