Remove some #if 0 code in ssl, crypto/bio
authorTodd Short <tshort@akamai.com>
Tue, 28 Feb 2017 14:04:29 +0000 (09:04 -0500)
committerRich Salz <rsalz@openssl.org>
Tue, 28 Feb 2017 14:32:41 +0000 (09:32 -0500)
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2781)

crypto/bio/bss_conn.c
ssl/bio_ssl.c
ssl/s3_lib.c

index ddbc8967f6e93b7dc3ebf02cc673036d6fcee4b7..5562efaa3bd780dec3c39c4fdaaa87b968017f7b 100644 (file)
@@ -478,15 +478,7 @@ static long conn_ctrl(BIO *b, int cmd, long num, void *ptr)
         }
         break;
     case BIO_CTRL_SET_CALLBACK:
-        {
-# if 0                          /* FIXME: Should this be used? -- Richard
-                                 * Levitte */
-            BIOerr(BIO_F_CONN_CTRL, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
-            ret = -1;
-# else
-            ret = 0;
-# endif
-        }
+        ret = 0; /* use callback ctrl */
         break;
     case BIO_CTRL_GET_CALLBACK:
         {
index 3d380c83fb6078df5f1a63164a42721539ce93ee..8b5036fe3869122389405129bf2754e901310cb8 100644 (file)
@@ -380,15 +380,7 @@ static long ssl_ctrl(BIO *b, int cmd, long num, void *ptr)
         ret = BIO_ctrl(ssl->rbio, cmd, num, ptr);
         break;
     case BIO_CTRL_SET_CALLBACK:
-        {
-#if 0                           /* FIXME: Should this be used? -- Richard
-                                 * Levitte */
-            SSLerr(SSL_F_SSL_CTRL, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
-            ret = -1;
-#else
-            ret = 0;
-#endif
-        }
+        ret = 0; /* use callback ctrl */
         break;
     case BIO_CTRL_GET_CALLBACK:
         {
index 1df1afa02e20511ec8f8b229a8d2548fe303f378..4f8977ae7e07f58459d3881d2a7e9edf21f8f399 100644 (file)
@@ -3669,16 +3669,12 @@ const SSL_CIPHER *ssl3_choose_cipher(SSL *s, STACK_OF(SSL_CIPHER) *clnt,
 
     /* Let's see which ciphers we can support */
 
-#if 0
     /*
      * Do not set the compare functions, because this may lead to a
      * reordering by "id". We want to keep the original ordering. We may pay
      * a price in performance during sk_SSL_CIPHER_find(), but would have to
      * pay with the price of sk_SSL_CIPHER_dup().
      */
-    sk_SSL_CIPHER_set_cmp_func(srvr, ssl_cipher_ptr_id_cmp);
-    sk_SSL_CIPHER_set_cmp_func(clnt, ssl_cipher_ptr_id_cmp);
-#endif
 
 #ifdef CIPHER_DEBUG
     fprintf(stderr, "Server has %d from %p:\n", sk_SSL_CIPHER_num(srvr),