CVS commit: src/crypto/external/bsd/openssl.old/dist/crypto

2018-08-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Aug  8 19:19:36 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl.old/dist/crypto/evp: evp.h
src/crypto/external/bsd/openssl.old/dist/crypto/x509: x509_vfy.h

Log Message:
Add missing functions for racoon2 to compile under netbsd-8
>From Chuck Zmudzinski
XXX: pullup-8 (to openssl not openssl.old)


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/crypto/external/bsd/openssl.old/dist/crypto/evp/evp.h
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/crypto/external/bsd/openssl.old/dist/crypto/x509/x509_vfy.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl.old/dist/crypto/evp/evp.h
diff -u src/crypto/external/bsd/openssl.old/dist/crypto/evp/evp.h:1.5 src/crypto/external/bsd/openssl.old/dist/crypto/evp/evp.h:1.6
--- src/crypto/external/bsd/openssl.old/dist/crypto/evp/evp.h:1.5	Tue Feb  6 14:58:30 2018
+++ src/crypto/external/bsd/openssl.old/dist/crypto/evp/evp.h	Wed Aug  8 15:19:36 2018
@@ -1559,6 +1559,14 @@ static inline RSA *EVP_PKEY_get0_RSA(EVP
 	return pkey->pkey.rsa;
 }
 
+static inline DSA *EVP_PKEY_get0_DSA(EVP_PKEY *pkey)
+{
+	if (pkey->type != EVP_PKEY_DSA) {
+		return NULL;
+	}
+	return pkey->pkey.dsa;
+}
+
 #endif
 
 

Index: src/crypto/external/bsd/openssl.old/dist/crypto/x509/x509_vfy.h
diff -u src/crypto/external/bsd/openssl.old/dist/crypto/x509/x509_vfy.h:1.1.1.1 src/crypto/external/bsd/openssl.old/dist/crypto/x509/x509_vfy.h:1.2
--- src/crypto/external/bsd/openssl.old/dist/crypto/x509/x509_vfy.h:1.1.1.1	Sat Feb  3 17:43:48 2018
+++ src/crypto/external/bsd/openssl.old/dist/crypto/x509/x509_vfy.h	Wed Aug  8 15:19:36 2018
@@ -645,6 +645,15 @@ STACK_OF(POLICYQUALINFO) *X509_policy_no
*node);
 const X509_POLICY_NODE *X509_policy_node_get0_parent(const X509_POLICY_NODE
  *node);
+#if OPENSSL_API_COMPAT >= 0x1010L
+
+static inline X509 *
+X509_STORE_CTX_get0_cert(X509_STORE_CTX *x)
+{ 
+	return X509_STORE_CTX_get_current_cert(x);
+}
+ 
+#endif
 
 #ifdef  __cplusplus
 }



CVS commit: src/crypto/external/bsd/openssl.old/dist/crypto/hmac

2018-02-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb  9 17:11:14 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl.old/dist/crypto/hmac: hmac.h

Log Message:
add reset, needed by nsd.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 \
src/crypto/external/bsd/openssl.old/dist/crypto/hmac/hmac.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl.old/dist/crypto/hmac/hmac.h
diff -u src/crypto/external/bsd/openssl.old/dist/crypto/hmac/hmac.h:1.6 src/crypto/external/bsd/openssl.old/dist/crypto/hmac/hmac.h:1.7
--- src/crypto/external/bsd/openssl.old/dist/crypto/hmac/hmac.h:1.6	Tue Feb  6 14:58:30 2018
+++ src/crypto/external/bsd/openssl.old/dist/crypto/hmac/hmac.h	Fri Feb  9 12:11:14 2018
@@ -119,6 +119,12 @@ static inline void HMAC_CTX_free(HMAC_CT
 	HMAC_CTX_cleanup(ctx);
 	free(ctx);
 }
+
+static inline void HMAC_CTX_reset(HMAC_CTX *ctx)
+{
+	HMAC_CTX_cleanup(ctx);
+	HMAC_CTX_init(ctx);
+}
 #endif
 
 



CVS commit: src/crypto/external/bsd/openssl.old/dist/crypto/asn1

2018-02-08 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Thu Feb  8 20:18:03 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl.old/dist/crypto/asn1: asn1.h

