Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/crypto/external/bsd/openssl.old/dist/crypto protect the inli...



details:   https://anonhg.NetBSD.org/src/rev/225640584dd3
branches:  trunk
changeset: 829535:225640584dd3
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Feb 05 11:52:32 2018 +0000

description:
protect the inline functions with the OPENSSL_VERSION_NUMBER

diffstat:

 crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h       |  2 ++
 crypto/external/bsd/openssl.old/dist/crypto/dsa/dsa.h     |  2 ++
 crypto/external/bsd/openssl.old/dist/crypto/ecdsa/ecdsa.h |  5 +++++
 crypto/external/bsd/openssl.old/dist/crypto/evp/evp.h     |  4 ++++
 crypto/external/bsd/openssl.old/dist/crypto/hmac/hmac.h   |  2 ++
 crypto/external/bsd/openssl.old/dist/crypto/opensslv.h    |  2 ++
 crypto/external/bsd/openssl.old/dist/crypto/rsa/rsa.h     |  4 ++++
 7 files changed, 21 insertions(+), 0 deletions(-)

diffs (134 lines):

diff -r 34b938b34426 -r 225640584dd3 crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h
--- a/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h       Mon Feb 05 11:19:55 2018 +0000
+++ b/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h       Mon Feb 05 11:52:32 2018 +0000
@@ -387,6 +387,7 @@
 # define DH_R_PEER_KEY_ERROR                              113
 # define DH_R_SHARED_INFO_ERROR                           114
 
+#ifdef OPENSSL_VERSION_NUMBER >= 0x10100000L
 static inline void
 DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key)
 {
@@ -425,6 +426,7 @@
 {
        dh->length = length;
 }
+#endif
 
 #ifdef  __cplusplus
 }
diff -r 34b938b34426 -r 225640584dd3 crypto/external/bsd/openssl.old/dist/crypto/dsa/dsa.h
--- a/crypto/external/bsd/openssl.old/dist/crypto/dsa/dsa.h     Mon Feb 05 11:19:55 2018 +0000
+++ b/crypto/external/bsd/openssl.old/dist/crypto/dsa/dsa.h     Mon Feb 05 11:52:32 2018 +0000
@@ -326,6 +326,7 @@
 # define DSA_R_PARAMETER_ENCODING_ERROR                   105
 # define DSA_R_Q_NOT_PRIME                                113
 
+#ifdef OPENSSL_VERSION_NUMBER >= 0x10100000L
 static inline void
 DSA_SIG_get0(const DSA_SIG *sig, const BIGNUM **r, const BIGNUM **s)
 {
@@ -400,6 +401,7 @@
 
        return 1;
 }
+#endif
 
 
 #ifdef  __cplusplus
diff -r 34b938b34426 -r 225640584dd3 crypto/external/bsd/openssl.old/dist/crypto/ecdsa/ecdsa.h
--- a/crypto/external/bsd/openssl.old/dist/crypto/ecdsa/ecdsa.h Mon Feb 05 11:19:55 2018 +0000
+++ b/crypto/external/bsd/openssl.old/dist/crypto/ecdsa/ecdsa.h Mon Feb 05 11:52:32 2018 +0000
@@ -329,6 +329,8 @@
 # define ECDSA_R_RANDOM_NUMBER_GENERATION_FAILED          104
 # define ECDSA_R_SIGNATURE_MALLOC_FAILED                  105
 
+#ifdef OPENSSL_VERSION_NUMBER >= 0x10100000L
+
 static inline void
 ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **r, const BIGNUM **s)
 {
@@ -351,6 +353,9 @@
        }
        return 1;
 }
+
+#endif
+
 #ifdef  __cplusplus
 }
 #endif
diff -r 34b938b34426 -r 225640584dd3 crypto/external/bsd/openssl.old/dist/crypto/evp/evp.h
--- a/crypto/external/bsd/openssl.old/dist/crypto/evp/evp.h     Mon Feb 05 11:19:55 2018 +0000
+++ b/crypto/external/bsd/openssl.old/dist/crypto/evp/evp.h     Mon Feb 05 11:52:32 2018 +0000
@@ -1533,6 +1533,8 @@
 # define EVP_R_WRONG_FINAL_BLOCK_LENGTH                   109
 # define EVP_R_WRONG_PUBLIC_KEY_TYPE                      110
 
+#ifdef OPENSSL_VERSION_NUMBER >= 0x10100000L
+
 static inline EVP_MD_CTX *EVP_MD_CTX_new(void)
 {
        EVP_MD_CTX *ctx = malloc(sizeof(*ctx));
@@ -1557,6 +1559,8 @@
        return pkey->pkey.rsa;
 }
 
+#endif
+
 
 # ifdef  __cplusplus
 }
diff -r 34b938b34426 -r 225640584dd3 crypto/external/bsd/openssl.old/dist/crypto/hmac/hmac.h
--- a/crypto/external/bsd/openssl.old/dist/crypto/hmac/hmac.h   Mon Feb 05 11:19:55 2018 +0000
+++ b/crypto/external/bsd/openssl.old/dist/crypto/hmac/hmac.h   Mon Feb 05 11:52:32 2018 +0000
@@ -102,6 +102,7 @@
 
 void HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags);
 
+#ifdef OPENSSL_VERSION_NUMBER >= 0x10100000L
 static inline HMAC_CTX *HMAC_CTX_new(void)
 {
        HMAC_CTX *ctx = malloc(sizeof(*ctx));
@@ -118,6 +119,7 @@
        HMAC_CTX_cleanup(ctx);
        free(ctx);
 }
+#endif
 
 
 #ifdef  __cplusplus
diff -r 34b938b34426 -r 225640584dd3 crypto/external/bsd/openssl.old/dist/crypto/opensslv.h
--- a/crypto/external/bsd/openssl.old/dist/crypto/opensslv.h    Mon Feb 05 11:19:55 2018 +0000
+++ b/crypto/external/bsd/openssl.old/dist/crypto/opensslv.h    Mon Feb 05 11:52:32 2018 +0000
@@ -30,7 +30,9 @@
  * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for
  *  major minor fix final patch/beta)
  */
+# ifndef OPENSSL_VERSION_NUMBER
 # define OPENSSL_VERSION_NUMBER  0x100020bfL
+# endif
 # ifdef OPENSSL_FIPS
 #  define OPENSSL_VERSION_TEXT    "OpenSSL 1.0.2k-fips  26 Jan 2017"
 # else
diff -r 34b938b34426 -r 225640584dd3 crypto/external/bsd/openssl.old/dist/crypto/rsa/rsa.h
--- a/crypto/external/bsd/openssl.old/dist/crypto/rsa/rsa.h     Mon Feb 05 11:19:55 2018 +0000
+++ b/crypto/external/bsd/openssl.old/dist/crypto/rsa/rsa.h     Mon Feb 05 11:52:32 2018 +0000
@@ -660,6 +660,8 @@
 
 #include <string.h>
 
+#ifdef OPENSSL_VERSION_NUMBER >= 0x10100000L
+
 static inline RSA_METHOD *RSA_meth_dup(const RSA_METHOD *meth)
 {
        RSA_METHOD *ret = malloc(sizeof(*meth));
@@ -832,6 +834,8 @@
                *iqmp = r->iqmp;
 }
 
+#endif
+
 
 #ifdef  __cplusplus
 }



Home | Main Index | Thread Index | Old Index