[openssl-commits] [openssl] master update

Matt Caswell matt at openssl.org
Tue Feb 28 16:05:52 UTC 2017


The branch master has been updated
       via  a633f2675ec7d031e879703c0b3dee2185bf44da (commit)
       via  38f2837b1b1b3d1bd417cd1032a3dd3b264352ef (commit)
       via  7f517c2676103db8123aaad5c722125d936f807c (commit)
       via  9fa36f5f4b32557c20b2c2665d50b239dcc49b91 (commit)
      from  816060d212ad3f7bbfbd4444b2b7ffb8fc24f62e (commit)


- Log -----------------------------------------------------------------
commit a633f2675ec7d031e879703c0b3dee2185bf44da
Author: Matt Caswell <matt at openssl.org>
Date:   Tue Feb 28 12:47:42 2017 +0000

    Remove some commented out code in the tests
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    Reviewed-by: Andy Polyakov <appro at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/2774)

commit 38f2837b1b1b3d1bd417cd1032a3dd3b264352ef
Author: Matt Caswell <matt at openssl.org>
Date:   Tue Feb 28 12:47:22 2017 +0000

    Remove some commented out code in libssl
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    Reviewed-by: Andy Polyakov <appro at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/2774)

commit 7f517c2676103db8123aaad5c722125d936f807c
Author: Matt Caswell <matt at openssl.org>
Date:   Tue Feb 28 14:55:35 2017 +0000

    Remove some commented out code in libcrypto
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    Reviewed-by: Andy Polyakov <appro at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/2774)

commit 9fa36f5f4b32557c20b2c2665d50b239dcc49b91
Author: Matt Caswell <matt at openssl.org>
Date:   Tue Feb 28 12:46:56 2017 +0000

    Remove some commented out code in the apps
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    Reviewed-by: Andy Polyakov <appro at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/2774)

-----------------------------------------------------------------------

Summary of changes:
 apps/ca.c                 |  2 +-
 apps/s_cb.c               |  1 -
 apps/s_client.c           |  6 ------
 crypto/asn1/d2i_pu.c      |  1 -
 crypto/bio/bss_acpt.c     |  6 ------
 crypto/bio/bss_dgram.c    |  1 -
 crypto/bio/bss_fd.c       |  1 -
 crypto/bio/bss_sock.c     |  1 -
 crypto/bn/bn_exp.c        |  7 -------
 crypto/bn/bn_mul.c        |  3 ---
 crypto/des/set_key.c      |  8 --------
 crypto/dso/dso_win32.c    |  6 ------
 crypto/evp/bio_b64.c      |  3 ---
 crypto/evp/bio_enc.c      | 26 --------------------------
 crypto/evp/bio_md.c       |  3 ---
 crypto/evp/p_seal.c       | 12 ------------
 crypto/lhash/lhash.c      |  5 -----
 crypto/objects/obj_dat.c  |  1 -
 crypto/x509v3/v3_pku.c    | 15 +--------------
 ssl/record/rec_layer_d1.c |  9 ---------
 ssl/s3_lib.c              |  4 ----
 ssl/ssl_ciph.c            |  3 ---
 ssl/statem/statem_clnt.c  |  2 --
 test/ssltest_old.c        | 14 --------------
 24 files changed, 2 insertions(+), 138 deletions(-)

