CVS commit: src/crypto/external/bsd/openssl/dist/include/openssl

2020-03-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 22 02:30:16 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/dist/include/openssl: safestack.h

Log Message:
Add more casts.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/crypto/external/bsd/openssl/dist/include/openssl/safestack.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/dist/include/openssl/safestack.h
diff -u src/crypto/external/bsd/openssl/dist/include/openssl/safestack.h:1.5 src/crypto/external/bsd/openssl/dist/include/openssl/safestack.h:1.6
--- src/crypto/external/bsd/openssl/dist/include/openssl/safestack.h:1.5	Sat Mar 21 20:53:10 2020
+++ src/crypto/external/bsd/openssl/dist/include/openssl/safestack.h	Sat Mar 21 22:30:15 2020
@@ -28,7 +28,7 @@ extern "C" {
 { \
 return OPENSSL_sk_num((const OPENSSL_STACK *)(const void *)sk); \
 } \
-static ossl_unused ossl_inline t2 *sk_##t1##_value(const STACK_OF(t1) *sk, int idx) \
+static ossl_unused ossl_inline t2 *sk_##t1##_value(const STACK_OF(t1)*sk, int idx) \
 { \
 return (t2 *)(void *)OPENSSL_sk_value((const OPENSSL_STACK *)(const void *)sk, idx); \
 } \
@@ -42,11 +42,11 @@ extern "C" {
 } \
 static ossl_unused ossl_inline STACK_OF(t1) *sk_##t1##_new_reserve(sk_##t1##_compfunc compare, int n) \
 { \
-return (STACK_OF(t1) *)OPENSSL_sk_new_reserve((OPENSSL_sk_compfunc)compare, n); \
+return (STACK_OF(t1) *)(void *)OPENSSL_sk_new_reserve((OPENSSL_sk_compfunc)compare, n); \
 } \
 static ossl_unused ossl_inline int sk_##t1##_reserve(STACK_OF(t1) *sk, int n) \
 { \
-return OPENSSL_sk_reserve((OPENSSL_STACK *)sk, n); \
+return OPENSSL_sk_reserve((OPENSSL_STACK *)(void *)sk, n); \
 } \
 static ossl_unused ossl_inline void sk_##t1##_free(STACK_OF(t1) *sk) \
 { \



CVS commit: src/crypto/external/bsd/openssl/dist/include/openssl

2018-02-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Feb 13 22:32:10 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl/dist/include/openssl: sha.h

Log Message:
Provide the means to use the libc sha2 internally instead of the openssl
implementation; this does not really matter since their structs are larger
than ours, but it helps when we want to verify that we are not using any
of the openssl code.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/crypto/external/bsd/openssl/dist/include/openssl/sha.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/dist/include/openssl/sha.h
diff -u src/crypto/external/bsd/openssl/dist/include/openssl/sha.h:1.1.1.1 src/crypto/external/bsd/openssl/dist/include/openssl/sha.h:1.2
--- src/crypto/external/bsd/openssl/dist/include/openssl/sha.h:1.1.1.1	Thu Feb  8 15:56:57 2018
+++ src/crypto/external/bsd/openssl/dist/include/openssl/sha.h	Tue Feb 13 17:32:10 2018
@@ -10,6 +10,10 @@
 #ifndef HEADER_SHA_H
 # define HEADER_SHA_H
 
+#ifdef USE_LIBC_SHA2
+# include 
+#endif
+
 # include 
 # include 
 
@@ -44,6 +48,7 @@ int SHA1_Final(unsigned char *md, SHA_CT
 unsigned char *SHA1(const unsigned char *d, size_t n, unsigned char *md);
 void SHA1_Transform(SHA_CTX *c, const unsigned char *data);
 
+#ifndef USE_LIBC_SHA2
 # define SHA256_CBLOCK   (SHA_LBLOCK*4)/* SHA-256 treats input data as a
 * contiguous array of 32 bit wide
 * big-endian values. */
@@ -112,6 +117,14 @@ int SHA512_Final(unsigned char *md, SHA5
 unsigned char *SHA512(const unsigned char *d, size_t n, unsigned char *md);
 void SHA512_Transform(SHA512_CTX *c, const unsigned char *data);
 
+#else
+#define SHA256_CBLOCK 64
+#define SHA512_CBLOCK 128
+unsigned char *SHA256(const unsigned char *d, size_t n, unsigned char *md);
+unsigned char *SHA384(const unsigned char *d, size_t n, unsigned char *md);
+unsigned char *SHA512(const unsigned char *d, size_t n, unsigned char *md);
+#endif
+
 #ifdef  __cplusplus
 }
 #endif