Bläddra i källkod

Set SID from SSL_CTX

This change ensures that the session ID context of an SSL* is updated
when its SSL_CTX is updated.
kris/onging/CECPQ3_patch15
Adam Langley 10 år sedan
förälder
incheckning
a5dc545bbc
1 ändrade filer med 5 tillägg och 0 borttagningar
  1. +5
    -0
      ssl/ssl_lib.c

+ 5
- 0
ssl/ssl_lib.c Visa fil

@@ -3166,6 +3166,11 @@ SSL_CTX *SSL_set_SSL_CTX(SSL *ssl, SSL_CTX* ctx)
if (ssl->ctx != NULL)
SSL_CTX_free(ssl->ctx); /* decrement reference count */
ssl->ctx = ctx;

ssl->sid_ctx_length = ctx->sid_ctx_length;
assert(ssl->sid_ctx_length <= sizeof(ssl->sid_ctx));
memcpy(ssl->sid_ctx, ctx->sid_ctx, sizeof(ssl->sid_ctx));

return(ssl->ctx);
}



Laddar…
Avbryt
Spara