diff --git a/src/node_crypto.cc b/src/node_crypto.cc
index 3e956098e48666..61be6afb1ce068 100644
--- a/src/node_crypto.cc
+++ b/src/node_crypto.cc
@@ -2423,9 +2423,15 @@ void SSLWrap::CertCbDone(const FunctionCallbackInfo& args) {
goto fire_cb;
if (cons->HasInstance(ctx)) {
- SecureContext* sc;
- ASSIGN_OR_RETURN_UNWRAP(&sc, ctx.As