diff options
author | David Benjamin <davidben@chromium.org> | 2014-10-01 09:21:51 +0400 |
---|---|---|
committer | Adam Langley <agl@google.com> | 2014-10-01 22:59:14 +0400 |
commit | 180d1eb04c8f9205187d22c9f5187985cedf1177 (patch) | |
tree | 0abfd7b96a1519418892aa734a6bce37cd95b61f /ssl/ssl_lib.c | |
parent | 176b70efd1be70afa62369ecd6ee1f356acdec9a (diff) |
Remove SSL_get_shared_ciphers.
This removes the need to track the client cipher list in the SSL_SESSION. It
also eliminates a field in SSL_SESSION that wasn't serialized by
i2d_SSL_SESSION. It's only used to implement SSL_get_shared_ciphers which is
only used by debug code.
Moreover, it doesn't work anyway. The SSLv2 logic pruned that field to the
common ciphers, but the SSLv3+ logic just stores the client list as-is. I found
no internal callers that were actually compiled (if need be we can stub in
something that always returns the empty string or so).
Change-Id: I55ad45964fb4037fd623f7591bc574b2983c0698
Reviewed-on: https://boringssl-review.googlesource.com/1866
Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'ssl/ssl_lib.c')
-rw-r--r-- | ssl/ssl_lib.c | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index 952fd788..f7818ed6 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -1454,46 +1454,6 @@ int SSL_set_cipher_list(SSL *s,const char *str) return 1; } -/* works well for SSLv2, not so good for SSLv3 */ -char *SSL_get_shared_ciphers(const SSL *s,char *buf,int len) - { - char *p; - STACK_OF(SSL_CIPHER) *sk; - const SSL_CIPHER *c; - size_t i; - - if ((s->session == NULL) || (s->session->ciphers == NULL) || - (len < 2)) - return(NULL); - - p=buf; - sk=s->session->ciphers; - - if (sk_SSL_CIPHER_num(sk) == 0) - return NULL; - - for (i=0; i<sk_SSL_CIPHER_num(sk); i++) - { - int n; - - c=sk_SSL_CIPHER_value(sk,i); - n=strlen(c->name); - if (n+1 > len) - { - if (p != buf) - --p; - *p='\0'; - return buf; - } - strcpy(p,c->name); - p+=n; - *(p++)=':'; - len-=n+1; - } - p[-1]='\0'; - return(buf); - } - int ssl_cipher_list_to_bytes(SSL *s, STACK_OF(SSL_CIPHER) *sk, uint8_t *p) { size_t i; |