diff --git a/apps/ca.c b/apps/ca.c
index 9428c30..6a615ed 100644
--- a/apps/ca.c
+++ b/apps/ca.c
@@ -2132,7 +2132,7 @@ static int get_certificate_status(const char *serial, CA_DB *db)
     if (serial_len % 2) {
         /*
          * Set the first char to 0
-         */ ;
+         */
         row[DB_serial][0] = '0';
 
         /* Copy String from serial to row[DB_serial] */
diff --git a/apps/s_cb.c b/apps/s_cb.c
index 080fc59..50bd965 100644
--- a/apps/s_cb.c
+++ b/apps/s_cb.c
@@ -1096,7 +1096,6 @@ void print_ssl_summary(SSL *s)
 {
     const SSL_CIPHER *c;
     X509 *peer;
-    /* const char *pnam = SSL_is_server(s) ? "client" : "server"; */
 
     BIO_printf(bio_err, "Protocol version: %s\n", SSL_get_version(s));
     print_raw_cipherlist(s);
diff --git a/apps/s_client.c b/apps/s_client.c
index 4db3748..6e790cf 100644
--- a/apps/s_client.c
+++ b/apps/s_client.c
@@ -136,9 +136,6 @@ static void do_ssl_shutdown(SSL *ssl)
 #ifndef OPENSSL_NO_PSK
 /* Default PSK identity and key */
 static char *psk_identity = "Client_identity";
-/*
- * char *psk_key=NULL; by default PSK is not used
- */
 
 static unsigned int psk_client_cb(SSL *ssl, const char *hint, char *identity,
                                   unsigned int max_identity_len,
@@ -2405,7 +2402,6 @@ int s_client_main(int argc, char **argv)
                 BIO_printf(bio_err, "bad select %d\n",
                            get_last_socket_error());
                 goto shut;
-                /* goto end; */
             }
         }
 
@@ -2496,7 +2492,6 @@ int s_client_main(int argc, char **argv)
                 BIO_printf(bio_c_out, "DONE\n");
                 ret = 0;
                 goto shut;
-                /* goto end; */
             }
 
             sbuf_len -= i;
@@ -2566,7 +2561,6 @@ int s_client_main(int argc, char **argv)
             case SSL_ERROR_SSL:
                 ERR_print_errors(bio_err);
                 goto shut;
-                /* break; */
             }
         }
 /* OPENSSL_SYS_MSDOS includes OPENSSL_SYS_WINDOWS */
diff --git a/crypto/asn1/d2i_pu.c b/crypto/asn1/d2i_pu.c
index dfdc1a6..77c643b 100644
--- a/crypto/asn1/d2i_pu.c
+++ b/crypto/asn1/d2i_pu.c
@@ -66,7 +66,6 @@ EVP_PKEY *d2i_PublicKey(int type, EVP_PKEY **a, const unsigned char **pp,
     default:
         ASN1err(ASN1_F_D2I_PUBLICKEY, ASN1_R_UNKNOWN_PUBLIC_KEY_TYPE);
         goto err;
-        /* break; */
     }
     if (a != NULL)
         (*a) = ret;
diff --git a/crypto/bio/bss_acpt.c b/crypto/bio/bss_acpt.c
index e490fcd..dda637d 100644
--- a/crypto/bio/bss_acpt.c
+++ b/crypto/bio/bss_acpt.c
@@ -521,12 +521,6 @@ static long acpt_ctrl(BIO *b, int cmd, long num, void *ptr)
         ret = (long)data->bind_mode;
         break;
     case BIO_CTRL_DUP:
-/*-     dbio=(BIO *)ptr;
-        if (data->param_port) EAY EAY
-                BIO_set_port(dbio,data->param_port);
-        if (data->param_hostname)
-                BIO_set_hostname(dbio,data->param_hostname);
-        BIO_set_nbio(dbio,data->nbio); */
         break;
 
     default:
diff --git a/crypto/bio/bss_dgram.c b/crypto/bio/bss_dgram.c
index b14d036..d43e8dc 100644
--- a/crypto/bio/bss_dgram.c
+++ b/crypto/bio/bss_dgram.c
@@ -1911,7 +1911,6 @@ int BIO_dgram_non_fatal_error(int err)
 # endif
 
         return (1);
-        /* break; */
     default:
         break;
     }