Log Message:
Add ASN1_STRING_get0_data() glue for OPENSSL_API_COMPAT >= 0x1010L


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/crypto/external/bsd/openssl.old/dist/crypto/asn1/asn1.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl.old/dist/crypto/asn1/asn1.h
diff -u src/crypto/external/bsd/openssl.old/dist/crypto/asn1/asn1.h:1.1.1.1 src/crypto/external/bsd/openssl.old/dist/crypto/asn1/asn1.h:1.2
--- src/crypto/external/bsd/openssl.old/dist/crypto/asn1/asn1.h:1.1.1.1	Sat Feb  3 22:43:42 2018
+++ src/crypto/external/bsd/openssl.old/dist/crypto/asn1/asn1.h	Thu Feb  8 20:18:03 2018
@@ -1413,6 +1413,14 @@ void ERR_load_ASN1_strings(void);
 # define ASN1_R_WRONG_TAG 168
 # define ASN1_R_WRONG_TYPE169
 
+#if OPENSSL_API_COMPAT >= 0x1010L
+static inline const unsigned char *
+ASN1_STRING_get0_data(const ASN1_STRING *x)
+{
+	return ASN1_STRING_data(__UNCONST(x));
+}
+#endif
+
 #ifdef  __cplusplus
 }
 #endif



CVS commit: src/crypto/external/bsd/openssl.old/dist/crypto/dh

2018-02-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Feb  7 13:16:25 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl.old/dist/crypto/dh: dh.h

Log Message:
add set0_key needed by racoon


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 \
src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h
diff -u src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h:1.7 src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h:1.8
--- src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h:1.7	Tue Feb  6 14:58:30 2018
+++ src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h	Wed Feb  7 08:16:25 2018
@@ -397,6 +397,20 @@ DH_get0_key(const DH *dh, const BIGNUM *
 		*priv_key = dh->priv_key;
 }
 
+static inline int
+DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key)
+{
+	if (pub_key) {
+		BN_free(dh->pub_key);
+		dh->pub_key = pub_key;
+	}
+	if (priv_key) {
+		BN_free(dh->priv_key);
+		dh->priv_key = priv_key;
+	}
+	return 1;
+}
+
 static inline void
 DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q,
 const BIGNUM **g)



CVS commit: src/crypto/external/bsd/openssl.old/dist/crypto

2018-02-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Feb  6 19:58:31 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl.old/dist/crypto: opensslv.h
src/crypto/external/bsd/openssl.old/dist/crypto/dh: dh.h
src/crypto/external/bsd/openssl.old/dist/crypto/dsa: dsa.h
src/crypto/external/bsd/openssl.old/dist/crypto/ecdsa: ecdsa.h
src/crypto/external/bsd/openssl.old/dist/crypto/evp: evp.h
src/crypto/external/bsd/openssl.old/dist/crypto/hmac: hmac.h
src/crypto/external/bsd/openssl.old/dist/crypto/rsa: rsa.h
src/crypto/external/bsd/openssl.old/dist/crypto/x509v3: x509v3.h

