Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@chromium.org>2014-11-22 22:32:53 +0300
committerAdam Langley <agl@google.com>2014-12-02 22:26:30 +0300
commit0f1e64bf7f36a9610cb3072add579c8e4850cdf5 (patch)
tree3f9dfeb7839dc4accd0c37eb22057e6b64d0c6ce /ssl/ssl_lib.c
parent61f95277d40dc829fcc5cf09d0e208d247b2b50f (diff)
Remove method swap in SSL_set_session.
This is a bit of cleanup that probably should have been done at the same time as 30ddb434bfb845356fbacb6b2bd51f8814c7043c. For now, version negotiation is implemented with a method swap. It also performs this swap on SSL_set_session, but this was neutered in 30ddb434bfb845356fbacb6b2bd51f8814c7043c. Rather than hackishly neuter it, remove it outright. In addition, remove SSL_set_ssl_method. Now all method swaps are internal: SSLv23_method switch to a version-specific method and SSL_clear undoing it. Note that this does change behavior: if an SSL* is created with one version-specific method and we SSL_set_session to a session from a /different/ version, we would switch to the /other/ version-specific method. This is extremely confusing, so it's unlikely anyone was actually expecting it. Version-specific methods in general don't work well. Change-Id: I72a5c1f321ca9aeb1b52ebe0317072950ba25092 Reviewed-on: https://boringssl-review.googlesource.com/2390 Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'ssl/ssl_lib.c')
-rw-r--r--ssl/ssl_lib.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c
index 4367f1e4..4cbf86dd 100644
--- a/ssl/ssl_lib.c
+++ b/ssl/ssl_lib.c
@@ -2294,33 +2294,6 @@ const SSL_METHOD *SSL_get_ssl_method(SSL *s)
return(s->method);
}
-int SSL_set_ssl_method(SSL *s, const SSL_METHOD *meth)
- {
- int conn= -1;
- int ret=1;
-
- if (s->method != meth)
- {
- if (s->handshake_func != NULL)
- conn=(s->handshake_func == s->method->ssl_connect);
-
- if (s->method->version == meth->version)
- s->method=meth;
- else
- {
- s->method->ssl_free(s);
- s->method=meth;
- ret=s->method->ssl_new(s);
- }
-
- if (conn == 1)
- s->handshake_func=meth->ssl_connect;
- else if (conn == 0)
- s->handshake_func=meth->ssl_accept;
- }
- return(ret);
- }
-
int SSL_get_error(const SSL *s,int i)
{
int reason;