Loading ssl/ssl_lib.c +38 −15 Original line number Diff line number Diff line Loading @@ -1514,8 +1514,31 @@ SSL *SSL_dup(SSL *s) if ((ret=SSL_new(SSL_get_SSL_CTX(s))) == NULL) return(NULL); /* This copies version, session-id, SSL_METHOD and 'cert' */ if (s->session != NULL) { /* This copies session-id, SSL_METHOD, sid_ctx, and 'cert' */ SSL_copy_session_id(ret,s); } else { /* No session has been established yet, so we have to expect * that s->cert or ret->cert will be changed later -- * they should not both point to the same object, * and thus we can't use SSL_copy_session_id. */ ret->method = s->method; ret->method->ssl_new(ret); if (s->cert != NULL) { ret->cert = ssl_cert_dup(s->cert); if (ret->cert == NULL) goto err; } SSL_set_session_id_context(ret, s->sid_ctx, s->sid_ctx_length); } SSL_set_read_ahead(ret,SSL_get_read_ahead(s)); SSL_set_verify(ret,SSL_get_verify_mode(s), Loading ssl/ssl_locl.h +1 −1 Original line number Diff line number Diff line Loading @@ -277,7 +277,7 @@ typedef struct cert_st STACK_OF(X509) *cert_chain; /* XXX should only exist in sess_cert_st */ int references; /* XXX will finally always be 1 */ int references; /*> 1 only if SSL_copy_session_id is used */ } CERT; Loading Loading
ssl/ssl_lib.c +38 −15 Original line number Diff line number Diff line Loading @@ -1514,8 +1514,31 @@ SSL *SSL_dup(SSL *s) if ((ret=SSL_new(SSL_get_SSL_CTX(s))) == NULL) return(NULL); /* This copies version, session-id, SSL_METHOD and 'cert' */ if (s->session != NULL) { /* This copies session-id, SSL_METHOD, sid_ctx, and 'cert' */ SSL_copy_session_id(ret,s); } else { /* No session has been established yet, so we have to expect * that s->cert or ret->cert will be changed later -- * they should not both point to the same object, * and thus we can't use SSL_copy_session_id. */ ret->method = s->method; ret->method->ssl_new(ret); if (s->cert != NULL) { ret->cert = ssl_cert_dup(s->cert); if (ret->cert == NULL) goto err; } SSL_set_session_id_context(ret, s->sid_ctx, s->sid_ctx_length); } SSL_set_read_ahead(ret,SSL_get_read_ahead(s)); SSL_set_verify(ret,SSL_get_verify_mode(s), Loading
ssl/ssl_locl.h +1 −1 Original line number Diff line number Diff line Loading @@ -277,7 +277,7 @@ typedef struct cert_st STACK_OF(X509) *cert_chain; /* XXX should only exist in sess_cert_st */ int references; /* XXX will finally always be 1 */ int references; /*> 1 only if SSL_copy_session_id is used */ } CERT; Loading