| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 0b0f023 commit 7bd587e
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2991,9 +2991,15 @@ void SSLWrap<Base>::CertCbDone(const FunctionCallbackInfo<Value>& args) { | |||
| 2991 | 2991 | goto fire_cb; | |
| 2992 | 2992 | ||
| 2993 | 2993 | if (cons->HasInstance(ctx)) { | |
| 2994 | - SecureContext* sc; | ||
| 2995 | - ASSIGN_OR_RETURN_UNWRAP(&sc, ctx.As<Object>()); | ||
| 2996 | - w->sni_context_.Reset(env->isolate(), ctx); | ||
| 2994 | + SecureContext* sc = Unwrap<SecureContext>(ctx.As<Object>()); | ||
| 2995 | + CHECK_NOT_NULL(sc); | ||
| 2996 | + // XXX: There is a method w->SetSNIContext(sc), and you might think that | ||
| 2997 | + // it makes sense to call that here and make setting w->sni_context_ part | ||
| 2998 | + // of it. In fact, that passes the test suite, although SetSNIContext() | ||
| 2999 | + // performs a lot more operations. | ||
| 3000 | + // If anybody is familiar enough with the TLS code to know whether it makes | ||
| 3001 | + // sense, please do so or document why it doesn't. | ||
| 3002 | + w->sni_context_ = BaseObjectPtr<SecureContext>(sc); | ||
| 2997 | 3003 | ||
| 2998 | 3004 | int rv; | |
| 2999 | 3005 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -310,7 +310,7 @@ class SSLWrap { | |||
| 310 | 310 | ClientHelloParser hello_parser_; | |
| 311 | 311 | ||
| 312 | 312 | v8::Global<v8::ArrayBufferView> ocsp_response_; | |
| 313 | - v8::Global<v8::Value> sni_context_; | ||
| 313 | + BaseObjectPtr<SecureContext> sni_context_; | ||
| 314 | 314 | ||
| 315 | 315 | friend class SecureContext; | |
| 316 | 316 | }; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1065,10 +1065,9 @@ int TLSWrap::SelectSNIContextCallback(SSL* s, int* ad, void* arg) { | |||
| 1065 | 1065 | return SSL_TLSEXT_ERR_NOACK; | |
| 1066 | 1066 | } | |
| 1067 | 1067 | ||
| 1068 | - p->sni_context_.Reset(env->isolate(), ctx); | ||
| 1069 | - | ||
| 1070 | 1068 | SecureContext* sc = Unwrap<SecureContext>(ctx.As<Object>()); | |
| 1071 | 1069 | CHECK_NOT_NULL(sc); | |
| 1070 | + p->sni_context_ = BaseObjectPtr<SecureContext>(sc); | ||
| 1072 | 1071 | p->SetSNIContext(sc); | |
| 1073 | 1072 | return SSL_TLSEXT_ERR_OK; | |
| 1074 | 1073 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments