diff options
author | David Benjamin <davidben@chromium.org> | 2014-07-08 02:13:20 +0400 |
---|---|---|
committer | Adam Langley <agl@google.com> | 2014-07-08 02:43:56 +0400 |
commit | 398ba895fba66c3f191add14299b3da2def64af4 (patch) | |
tree | c620fd75b8ddde62929d1005b4b72726526a8eb4 /ssl/ssl_cert.c | |
parent | 9d28c75774cbec7f3cd841e554b06d03fbf838ce (diff) |
Remove SSL_copy_session_id.
This is the only codepath that allowed a cert_st to be shared between two
ssl_st's. Given that the cert_st currently contains some per-connection and
even per-handshake state, this probably doesn't work.
Remove the function altogether and don't ref-count cert_st.
Change-Id: I66d5346117cb59b6063e7b9b893d1c4b40cb6867
Reviewed-on: https://boringssl-review.googlesource.com/1110
Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'ssl/ssl_cert.c')
-rw-r--r-- | ssl/ssl_cert.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/ssl/ssl_cert.c b/ssl/ssl_cert.c index 12ad094e..eab55962 100644 --- a/ssl/ssl_cert.c +++ b/ssl/ssl_cert.c @@ -181,7 +181,6 @@ CERT *ssl_cert_new(void) memset(ret,0,sizeof(CERT)); ret->key= &(ret->pkeys[SSL_PKEY_RSA_ENC]); - ret->references=1; ssl_cert_set_default_md(ret); return(ret); } @@ -322,7 +321,6 @@ CERT *ssl_cert_dup(CERT *cert) rpk->valid_flags = 0; } - ret->references=1; /* Set digests to defaults. NB: we don't copy existing values as they * will be set during handshake. */ @@ -439,24 +437,9 @@ void ssl_cert_clear_certs(CERT *c) void ssl_cert_free(CERT *c) { - int i; - if(c == NULL) return; - i=CRYPTO_add(&c->references,-1,CRYPTO_LOCK_SSL_CERT); -#ifdef REF_PRINT - REF_PRINT("CERT",c); -#endif - if (i > 0) return; -#ifdef REF_CHECK - if (i < 0) - { - fprintf(stderr,"ssl_cert_free, bad reference count\n"); - abort(); /* ok */ - } -#endif - if (c->rsa_tmp) RSA_free(c->rsa_tmp); #ifndef OPENSSL_NO_DH if (c->dh_tmp) DH_free(c->dh_tmp); |