GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — crypto: initialize KeyObjectData mutex eagerly · nodejs/node@2b4053d

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src/crypto
    • crypto_keys.cc
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/crypto/crypto_keys.cc‎

Copy file name to clipboardExpand all lines: src/crypto/crypto_keys.cc
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -952,10 +952,13 @@ KeyObjectData::KeyObjectData(std::nullptr_t)
952952

953953
KeyObjectData::KeyObjectData(ByteSource symmetric_key)
954954
: key_type_(KeyType::kKeyTypeSecret),
955+
mutex_(std::make_shared<Mutex>()),
955956
data_(std::make_shared<Data>(std::move(symmetric_key))) {}
956957

957958
KeyObjectData::KeyObjectData(KeyType type, EVPKeyPointer&& pkey)
958-
: key_type_(type), data_(std::make_shared<Data>(std::move(pkey))) {}
959+
: key_type_(type),
960+
mutex_(std::make_shared<Mutex>()),
961+
data_(std::make_shared<Data>(std::move(pkey))) {}
959962

960963
void KeyObjectData::Data::MemoryInfo(MemoryTracker* tracker) const {
961964
if (asymmetric_key) {

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.