Log Message:
use OPENSSL_API_COMPAT instead of hacking the version


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl.old/dist/crypto/opensslv.h
cvs rdiff -u -r1.6 -r1.7 \
src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h
cvs rdiff -u -r1.5 -r1.6 \
src/crypto/external/bsd/openssl.old/dist/crypto/dsa/dsa.h
cvs rdiff -u -r1.4 -r1.5 \
src/crypto/external/bsd/openssl.old/dist/crypto/ecdsa/ecdsa.h
cvs rdiff -u -r1.4 -r1.5 \
src/crypto/external/bsd/openssl.old/dist/crypto/evp/evp.h
cvs rdiff -u -r1.5 -r1.6 \
src/crypto/external/bsd/openssl.old/dist/crypto/hmac/hmac.h
cvs rdiff -u -r1.5 -r1.6 \
src/crypto/external/bsd/openssl.old/dist/crypto/rsa/rsa.h
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl.old/dist/crypto/x509v3/x509v3.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl.old/dist/crypto/opensslv.h
diff -u src/crypto/external/bsd/openssl.old/dist/crypto/opensslv.h:1.2 src/crypto/external/bsd/openssl.old/dist/crypto/opensslv.h:1.3
--- src/crypto/external/bsd/openssl.old/dist/crypto/opensslv.h:1.2	Mon Feb  5 06:52:32 2018
+++ src/crypto/external/bsd/openssl.old/dist/crypto/opensslv.h	Tue Feb  6 14:58:29 2018
@@ -30,9 +30,7 @@ extern "C" {
  * (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

Index: src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h
diff -u src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h:1.6 src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h:1.7
--- src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h:1.6	Mon Feb  5 15:23:47 2018
+++ src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h	Tue Feb  6 14:58:30 2018
@@ -387,7 +387,7 @@ void ERR_load_DH_strings(void);
 # define DH_R_PEER_KEY_ERROR  113
 # define DH_R_SHARED_INFO_ERROR   114
 
-#if OPENSSL_VERSION_NUMBER >= 0x1010L
+#if OPENSSL_API_COMPAT >= 0x1010L
 static inline void
 DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key)
 {

Index: src/crypto/external/bsd/openssl.old/dist/crypto/dsa/dsa.h
diff -u src/crypto/external/bsd/openssl.old/dist/crypto/dsa/dsa.h:1.5 src/crypto/external/bsd/openssl.old/dist/crypto/dsa/dsa.h:1.6
--- src/crypto/external/bsd/openssl.old/dist/crypto/dsa/dsa.h:1.5	Mon Feb  5 15:27:06 2018
+++ src/crypto/external/bsd/openssl.old/dist/crypto/dsa/dsa.h	Tue Feb  6 14:58:30 2018
@@ -326,7 +326,7 @@ void ERR_load_DSA_strings(void);
 # define DSA_R_PARAMETER_ENCODING_ERROR   105
 # define DSA_R_Q_NOT_PRIME113
 
-#if OPENSSL_VERSION_NUMBER >= 0x1010L
+#if OPENSSL_API_COMPAT >= 0x1010L
 static inline void
 DSA_SIG_get0(const DSA_SIG *sig, const BIGNUM **r, const BIGNUM **s)
 {

Index: src/crypto/external/bsd/openssl.old/dist/crypto/ecdsa/ecdsa.h
diff -u src/crypto/external/bsd/openssl.old/dist/crypto/ecdsa/ecdsa.h:1.4 src/crypto/external/bsd/openssl.old/dist/crypto/ecdsa/ecdsa.h:1.5
--- src/crypto/external/bsd/openssl.old/dist/crypto/ecdsa/ecdsa.h:1.4	Mon Feb  5 06:55:46 2018
+++ src/crypto/external/bsd/openssl.old/dist/crypto/ecdsa/ecdsa.h	Tue Feb  6 14:58:30 2018
@@ -329,7 +329,7 @@ void ERR_load_ECDSA_strings(void);
 # define ECDSA_R_RANDOM_NUMBER_GENERATION_FAILED  104
 # define ECDSA_R_SIGNATURE_MALLOC_FAILED  105
 
-#if OPENSSL_VERSION_NUMBER >= 0x1010L
+#if OPENSSL_API_COMPAT >= 0x1010L
 
 static inline void
 ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **r, const BIGNUM **s)

Index: src/crypto/external/bsd/openssl.old/dist/crypto/evp/evp.h
diff -u src/crypto/external/bsd/openssl.old/dist/crypto/evp/evp.h:1.4 src/crypto/external/bsd/openssl.old/dist/crypto/evp/evp.h:1.5
--- src/crypto/external/bsd/openssl.old/dist/crypto/evp/evp.h:1.4	Mon Feb  5 06:55:47 2018
+++ src/crypto/external/bsd/openssl.old/dist/crypto/evp/evp.h	Tue Feb  6 14:58:30 2018
@@ -1533,7 +1533,7 @@ void ERR_load_EVP_strings(void);
 # define EVP_R_WRONG_FINA

CVS commit: src/crypto/external/bsd/openssl.old/dist/crypto/x509v3

2018-02-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Feb  6 19:51:25 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl.old/dist/crypto/x509v3: x509v3.h

Log Message:
added 1.1 api


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/crypto/external/bsd/openssl.old/dist/crypto/x509v3/x509v3.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl.old/dist/crypto/x509v3/x509v3.h
diff -u src/crypto/external/bsd/openssl.old/dist/crypto/x509v3/x509v3.h:1.1.1.1 src/crypto/external/bsd/openssl.old/dist/crypto/x509v3/x509v3.h:1.2
--- src/crypto/external/bsd/openssl.old/dist/crypto/x509v3/x509v3.h:1.1.1.1	Sat Feb  3 17:43:48 2018
+++ src/crypto/external/bsd/openssl.old/dist/crypto/x509v3/x509v3.h	Tue Feb  6 14:51:25 2018
@@ -1049,6 +1049,15 @@ void ERR_load_X509V3_strings(void);
 # define X509V3_R_UNSUPPORTED_TYPE167
 # define X509V3_R_USER_TOO_LONG   132
 
+#if OPENSSL_VERSION_NUMBER >= 0x1010L
+static inline uint32_t
+X509_get_extended_key_usage(X509 *x)
+{
+	return x->ex_xkusage;
+}
+
+#endif
+
 #ifdef  __cplusplus
 }
 #endif



CVS commit: src/crypto/external/bsd/openssl.old/dist/crypto/dsa

2018-02-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Feb  5 20:27:06 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl.old/dist/crypto/dsa: dsa.h

Log Message:
add DSA_bits()


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/crypto/external/bsd/openssl.old/dist/crypto/dsa/dsa.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl.old/dist/crypto/dsa/dsa.h
diff -u src/crypto/external/bsd/openssl.old/dist/crypto/dsa/dsa.h:1.4 src/crypto/external/bsd/openssl.old/dist/crypto/dsa/dsa.h:1.5
--- src/crypto/external/bsd/openssl.old/dist/crypto/dsa/dsa.h:1.4	Mon Feb  5 06:55:46 2018
+++ src/crypto/external/bsd/openssl.old/dist/crypto/dsa/dsa.h	Mon Feb  5 15:27:06 2018
@@ -401,6 +401,11 @@ static inline int DSA_set0_key(DSA *d, B
 
 	return 1;
 }
+
+static inline int DSA_bits(const DSA *d)
+{
+	return BN_num_bits(d->p);
+}
 #endif
 
 



CVS commit: src/crypto/external/bsd/openssl.old/dist/crypto/dh

2018-02-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Feb  5 20:23:47 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl.old/dist/crypto/dh: dh.h

Log Message:
fix inline


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h
diff -u src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h:1.5 src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h:1.6
--- src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h:1.5	Mon Feb  5 11:09:09 2018
+++ src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h	Mon Feb  5 15:23:47 2018
@@ -427,7 +427,8 @@ DH_set_length(DH *dh, long length)
 	dh->length = length;
 }
 
