diff --git a/src/crypto/crypto_keys.cc b/src/crypto/crypto_keys.cc index 7ef924d88fdca0..4c6946ddfbedd2 100644 --- a/src/crypto/crypto_keys.cc +++ b/src/crypto/crypto_keys.cc @@ -843,7 +843,6 @@ KeyObjectData::KeyObjectData( ByteSource symmetric_key) : key_type_(KeyType::kKeyTypeSecret), symmetric_key_(std::move(symmetric_key)), - symmetric_key_len_(symmetric_key_.size()), asymmetric_key_() {} KeyObjectData::KeyObjectData( @@ -851,7 +850,6 @@ KeyObjectData::KeyObjectData( const ManagedEVPPKey& pkey) : key_type_(type), symmetric_key_(), - symmetric_key_len_(0), asymmetric_key_{pkey} {} void KeyObjectData::MemoryInfo(MemoryTracker* tracker) const { @@ -896,7 +894,7 @@ const char* KeyObjectData::GetSymmetricKey() const { size_t KeyObjectData::GetSymmetricKeySize() const { CHECK_EQ(key_type_, kKeyTypeSecret); - return symmetric_key_len_; + return symmetric_key_.size(); } v8::Local KeyObjectHandle::Initialize(Environment* env) { diff --git a/src/crypto/crypto_keys.h b/src/crypto/crypto_keys.h index 3889f3f321da45..7b9c8d7e4ff55f 100644 --- a/src/crypto/crypto_keys.h +++ b/src/crypto/crypto_keys.h @@ -158,7 +158,6 @@ class KeyObjectData : public MemoryRetainer { const KeyType key_type_; const ByteSource symmetric_key_; - const unsigned int symmetric_key_len_; const ManagedEVPPKey asymmetric_key_; };