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:
Filip Skokan authored and Antoine du Hamel committed 2026-08-05 11:15:06 +02:00
1 parent c68c7d0112
commit c604d8846d
1 file changed
+1 -1
+1 -1
View File
@@ -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;