diff --git a/crypto/bio/bss_fd.c b/crypto/bio/bss_fd.c
index 0f003cd..a02c65d 100644
--- a/crypto/bio/bss_fd.c
+++ b/crypto/bio/bss_fd.c
@@ -268,7 +268,6 @@ int BIO_fd_non_fatal_error(int err)
     case EALREADY:
 # endif
         return (1);
-        /* break; */
     default:
         break;
     }
diff --git a/crypto/bio/bss_sock.c b/crypto/bio/bss_sock.c
index c47b160..744b768 100644
--- a/crypto/bio/bss_sock.c
+++ b/crypto/bio/bss_sock.c
@@ -225,7 +225,6 @@ int BIO_sock_non_fatal_error(int err)
     case EALREADY:
 # endif
         return (1);
-        /* break; */
     default:
         break;
     }
diff --git a/crypto/bn/bn_exp.c b/crypto/bn/bn_exp.c
index feeb764..5e6bb44 100644
--- a/crypto/bn/bn_exp.c
+++ b/crypto/bn/bn_exp.c
@@ -133,13 +133,6 @@ int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m,
 #define RECP_MUL_MOD
 
 #ifdef MONT_MUL_MOD
-    /*
-     * I have finally been able to take out this pre-condition of the top bit
-     * being set.  It was caused by an error in BN_div with negatives.  There
-     * was also another problem when for a^b%m a >= m.  eay 07-May-97
-     */
-    /* if ((m->d[m->top-1]&BN_TBIT) && BN_is_odd(m)) */
-
     if (BN_is_odd(m)) {
 # ifdef MONT_EXP_WORD
         if (a->top == 1 && !a->neg
diff --git a/crypto/bn/bn_mul.c b/crypto/bn/bn_mul.c
index 1f28f64..99402fc 100644
--- a/crypto/bn/bn_mul.c
+++ b/crypto/bn/bn_mul.c
@@ -339,7 +339,6 @@ void bn_mul_part_recursive(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n,
         bn_sub_part_words(&(t[n]), b, &(b[n]), tnb, n - tnb); /* - */
         break;
     case -3:
-        /* break; */
     case -2:
         bn_sub_part_words(t, &(a[n]), a, tna, tna - n); /* - */
         bn_sub_part_words(&(t[n]), &(b[n]), b, tnb, tnb - n); /* + */
@@ -348,14 +347,12 @@ void bn_mul_part_recursive(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n,
     case -1:
     case 0:
     case 1:
-        /* break; */
     case 2:
         bn_sub_part_words(t, a, &(a[n]), tna, n - tna); /* + */
         bn_sub_part_words(&(t[n]), b, &(b[n]), tnb, n - tnb); /* - */
         neg = 1;
         break;
     case 3:
-        /* break; */
     case 4:
         bn_sub_part_words(t, a, &(a[n]), tna, n - tna);
         bn_sub_part_words(&(t[n]), &(b[n]), b, tnb, tnb - n);
diff --git a/crypto/des/set_key.c b/crypto/des/set_key.c
index 795d954..cd3ec67 100644
--- a/crypto/des/set_key.c
+++ b/crypto/des/set_key.c
@@ -379,11 +379,3 @@ int DES_key_sched(const_DES_cblock *key, DES_key_schedule *schedule)
 {
     return (DES_set_key(key, schedule));
 }
-
-/*-
-#undef des_fixup_key_parity
-void des_fixup_key_parity(des_cblock *key)
-        {
-        des_set_odd_parity(key);
-        }
-*/
diff --git a/crypto/dso/dso_win32.c b/crypto/dso/dso_win32.c
index 4a4c34a..829f1b8 100644
--- a/crypto/dso/dso_win32.c
+++ b/crypto/dso/dso_win32.c
@@ -209,9 +209,6 @@ static struct file_st *win32_splitter(DSO *dso, const char *filename,
 
     if (!filename) {
         DSOerr(DSO_F_WIN32_SPLITTER, DSO_R_NO_FILENAME);
-        /*
-         * goto err;
-         */
         return (NULL);
     }
 
@@ -237,9 +234,6 @@ static struct file_st *win32_splitter(DSO *dso, const char *filename,
         case ':':
             if (position != IN_DEVICE) {
                 DSOerr(DSO_F_WIN32_SPLITTER, DSO_R_INCORRECT_FILE_SYNTAX);
-                /*
-                 * goto err;
-                 */
                 OPENSSL_free(result);
                 return (NULL);
             }
diff --git a/crypto/evp/bio_b64.c b/crypto/evp/bio_b64.c
index 4f0e19e..a48cd17 100644
--- a/crypto/evp/bio_b64.c
+++ b/crypto/evp/bio_b64.c
@@ -17,9 +17,6 @@
 static int b64_write(BIO *h, const char *buf, int num);
 static int b64_read(BIO *h, char *buf, int size);
 static int b64_puts(BIO *h, const char *str);
-/*
- * static int b64_gets(BIO *h, char *str, int size);
- */
 static long b64_ctrl(BIO *h, int cmd, long arg1, void *arg2);
 static int b64_new(BIO *h);
 static int b64_free(BIO *data);
diff --git a/crypto/evp/bio_enc.c b/crypto/evp/bio_enc.c
index 7d596e0..a4db412 100644
--- a/crypto/evp/bio_enc.c
+++ b/crypto/evp/bio_enc.c
@@ -16,12 +16,6 @@
 
 static int enc_write(BIO *h, const char *buf, int num);
 static int enc_read(BIO *h, char *buf, int size);
-/*
- * static int enc_puts(BIO *h, const char *str);
- */
-/*
- * static int enc_gets(BIO *h, char *str, int size);
- */
 static long enc_ctrl(BIO *h, int cmd, long arg1, void *arg2);
 static int enc_new(BIO *h);
 static int enc_free(BIO *data);
@@ -405,26 +399,6 @@ static long enc_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp)
     return (ret);
 }
 
-/*-
-void BIO_set_cipher_ctx(b,c)
-BIO *b;
-EVP_CIPHER_ctx *c;
-        {
-        if (b == NULL) return;
-
-        if ((b->callback != NULL) &&
-                (b->callback(b,BIO_CB_CTRL,(char *)c,BIO_CTRL_SET,e,0L) <= 0))
-                return;
-
-        b->init=1;
-        ctx=(BIO_ENC_CTX *)b->ptr;
-        memcpy(ctx->cipher,c,sizeof(EVP_CIPHER_CTX));
-
-        if (b->callback != NULL)
-                b->callback(b,BIO_CB_CTRL,(char *)c,BIO_CTRL_SET,e,1L);
-        }
-*/
-
 int BIO_set_cipher(BIO *b, const EVP_CIPHER *c, const unsigned char *k,
                    const unsigned char *i, int e)
 {
diff --git a/crypto/evp/bio_md.c b/crypto/evp/bio_md.c
index c9e3858..619e065 100644
--- a/crypto/evp/bio_md.c
+++ b/crypto/evp/bio_md.c
@@ -22,9 +22,6 @@
 
 static int md_write(BIO *h, char const *buf, int num);
 static int md_read(BIO *h, char *buf, int size);
-/*
- * static int md_puts(BIO *h, const char *str);
- */
 static int md_gets(BIO *h, char *str, int size);
 static long md_ctrl(BIO *h, int cmd, long arg1, void *arg2);
 static int md_new(BIO *h);
diff --git a/crypto/evp/p_seal.c b/crypto/evp/p_seal.c
index faa2464..a2b9497 100644
--- a/crypto/evp/p_seal.c
+++ b/crypto/evp/p_seal.c
@@ -48,18 +48,6 @@ int EVP_SealInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type,
     return (npubk);
 }
 
-/*- MACRO
-void EVP_SealUpdate(ctx,out,outl,in,inl)
-EVP_CIPHER_CTX *ctx;
-unsigned char *out;
-int *outl;
-unsigned char *in;
-int inl;
-        {
-        EVP_EncryptUpdate(ctx,out,outl,in,inl);
-        }
-*/
-
 int EVP_SealFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl)
 {
     int i;
diff --git a/crypto/lhash/lhash.c b/crypto/lhash/lhash.c
index adde832..82de223 100644
--- a/crypto/lhash/lhash.c
+++ b/crypto/lhash/lhash.c
@@ -309,11 +309,6 @@ unsigned long OPENSSL_LH_strhash(const char *c)
 
     if ((c == NULL) || (*c == '\0'))
         return (ret);
-/*-
-    unsigned char b[16];
-    MD5(c,strlen(c),b);
-    return(b[0]|(b[1]<<8)|(b[2]<<16)|(b[3]<<24));
-*/
 
     n = 0x100;
     while (*c) {
diff --git a/crypto/objects/obj_dat.c b/crypto/objects/obj_dat.c
index 259851b..f37e947 100644
--- a/crypto/objects/obj_dat.c
+++ b/crypto/objects/obj_dat.c
@@ -676,7 +676,6 @@ int OBJ_create_objects(BIO *in)
             return (num);
         num++;
     }
-    /* return(num); */
 }
 
 int OBJ_create(const char *oid, const char *sn, const char *ln)
diff --git a/crypto/x509v3/v3_pku.c b/crypto/x509v3/v3_pku.c
index ed82bca..5a7e7d9 100644
--- a/crypto/x509v3/v3_pku.c
+++ b/crypto/x509v3/v3_pku.c
@@ -17,10 +17,7 @@
 static int i2r_PKEY_USAGE_PERIOD(X509V3_EXT_METHOD *method,
                                  PKEY_USAGE_PERIOD *usage, BIO *out,
                                  int indent);
-/*
- * static PKEY_USAGE_PERIOD *v2i_PKEY_USAGE_PERIOD(X509V3_EXT_METHOD *method,
- * X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *values);
- */
+
 const X509V3_EXT_METHOD v3_pkey_usage_period = {
     NID_private_key_usage_period, 0, ASN1_ITEM_ref(PKEY_USAGE_PERIOD),
     0, 0, 0, 0,
@@ -53,13 +50,3 @@ static int i2r_PKEY_USAGE_PERIOD(X509V3_EXT_METHOD *method,
     }
     return 1;
 }
-
-/*-
-static PKEY_USAGE_PERIOD *v2i_PKEY_USAGE_PERIOD(method, ctx, values)
-X509V3_EXT_METHOD *method;
-X509V3_CTX *ctx;
-STACK_OF(CONF_VALUE) *values;
-{
-return NULL;
-}
-*/
diff --git a/ssl/record/rec_layer_d1.c b/ssl/record/rec_layer_d1.c
index ed69589..28da0da 100644
--- a/ssl/record/rec_layer_d1.c
+++ b/ssl/record/rec_layer_d1.c
@@ -1050,20 +1050,11 @@ int do_dtls1_write(SSL *s, int type, const unsigned char *buf,
     }
 
     /* record length after mac and block padding */
-    /*
-     * if (type == SSL3_RT_APPLICATION_DATA || (type == SSL3_RT_ALERT && !
-     * SSL_in_init(s)))
-     */
 
     /* there's only one epoch between handshake and app data */
 
     s2n(s->rlayer.d->w_epoch, pseq);
 
-    /* XDTLS: ?? */
-    /*
-     * else s2n(s->d1->handshake_epoch, pseq);
-     */
-
     memcpy(pseq, &(s->rlayer.write_sequence[2]), 6);
     pseq += 6;
     s2n(SSL3_RECORD_get_length(&wr), pseq);
diff --git a/ssl/s3_lib.c b/ssl/s3_lib.c
index 4f8977a..1669652 100644
--- a/ssl/s3_lib.c
+++ b/ssl/s3_lib.c
@@ -3347,9 +3347,6 @@ long ssl3_ctx_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg)
             ctx->cert->dh_tmp = pkdh;
             return 1;
         }
-        /*
-         * break;
-         */
     case SSL_CTRL_SET_TMP_DH_CB:
         {
             SSLerr(SSL_F_SSL3_CTX_CTRL, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
@@ -3381,7 +3378,6 @@ long ssl3_ctx_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg)
                                    &ctx->ext.supportedgroups_len,
                                    &nid, 1);
         }
