Skip to content

Commit f5df725

Browse files
committed
crypto: reuse X509 issuer result
Avoid a second native call when reading the issuer certificate. Signed-off-by: Filip Skokan <panva.ip@gmail.com>
1 parent 97a7d92 commit f5df725

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/internal/crypto/x509.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ class X509Certificate {
193193
if (value === undefined) {
194194
const cert = this[kHandle].getIssuerCert();
195195
if (cert)
196-
value = new InternalX509Certificate(this[kHandle].getIssuerCert());
196+
value = new InternalX509Certificate(cert);
197197
this[kInternalState].set('issuerCertificate', value);
198198
}
199199
return value;

0 commit comments

Comments
 (0)