From 813fc01ff1cd93bf9bf96339cb46d14760ba882c Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Tue, 6 Dec 2016 13:39:11 -0500 Subject: [PATCH] Remove unreachable check. It is impossible to have an SSL* without a corresponding method. Change-Id: Icaf826a06aaaa2c7caf98b1e4a950f9c1d48e6bd Reviewed-on: https://boringssl-review.googlesource.com/12621 Reviewed-by: Adam Langley --- ssl/ssl_lib.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index 9eb8cd27..144c4bbc 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -2873,11 +2873,6 @@ void SSL_CTX_set_grease_enabled(SSL_CTX *ctx, int enabled) { } int SSL_clear(SSL *ssl) { - if (ssl->method == NULL) { - OPENSSL_PUT_ERROR(SSL, SSL_R_NO_METHOD_SPECIFIED); - return 0; - } - /* TODO(davidben): Some state on |ssl| is reset both in |SSL_new| and * |SSL_clear| because it is per-connection state rather than configuration * state. Per-connection state should be on |ssl->s3| and |ssl->d1| so it is