[openssl-commits] [openssl] master update

Richard Levitte levitte at openssl.org
Sat May 28 00:15:09 UTC 2016


The branch master has been updated
       via  38e19eb96f2fa9c97f7786dcb988bf4b91c98149 (commit)
       via  da32e04b5e879e433f8e7a584af999ed804be7d9 (commit)
       via  7233bea26350d0541909a2fe30e87a95327fb065 (commit)
      from  90edbfcce3b84287332ac77f19993cbc18effdef (commit)


- Log -----------------------------------------------------------------
commit 38e19eb96f2fa9c97f7786dcb988bf4b91c98149
Author: Richard Levitte <levitte at openssl.org>
Date:   Fri May 27 10:46:42 2016 +0200

    Change a call of OPENSSL_strcasecmp to strcasecmp
    
    Reviewed-by: Viktor Dukhovni <viktor at openssl.org>

commit da32e04b5e879e433f8e7a584af999ed804be7d9
Author: Richard Levitte <levitte at openssl.org>
Date:   Fri May 27 10:17:42 2016 +0200

    make update
    
    Reviewed-by: Viktor Dukhovni <viktor at openssl.org>

commit 7233bea26350d0541909a2fe30e87a95327fb065
Author: Richard Levitte <levitte at openssl.org>
Date:   Fri May 27 10:12:58 2016 +0200

    Remove internal functions OPENSSL_strcasecmp and OPENSSL_strncasecmp
    
    Their only reason to exist was that they didn't exist in VMS before
    version 7.0.  We do not support such old versions any more.
    
    However, for the benefit of systems that don't get strings.h included
    by string.h, we include the former in e_os.h.
    
    RT#4458
    
    Reviewed-by: Viktor Dukhovni <viktor at openssl.org>

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

Summary of changes:
 crypto/o_str.c           | 43 -------------------------------------------
 crypto/x509v3/v3_tlsf.c  |  2 +-
 e_os.h                   |  8 ++------
 include/internal/o_str.h |  2 --
 util/libcrypto.num       |  4 ++--
 5 files changed, 5 insertions(+), 54 deletions(-)

diff --git a/crypto/o_str.c b/crypto/o_str.c
index b0e7524..29c324f 100644
--- a/crypto/o_str.c
+++ b/crypto/o_str.c
@@ -14,49 +14,6 @@
 #include "internal/cryptlib.h"
 #include "internal/o_str.h"
 