-        /* break; */
 #endif                          /* !OPENSSL_NO_EC */
     case SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG:
         ctx->ext.servername_arg = parg;
diff --git a/ssl/ssl_ciph.c b/ssl/ssl_ciph.c
index 0b60deb..5fe2117 100644
--- a/ssl/ssl_ciph.c
+++ b/ssl/ssl_ciph.c
@@ -701,9 +701,6 @@ static void ssl_cipher_collect_ciphers(const SSL_METHOD *ssl_method,
         co_list[co_list_num].prev = NULL;
         co_list[co_list_num].active = 0;
         co_list_num++;
-        /*
-         * if (!sk_push(ca_list,(char *)c)) goto err;
-         */
     }
 
     /*
diff --git a/ssl/statem/statem_clnt.c b/ssl/statem/statem_clnt.c
index 5957718..52f192d 100644
--- a/ssl/statem/statem_clnt.c
+++ b/ssl/statem/statem_clnt.c
@@ -649,8 +649,6 @@ WORK_STATE ossl_statem_client_pre_work(SSL *s, WORK_STATE wst)
 /*
  * Perform any work that needs to be done after sending a message from the
  * client to the server.
-    case TLS_ST_SR_CERT_VRFY:
-        return SSL3_RT_MAX_PLAIN_LENGTH;
  */
 WORK_STATE ossl_statem_client_post_work(SSL *s, WORK_STATE wst)
 {
diff --git a/test/ssltest_old.c b/test/ssltest_old.c
index 649215d..055014b 100644
--- a/test/ssltest_old.c
+++ b/test/ssltest_old.c
@@ -1384,8 +1384,6 @@ int main(int argc, char *argv[])
                     "Warning: For accurate timings, use more connections (e.g. -num 1000)\n");
     }
 
