Skip to content

Commit

Permalink
src: fixup linting after rebase/updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jasnell committed Sep 11, 2024
1 parent 97a082d commit 329e625
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 20 deletions.
17 changes: 1 addition & 16 deletions src/crypto/crypto_ec.cc
Original file line number Diff line number Diff line change
Expand Up @@ -965,26 +965,11 @@ KeyObjectData ImportJWKEcKey(Environment* env,
return KeyObjectData::CreateAsymmetric(type, std::move(pkey));
}

<<<<<<< HEAD
Maybe<bool> GetEcKeyDetail(Environment* env,
Maybe<void> GetEcKeyDetail(Environment* env,
const KeyObjectData& key,
Local<Object> target) {
Mutex::ScopedLock lock(key.mutex());
const auto& m_pkey = key.GetAsymmetricKey();
||||||| parent of 6b5b11a52a (src: convert more uses of Maybe<bool> to Maybe<void>)
Maybe<bool> GetEcKeyDetail(
Environment* env,
std::shared_ptr<KeyObjectData> key,
Local<Object> target) {
ManagedEVPPKey m_pkey = key->GetAsymmetricKey();
Mutex::ScopedLock lock(*m_pkey.mutex());
=======
Maybe<void> GetEcKeyDetail(Environment* env,
std::shared_ptr<KeyObjectData> key,
Local<Object> target) {
ManagedEVPPKey m_pkey = key->GetAsymmetricKey();
Mutex::ScopedLock lock(*m_pkey.mutex());
>>>>>>> 6b5b11a52a (src: convert more uses of Maybe<bool> to Maybe<void>)
CHECK_EQ(EVP_PKEY_id(m_pkey.get()), EVP_PKEY_EC);

const EC_KEY* ec = EVP_PKEY_get0_EC_KEY(m_pkey.get());
Expand Down
2 changes: 1 addition & 1 deletion src/crypto/crypto_keygen.cc
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ KeyGenJobStatus SecretKeyGenTraits::DoKeyGen(Environment* env,
}

MaybeLocal<Value> SecretKeyGenTraits::EncodeKey(Environment* env,
SecretKeyGenConfig* params) {
SecretKeyGenConfig* params) {
auto data = KeyObjectData::CreateSecret(std::move(params->out));
Local<Value> ret;
if (!KeyObjectHandle::Create(env, data).ToLocal(&ret)) {
Expand Down
2 changes: 1 addition & 1 deletion src/crypto/crypto_keys.cc
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ Maybe<void> GetSecretKeyDetail(Environment* env,
Local<Object> 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(),
Expand Down
4 changes: 2 additions & 2 deletions src/crypto/crypto_sig.cc
Original file line number Diff line number Diff line change
Expand Up @@ -648,11 +648,11 @@ Maybe<void> SignTraits::AdditionalConfig(
if (params->mode == SignConfiguration::kVerify) {
auto data =
KeyObjectData::GetPublicOrPrivateKeyFromJs(args, &keyParamOffset);
if (!data) return Nothing<bool>();
if (!data) return Nothing<void>();
params->key = std::move(data);
} else {
auto data = KeyObjectData::GetPrivateKeyFromJs(args, &keyParamOffset, true);
if (!data) return Nothing<bool>();
if (!data) return Nothing<void>();
params->key = std::move(data);
}

Expand Down

0 comments on commit 329e625

Please sign in to comment.