[openssl-commits] [openssl] master update

Dr. Stephen Henson steve at openssl.org
Tue Jun 30 13:21:12 UTC 2015


The branch master has been updated
       via  36f038f1041f9f31878f75b567959ceae08eb34e (commit)
      from  5fced2395ddfb603a50fd1bd87411e603a59dc6f (commit)


- Log -----------------------------------------------------------------
commit 36f038f1041f9f31878f75b567959ceae08eb34e
Author: Dr. Stephen Henson <steve at openssl.org>
Date:   Tue Jun 30 13:58:25 2015 +0100

    Dup peer_chain properly in SSL_SESSION
    
    Reviewed-by: Matt Caswell <matt at openssl.org>

-----------------------------------------------------------------------

Summary of changes:
 ssl/ssl_sess.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/ssl/ssl_sess.c b/ssl/ssl_sess.c
index 03c6ac0..9063bca 100644
--- a/ssl/ssl_sess.c
+++ b/ssl/ssl_sess.c
@@ -268,6 +268,12 @@ SSL_SESSION *ssl_session_dup(SSL_SESSION *src, int ticket)
     if (src->peer != NULL)
         CRYPTO_add(&src->peer->references, 1, CRYPTO_LOCK_X509);
 
+    if (src->peer_chain != NULL) {
+        dest->peer_chain = X509_chain_up_ref(src->peer_chain);
+        if (dest->peer_chain == NULL)
+            goto err;
+    }
+
 #ifndef OPENSSL_NO_PSK
     if (src->psk_identity_hint) {
         dest->psk_identity_hint = BUF_strdup(src->psk_identity_hint);


More information about the openssl-commits mailing list