-/*      if (cipher == NULL) cipher=getenv("SSL_CIPHER"); */
-
 #ifndef OPENSSL_NO_COMP
     if (comp == COMP_ZLIB)
         cm = COMP_zlib();
@@ -1538,9 +1536,7 @@ int main(int argc, char *argv[])
         (!SSL_CTX_set_default_verify_paths(s_ctx2)) ||
         (!SSL_CTX_load_verify_locations(c_ctx, CAfile, CApath)) ||
         (!SSL_CTX_set_default_verify_paths(c_ctx))) {
-        /* fprintf(stderr,"SSL_load_verify_locations\n"); */
         ERR_print_errors(bio_err);
-        /* goto end; */
     }
 
 #ifndef OPENSSL_NO_CT
@@ -2702,22 +2698,12 @@ int doit(SSL *s_ssl, SSL *c_ssl, long count)
             if (SSL_in_init(s_ssl))
                 printf("server waiting in SSL_accept - %s\n",
                        SSL_state_string_long(s_ssl));
-/*-
-            else if (s_write)
-                printf("server:SSL_write()\n");
-            else
-                printf("server:SSL_read()\n"); */
         }
 
         if (do_client && debug) {
             if (SSL_in_init(c_ssl))
                 printf("client waiting in SSL_connect - %s\n",
                        SSL_state_string_long(c_ssl));
-/*-
-            else if (c_write)
-                printf("client:SSL_write()\n");
-            else
-                printf("client:SSL_read()\n"); */
         }
 
         if (!do_client && !do_server) {


More information about the openssl-commits mailing list