-#if !defined(OPENSSL_IMPLEMENTS_strncasecmp) && \
-    !defined(OPENSSL_SYS_WIN32) && !defined(OPENSSL_SYS_WINCE) && \
-    !defined(NETWARE_CLIB)
-# include <strings.h>
-#endif
-
-int OPENSSL_strncasecmp(const char *str1, const char *str2, size_t n)
-{
-#if defined(OPENSSL_IMPLEMENTS_strncasecmp)
-    while (*str1 && *str2 && n) {
-        int res = toupper(*str1) - toupper(*str2);
-        if (res)
-            return res < 0 ? -1 : 1;
-        str1++;
-        str2++;
-        n--;
-    }
-    if (n == 0)
-        return 0;
-    if (*str1)
-        return 1;
-    if (*str2)
-        return -1;
-    return 0;
-#else
-    /*
-     * Recursion hazard warning! Whenever strncasecmp is #defined as
-     * OPENSSL_strncasecmp, OPENSSL_IMPLEMENTS_strncasecmp must be defined as
-     * well.
-     */
-    return strncasecmp(str1, str2, n);
-#endif
-}
-
-int OPENSSL_strcasecmp(const char *str1, const char *str2)
-{
-#if defined(OPENSSL_IMPLEMENTS_strncasecmp)
-    return OPENSSL_strncasecmp(str1, str2, (size_t)-1);
-#else
-    return strcasecmp(str1, str2);
-#endif
-}
-
 int OPENSSL_memcmp(const void *v1, const void *v2, size_t n)
 {
     const unsigned char *c1 = v1, *c2 = v2;
diff --git a/crypto/x509v3/v3_tlsf.c b/crypto/x509v3/v3_tlsf.c
index ffcb5b7..fec6724 100644
--- a/crypto/x509v3/v3_tlsf.c
+++ b/crypto/x509v3/v3_tlsf.c
@@ -107,7 +107,7 @@ static TLS_FEATURE *v2i_TLS_FEATURE(const X509V3_EXT_METHOD *method,
             extval = val->name;
 
         for (j = 0; j < OSSL_NELEM(tls_feature_tbl); j++)
-            if (OPENSSL_strcasecmp(extval, tls_feature_tbl[j].name) == 0)
+            if (strcasecmp(extval, tls_feature_tbl[j].name) == 0)
                 break;
         if (j < OSSL_NELEM(tls_feature_tbl))
             tlsextid = tls_feature_tbl[j].num;
diff --git a/e_os.h b/e_os.h
index 53e0ecf..700d7d0 100644
--- a/e_os.h
+++ b/e_os.h
@@ -476,12 +476,8 @@ struct servent *PASCAL getservbyname(const char *, const char *);
 #   define strdup _strdup
 #   define unlink _unlink
 #  endif
-# elif defined(OPENSSL_SYS_VMS)
-/* VMS below version 7.0 doesn't have strcasecmp() */
-#  include "internal/o_str.h"
-#  define strcasecmp OPENSSL_strcasecmp
-#  define strncasecmp OPENSSL_strncasecmp
-#  define OPENSSL_IMPLEMENTS_strncasecmp
+# else
+#  include <strings.h>
 # endif
 
 /* vxworks */
diff --git a/include/internal/o_str.h b/include/internal/o_str.h
index c1bf7ef..86403c9 100644
--- a/include/internal/o_str.h
+++ b/include/internal/o_str.h
@@ -12,8 +12,6 @@
 
 # include <stddef.h>            /* to get size_t */
 
-int OPENSSL_strcasecmp(const char *str1, const char *str2);
-int OPENSSL_strncasecmp(const char *str1, const char *str2, size_t n);
 int OPENSSL_memcmp(const void *p1, const void *p2, size_t n);
 
 #endif
diff --git a/util/libcrypto.num b/util/libcrypto.num
index 7583e07..32c36d9 100644
--- a/util/libcrypto.num
+++ b/util/libcrypto.num
@@ -258,7 +258,7 @@ ENGINE_register_all_ciphers             254	1_1_0	EXIST::FUNCTION:ENGINE
 SXNET_new                               255	1_1_0	EXIST::FUNCTION:
 EVP_camellia_256_ctr                    256	1_1_0	EXIST::FUNCTION:CAMELLIA
 d2i_PKCS8_PRIV_KEY_INFO                 257	1_1_0	EXIST::FUNCTION:
-OPENSSL_strncasecmp                     258	1_1_0	EXIST::FUNCTION:
+OPENSSL_strncasecmp                     258	1_1_0	NOEXIST::FUNCTION:
 EVP_md2                                 259	1_1_0	EXIST::FUNCTION:MD2
 RC2_ecb_encrypt                         260	1_1_0	EXIST::FUNCTION:RC2
 ENGINE_register_DH                      261	1_1_0	EXIST::FUNCTION:ENGINE
@@ -2256,7 +2256,7 @@ CMS_RecipientInfo_kari_orig_id_cmp      2184	1_1_0	EXIST::FUNCTION:CMS
 NETSCAPE_SPKI_b64_encode                2185	1_1_0	EXIST::FUNCTION:
 d2i_PrivateKey                          2186	1_1_0	EXIST::FUNCTION:
 EVP_MD_CTX_new                          2187	1_1_0	EXIST::FUNCTION:
-OPENSSL_strcasecmp                      2188	1_1_0	EXIST::FUNCTION:
+OPENSSL_strcasecmp                      2188	1_1_0	NOEXIST::FUNCTION:
 X509_get0_tbs_sigalg                    2189	1_1_0	EXIST::FUNCTION:
 ASN1_GENERALIZEDTIME_new                2190	1_1_0	EXIST::FUNCTION:
 d2i_ECDSA_SIG                           2191	1_1_0	EXIST::FUNCTION:EC


More information about the openssl-commits mailing list