summaryrefslogtreecommitdiff
path: root/src/node_crypto.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/node_crypto.cc')
-rw-r--r--src/node_crypto.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/node_crypto.cc b/src/node_crypto.cc
index 920869a2f2..3ff9548487 100644
--- a/src/node_crypto.cc
+++ b/src/node_crypto.cc
@@ -1962,10 +1962,10 @@ void SSLWrap<Base>::GetCertificate(
Local<Object> result;
- X509Pointer cert(SSL_get_certificate(w->ssl_.get()));
+ X509* cert = SSL_get_certificate(w->ssl_.get());
- if (cert)
- result = X509ToObject(env, cert.get());
+ if (cert != nullptr)
+ result = X509ToObject(env, cert);
args.GetReturnValue().Set(result);
}