Skip to content
Snippets Groups Projects
Commit 6aa310df authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

get scfg from runtime before syncing cert

parent 9d06452d
Branches
Tags
No related merge requests found
Pipeline #5060 failed
......@@ -2338,6 +2338,7 @@ static JSBool js_socket_set(JSContext *cx, JSObject *obj, jsid id, JSBool strict
if(b) {
if(p->session==-1) {
int ret = CRYPT_ERROR_NOTINITED;
scfg = JS_GetRuntimePrivate(JS_GetRuntime(cx));
if(ssl_sync(scfg)) {
if((ret=cryptCreateSession(&p->session, CRYPT_UNUSED, tiny == SOCK_PROP_SSL_SESSION ? CRYPT_SESSION_SSL: CRYPT_SESSION_SSL_SERVER))==CRYPT_OK) {
......@@ -2355,8 +2356,6 @@ static JSBool js_socket_set(JSContext *cx, JSObject *obj, jsid id, JSBool strict
p->tls_server = FALSE;
}
else {
scfg = JS_GetRuntimePrivate(JS_GetRuntime(cx));
if (scfg == NULL) {
ret = CRYPT_ERROR_NOTAVAIL;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment