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: use X509_ALGOR accessors instead of reaching into X509_ALGOR · nodejs/node@edb0ffd

File tree

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

‎src/crypto/crypto_rsa.cc‎

Copy file name to clipboardExpand all lines: src/crypto/crypto_rsa.cc
+9-3Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,9 @@ Maybe<bool> GetRsaKeyDetail(
577577
int64_t salt_length = 20;
578578

579579
if (params->hashAlgorithm != nullptr) {
580-
hash_nid = OBJ_obj2nid(params->hashAlgorithm->algorithm);
580+
const ASN1_OBJECT* hash_obj;
581+
X509_ALGOR_get0(&hash_obj, nullptr, nullptr, params->hashAlgorithm);
582+
hash_nid = OBJ_obj2nid(hash_obj);
581583
}
582584

583585
if (target
@@ -590,9 +592,13 @@ Maybe<bool> GetRsaKeyDetail(
590592
}
591593

592594
if (params->maskGenAlgorithm != nullptr) {
593-
mgf_nid = OBJ_obj2nid(params->maskGenAlgorithm->algorithm);
595+
const ASN1_OBJECT* mgf_obj;
596+
X509_ALGOR_get0(&mgf_obj, nullptr, nullptr, params->maskGenAlgorithm);
597+
mgf_nid = OBJ_obj2nid(mgf_obj);
594598
if (mgf_nid == NID_mgf1) {
595-
mgf1_hash_nid = OBJ_obj2nid(params->maskHash->algorithm);
599+
const ASN1_OBJECT* mgf1_hash_obj;
600+
X509_ALGOR_get0(&mgf1_hash_obj, nullptr, nullptr, params->maskHash);
601+
mgf1_hash_nid = OBJ_obj2nid(mgf1_hash_obj);
596602
}
597603
}
598604

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.