mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
crypto: reuse X509 issuer result
Avoid a second native call when reading the issuer certificate. Signed-off-by: Filip Skokan <panva.ip@gmail.com> PR-URL: https://github.com/nodejs/node/pull/64852 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
This commit is contained in:
1 parent
c68c7d0112
commit
c604d8846d
1 file changed
+1
-1
@@ -193,7 +193,7 @@ class X509Certificate {
|
||||
if (value === undefined) {
|
||||
const cert = this[kHandle].getIssuerCert();
|
||||
if (cert)
|
||||
value = new InternalX509Certificate(this[kHandle].getIssuerCert());
|
||||
value = new InternalX509Certificate(cert);
|
||||
this[kInternalState].set('issuerCertificate', value);
|
||||
}
|
||||
return value;
|
||||
|
||||
Reference in new issue
Block a user