-const char *DH_meth_get0_name(const DH_METHOD *meth)
+static inline const char *
+DH_meth_get0_name(const DH_METHOD *meth)
 {
 	return meth->name;
 }   



CVS commit: src/crypto/external/bsd/openssl.old/dist/crypto

2018-02-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Feb  5 16:09:09 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl.old/dist/crypto/dh: dh.h
src/crypto/external/bsd/openssl.old/dist/crypto/rsa: rsa.h

Log Message:
add more functions that heimdal uses.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h
cvs rdiff -u -r1.4 -r1.5 \
src/crypto/external/bsd/openssl.old/dist/crypto/rsa/rsa.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h
diff -u src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h:1.4 src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h:1.5
--- src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h:1.4	Mon Feb  5 06:55:46 2018
+++ src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h	Mon Feb  5 11:09:09 2018
@@ -426,6 +426,13 @@ DH_set_length(DH *dh, long length)
 {
 	dh->length = length;
 }
+
+const char *DH_meth_get0_name(const DH_METHOD *meth)
+{
+	return meth->name;
+}   
+
+
 #endif
 
 #ifdef  __cplusplus

Index: src/crypto/external/bsd/openssl.old/dist/crypto/rsa/rsa.h
diff -u src/crypto/external/bsd/openssl.old/dist/crypto/rsa/rsa.h:1.4 src/crypto/external/bsd/openssl.old/dist/crypto/rsa/rsa.h:1.5
--- src/crypto/external/bsd/openssl.old/dist/crypto/rsa/rsa.h:1.4	Mon Feb  5 06:55:47 2018
+++ src/crypto/external/bsd/openssl.old/dist/crypto/rsa/rsa.h	Mon Feb  5 11:09:09 2018
@@ -686,6 +686,14 @@ static inline int RSA_meth_set1_name(RSA
 	return 1;
 }
 
+static inline int RSA_meth_set_pub_enc(RSA_METHOD *meth,
+int (*pub_enc) (int flen, const unsigned char *from,
+unsigned char *to, RSA *rsa, int padding))
+{
+	meth->rsa_pub_enc = pub_enc;
+	return 1;
+}
+
 static inline int RSA_meth_set_priv_enc(RSA_METHOD *meth,
 int (*priv_enc) (int flen, const unsigned char *from,
 unsigned char *to, RSA *rsa, int padding))
@@ -822,7 +830,6 @@ static inline int RSA_bits(const RSA *r)
 	return BN_num_bits(r->n);
 }
 
-
 static inline void RSA_get0_crt_params(const RSA *r, const BIGNUM **dmp1,
  const BIGNUM **dmq1, const BIGNUM **iqmp)
 {
@@ -834,6 +841,17 @@ static inline void RSA_get0_crt_params(c
 		*iqmp = r->iqmp;
 }
 
+static inline int RSA_meth_set_init(RSA_METHOD *meth, int (*init)(RSA *rsa))
+{
+	meth->init = init;
+	return 1;
+}   
+
+static inline const char *RSA_meth_get0_name(const RSA_METHOD *meth)
+{
+	return meth->name;
+}   
+
 #endif
 
 



CVS commit: src/crypto/external/bsd/openssl.old/dist/crypto

2018-02-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Feb  5 11:55:47 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl.old/dist/crypto/dh: dh.h
src/crypto/external/bsd/openssl.old/dist/crypto/dsa: dsa.h
src/crypto/external/bsd/openssl.old/dist/crypto/ecdsa: ecdsa.h
src/crypto/external/bsd/openssl.old/dist/crypto/evp: evp.h
src/crypto/external/bsd/openssl.old/dist/crypto/hmac: hmac.h
src/crypto/external/bsd/openssl.old/dist/crypto/rsa: rsa.h

Log Message:
#if not #ifdef


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h
cvs rdiff -u -r1.3 -r1.4 \
src/crypto/external/bsd/openssl.old/dist/crypto/dsa/dsa.h
cvs rdiff -u -r1.3 -r1.4 \
src/crypto/external/bsd/openssl.old/dist/crypto/ecdsa/ecdsa.h
cvs rdiff -u -r1.3 -r1.4 \
src/crypto/external/bsd/openssl.old/dist/crypto/evp/evp.h
cvs rdiff -u -r1.3 -r1.4 \
src/crypto/external/bsd/openssl.old/dist/crypto/hmac/hmac.h
cvs rdiff -u -r1.3 -r1.4 \
src/crypto/external/bsd/openssl.old/dist/crypto/rsa/rsa.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h
diff -u src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h:1.3 src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h:1.4
--- src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h:1.3	Mon Feb  5 06:52:33 2018
+++ src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h	Mon Feb  5 06:55:46 2018
@@ -387,7 +387,7 @@ void ERR_load_DH_strings(void);
 # define DH_R_PEER_KEY_ERROR  113
 # define DH_R_SHARED_INFO_ERROR   114
 
-#ifdef OPENSSL_VERSION_NUMBER >= 0x1010L
+#if OPENSSL_VERSION_NUMBER >= 0x1010L
 static inline void
 DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key)
 {

Index: src/crypto/external/bsd/openssl.old/dist/crypto/dsa/dsa.h
diff -u src/crypto/external/bsd/openssl.old/dist/crypto/dsa/dsa.h:1.3 src/crypto/external/bsd/openssl.old/dist/crypto/dsa/dsa.h:1.4
--- src/crypto/external/bsd/openssl.old/dist/crypto/dsa/dsa.h:1.3	Mon Feb  5 06:52:33 2018
+++ src/crypto/external/bsd/openssl.old/dist/crypto/dsa/dsa.h	Mon Feb  5 06:55:46 2018
@@ -326,7 +326,7 @@ void ERR_load_DSA_strings(void);
 # define DSA_R_PARAMETER_ENCODING_ERROR   105
 # define DSA_R_Q_NOT_PRIME113
 
-#ifdef OPENSSL_VERSION_NUMBER >= 0x1010L
+#if OPENSSL_VERSION_NUMBER >= 0x1010L
 static inline void
 DSA_SIG_get0(const DSA_SIG *sig, const BIGNUM **r, const BIGNUM **s)
 {

Index: src/crypto/external/bsd/openssl.old/dist/crypto/ecdsa/ecdsa.h
diff -u src/crypto/external/bsd/openssl.old/dist/crypto/ecdsa/ecdsa.h:1.3 src/crypto/external/bsd/openssl.old/dist/crypto/ecdsa/ecdsa.h:1.4
--- src/crypto/external/bsd/openssl.old/dist/crypto/ecdsa/ecdsa.h:1.3	Mon Feb  5 06:52:33 2018
+++ src/crypto/external/bsd/openssl.old/dist/crypto/ecdsa/ecdsa.h	Mon Feb  5 06:55:46 2018
@@ -329,7 +329,7 @@ void ERR_load_ECDSA_strings(void);
 # define ECDSA_R_RANDOM_NUMBER_GENERATION_FAILED  104
 # define ECDSA_R_SIGNATURE_MALLOC_FAILED  105
 
-#ifdef OPENSSL_VERSION_NUMBER >= 0x1010L
+#if OPENSSL_VERSION_NUMBER >= 0x1010L
 
 static inline void
 ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **r, const BIGNUM **s)

Index: src/crypto/external/bsd/openssl.old/dist/crypto/evp/evp.h
diff -u src/crypto/external/bsd/openssl.old/dist/crypto/evp/evp.h:1.3 src/crypto/external/bsd/openssl.old/dist/crypto/evp/evp.h:1.4
--- src/crypto/external/bsd/openssl.old/dist/crypto/evp/evp.h:1.3	Mon Feb  5 06:52:33 2018
+++ src/crypto/external/bsd/openssl.old/dist/crypto/evp/evp.h	Mon Feb  5 06:55:47 2018
@@ -1533,7 +1533,7 @@ void ERR_load_EVP_strings(void);
 # define EVP_R_WRONG_FINAL_BLOCK_LENGTH   109
 # define EVP_R_WRONG_PUBLIC_KEY_TYPE  110
 
-#ifdef OPENSSL_VERSION_NUMBER >= 0x1010L
+#if OPENSSL_VERSION_NUMBER >= 0x1010L
 
 static inline EVP_MD_CTX *EVP_MD_CTX_new(void)
 {

Index: src/crypto/external/bsd/openssl.old/dist/crypto/hmac/hmac.h
diff -u src/crypto/external/bsd/openssl.old/dist/crypto/hmac/hmac.h:1.3 src/crypto/external/bsd/openssl.old/dist/crypto/hmac/hmac.h:1.4
--- src/crypto/external/bsd/openssl.old/dist/crypto/hmac/hmac.h:1.3	Mon Feb  5 06:52:33 2018
+++ src/crypto/external/bsd/openssl.old/dist/crypto/hmac/hmac.h	Mon Feb  5 06:55:47 2018
@@ -102,7 +102,7 @@ int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_C
 
 void HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags);
 
-#ifdef OPENSSL_VERSION_NUMBER >= 0x1010L
+#if OPENSSL_VERSION_NUMBER >= 0x1010L
 static inline HMAC_CTX *HMAC_CTX_new(void)
 {
 	HMAC_CTX *ctx = malloc(sizeof(*ctx));

Index: src/crypto/external/bsd/openssl.old/dist/crypto/rsa/rsa.h
diff -u src/crypto/external/bsd/openssl.old/dist/crypto/rsa/

CVS commit: src/crypto/external/bsd/openssl.old/dist/crypto

2018-02-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Feb  5 11:52:33 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl.old/dist/crypto: opensslv.h
src/crypto/external/bsd/openssl.old/dist/crypto/dh: dh.h
src/crypto/external/bsd/openssl.old/dist/crypto/dsa: dsa.h
src/crypto/external/bsd/openssl.old/dist/crypto/ecdsa: ecdsa.h
src/crypto/external/bsd/openssl.old/dist/crypto/evp: evp.h
src/crypto/external/bsd/openssl.old/dist/crypto/hmac: hmac.h
src/crypto/external/bsd/openssl.old/dist/crypto/rsa: rsa.h

Log Message:
protect the inline functions with the OPENSSL_VERSION_NUMBER


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/crypto/external/bsd/openssl.old/dist/crypto/opensslv.h
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl.old/dist/crypto/dsa/dsa.h
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl.old/dist/crypto/ecdsa/ecdsa.h
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl.old/dist/crypto/evp/evp.h
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl.old/dist/crypto/hmac/hmac.h
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl.old/dist/crypto/rsa/rsa.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl.old/dist/crypto/opensslv.h
diff -u src/crypto/external/bsd/openssl.old/dist/crypto/opensslv.h:1.1.1.1 src/crypto/external/bsd/openssl.old/dist/crypto/opensslv.h:1.2
--- src/crypto/external/bsd/openssl.old/dist/crypto/opensslv.h:1.1.1.1	Sat Feb  3 17:43:41 2018
+++ src/crypto/external/bsd/openssl.old/dist/crypto/opensslv.h	Mon Feb  5 06:52:32 2018
@@ -30,7 +30,9 @@ extern "C" {
  * (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

Index: src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h
diff -u src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h:1.2 src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h:1.3
--- src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h:1.2	Sun Feb  4 19:11:33 2018
+++ src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h	Mon Feb  5 06:52:33 2018
@@ -387,6 +387,7 @@ void ERR_load_DH_strings(void);
 # define DH_R_PEER_KEY_ERROR  113
 # define DH_R_SHARED_INFO_ERROR   114
 
+#ifdef OPENSSL_VERSION_NUMBER >= 0x1010L
 static inline void
 DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key)
 {
@@ -425,6 +426,7 @@ DH_set_length(DH *dh, long length)
 {
 	dh->length = length;
 }
+#endif
 
 #ifdef  __cplusplus
 }

Index: src/crypto/external/bsd/openssl.old/dist/crypto/dsa/dsa.h
diff -u src/crypto/external/bsd/openssl.old/dist/crypto/dsa/dsa.h:1.2 src/crypto/external/bsd/openssl.old/dist/crypto/dsa/dsa.h:1.3
--- src/crypto/external/bsd/openssl.old/dist/crypto/dsa/dsa.h:1.2	Sun Feb  4 19:11:33 2018
+++ src/crypto/external/bsd/openssl.old/dist/crypto/dsa/dsa.h	Mon Feb  5 06:52:33 2018
@@ -326,6 +326,7 @@ void ERR_load_DSA_strings(void);
 # define DSA_R_PARAMETER_ENCODING_ERROR   105
 # define DSA_R_Q_NOT_PRIME113
 
+#ifdef OPENSSL_VERSION_NUMBER >= 0x1010L
 static inline void
 DSA_SIG_get0(const DSA_SIG *sig, const BIGNUM **r, const BIGNUM **s)
 {
@@ -400,6 +401,7 @@ static inline int DSA_set0_key(DSA *d, B
 
 	return 1;
 }
+#endif
 
 
 #ifdef  __cplusplus

Index: src/crypto/external/bsd/openssl.old/dist/crypto/ecdsa/ecdsa.h
diff -u src/crypto/external/bsd/openssl.old/dist/crypto/ecdsa/ecdsa.h:1.2 src/crypto/external/bsd/openssl.old/dist/crypto/ecdsa/ecdsa.h:1.3
--- src/crypto/external/bsd/openssl.old/dist/crypto/ecdsa/ecdsa.h:1.2	Sun Feb  4 19:11:33 2018
+++ src/crypto/external/bsd/openssl.old/dist/crypto/ecdsa/ecdsa.h	Mon Feb  5 06:52:33 2018
@@ -329,6 +329,8 @@ void ERR_load_ECDSA_strings(void);
 # define ECDSA_R_RANDOM_NUMBER_GENERATION_FAILED  104
 # define ECDSA_R_SIGNATURE_MALLOC_FAILED  105
 
+#ifdef OPENSSL_VERSION_NUMBER >= 0x1010L
+
 static inline void
 ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **r, const BIGNUM **s)
 {
@@ -351,6 +353,9 @@ ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r
 	}
 	return 1;
 }
+
+#endif
+
 #ifdef  __cplusplus
 }
 #endif

Index: src/crypto/external/bsd/openssl.old/dist/crypto/evp/evp.h
diff -u src/crypto/external/bsd/openssl.old/dist/crypto/evp/evp.h:1.2 src/crypto/external/bsd/openssl.old/dist/crypto/evp/evp.h:1.3
--- src/crypto/external/bsd/openssl.old/dist/crypto/evp/evp.h:1.2	Sun Feb  4 19:11:33 2018
+++ src/crypto/external/bsd/openssl.old/dist/crypto/evp/evp.h	Mon Feb

CVS commit: src/crypto/external/bsd/openssl.old/dist/crypto/hmac

2018-02-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Feb  5 00:42:47 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl.old/dist/crypto/hmac: hmac.h

Log Message:
provide compatibility for libradius


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/crypto/external/bsd/openssl.old/dist/crypto/hmac/hmac.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl.old/dist/crypto/hmac/hmac.h
diff -u src/crypto/external/bsd/openssl.old/dist/crypto/hmac/hmac.h:1.1.1.1 src/crypto/external/bsd/openssl.old/dist/crypto/hmac/hmac.h:1.2
--- src/crypto/external/bsd/openssl.old/dist/crypto/hmac/hmac.h:1.1.1.1	Sat Feb  3 17:43:45 2018
+++ src/crypto/external/bsd/openssl.old/dist/crypto/hmac/hmac.h	Sun Feb  4 19:42:46 2018
@@ -102,6 +102,24 @@ int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_C
 
 void HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags);
 
+static inline HMAC_CTX *HMAC_CTX_new(void)
+{
+	HMAC_CTX *ctx = malloc(sizeof(*ctx));
+	if (ctx == NULL)
+		return NULL;
+	HMAC_CTX_init(ctx);
+	return ctx;
+}
+
+static inline void HMAC_CTX_free(HMAC_CTX *ctx)
+{
+	if (ctx == NULL)
+		return;
+	HMAC_CTX_cleanup(ctx);
+	free(ctx);
+}
+
+
 #ifdef  __cplusplus
 }
 #endif



CVS commit: src/crypto/external/bsd/openssl.old/dist/crypto

2018-02-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Feb  5 00:11:33 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl.old/dist/crypto/dh: dh.h
src/crypto/external/bsd/openssl.old/dist/crypto/dsa: dsa.h
src/crypto/external/bsd/openssl.old/dist/crypto/ecdsa: ecdsa.h
src/crypto/external/bsd/openssl.old/dist/crypto/evp: evp.h
src/crypto/external/bsd/openssl.old/dist/crypto/rsa: rsa.h

Log Message:
add enough of the 1.1 API to compile openssh


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/crypto/external/bsd/openssl.old/dist/crypto/dsa/dsa.h
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/crypto/external/bsd/openssl.old/dist/crypto/ecdsa/ecdsa.h
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/crypto/external/bsd/openssl.old/dist/crypto/evp/evp.h
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/crypto/external/bsd/openssl.old/dist/crypto/rsa/rsa.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h
diff -u src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h:1.1.1.1 src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h:1.2
--- src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h:1.1.1.1	Sat Feb  3 17:43:43 2018
+++ src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h	Sun Feb  4 19:11:33 2018
@@ -387,6 +387,45 @@ void ERR_load_DH_strings(void);
 # define DH_R_PEER_KEY_ERROR  113
 # define DH_R_SHARED_INFO_ERROR   114
 
+static inline void
+DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key)
+{
+	if (pub_key)
+		*pub_key = dh->pub_key;
+	if (priv_key)
+		*priv_key = dh->priv_key;
+}
+
+static inline void
+DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q,
+const BIGNUM **g)
+{
+	if (p)
+		*p = dh->p;
+	if (q)
+		*q = dh->q;
+	if (g)
+		*g = dh->g;
+}
+
+static inline int
+DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g)
+{
+	if (p)
+		dh->p = p;
+	if (q)
+		dh->q = q;
+	if (g)
+		dh->g = g;
+	return 1;
+}
+
+static inline void
+DH_set_length(DH *dh, long length)
+{
+	dh->length = length;
+}
+
 #ifdef  __cplusplus
 }
 #endif

Index: src/crypto/external/bsd/openssl.old/dist/crypto/dsa/dsa.h
diff -u src/crypto/external/bsd/openssl.old/dist/crypto/dsa/dsa.h:1.1.1.1 src/crypto/external/bsd/openssl.old/dist/crypto/dsa/dsa.h:1.2
--- src/crypto/external/bsd/openssl.old/dist/crypto/dsa/dsa.h:1.1.1.1	Sat Feb  3 17:43:43 2018
+++ src/crypto/external/bsd/openssl.old/dist/crypto/dsa/dsa.h	Sun Feb  4 19:11:33 2018
@@ -326,6 +326,82 @@ void ERR_load_DSA_strings(void);
 # define DSA_R_PARAMETER_ENCODING_ERROR   105
 # define DSA_R_Q_NOT_PRIME113
 
+static inline void
+DSA_SIG_get0(const DSA_SIG *sig, const BIGNUM **r, const BIGNUM **s)
+{
+	if (r)
+		*r = sig->r;
+	if (s)
+		*s = sig->s;
+}
+
+static inline int
+DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s)
+{
+	if (r) {
+		BN_free(r);
+		sig->r = r;
+	}
+	if (s) {
+		BN_free(s);
+		sig->s = s;
+	}
+	return 1;
+}
+
+static inline void DSA_get0_pqg(const DSA *d, const BIGNUM **p,
+const BIGNUM **q, const BIGNUM **g)
+{   
+	if (p)
+		*p = d->p;
+	if (q)
+		*q = d->q;
+	if (g)
+		*g = d->g;
+}   
+
+
+static inline int DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g)
+{   
+	if (p) { 
+		BN_free(d->p);
+		d->p = p;
+	}
+	if (q) {
+		BN_free(d->q);
+		d->q = q;
+	}
+	if (g) {
+		BN_free(d->g);
+		d->g = g;
+	}
+	return 1;
+}
+
+static inline void DSA_get0_key(const DSA *d, const BIGNUM **pub_key,
+ const BIGNUM **priv_key)
+{
+	if (pub_key)
+	*pub_key = d->pub_key;
+	if (priv_key)  
+	*priv_key = d->priv_key;
+}
+
+static inline int DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key)
+{
+	if (pub_key) {
+		BN_free(d->pub_key);
+		d->pub_key = pub_key;
+	}
+	if (priv_key) {
+		BN_free(d->priv_key);
+		d->priv_key = priv_key;
+	}   
+
+	return 1;
+}
+
+
 #ifdef  __cplusplus
 }
 #endif

Index: src/crypto/external/bsd/openssl.old/dist/crypto/ecdsa/ecdsa.h
diff -u src/crypto/external/bsd/openssl.old/dist/crypto/ecdsa/ecdsa.h:1.1.1.1 src/crypto/external/bsd/openssl.old/dist/crypto/ecdsa/ecdsa.h:1.2
--- src/crypto/external/bsd/openssl.old/dist/crypto/ecdsa/ecdsa.h:1.1.1.1	Sat Feb  3 17:43:44 2018
+++ src/crypto/external/bsd/openssl.old/dist/crypto/ecdsa/ecdsa.h	Sun Feb  4 19:11:33 2018
@@ -329,6 +329,28 @@ void ERR_load_ECDSA_strings(void);
 # define ECDSA_R_RANDOM_NUMBER_GENERATION_FAILED  104
 # define ECDSA_R_SIGNATURE_MALLOC_FAILED  105
 
+static inline void
+ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **r, const BIGNUM **s)
+{
+	if (r)
+		*r = sig->r;
+	if (s)
+		*s = sig->s;
+}
+
+static inline int
+ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s)
+{
+	if (r) {
+		BN_free(sig-