Make update / libeay.num fix
Looks like someone forgot to do a "make update" since crypto/ts/Makefile keeps changing. So include that. Second is that the declare_dh_bn macro fools the libeay.num script. The declarations are only needed in one file (dh_rfc5114) so remove them from the header and put the "raw" declarations directly into that file. Reviewed-by: Richard Levitte <levitte@openssl.org>
This commit is contained in:
parent
dd35486db6
commit
75f648aa06
@ -63,27 +63,29 @@
|
||||
|
||||
/*
|
||||
* Macro to make a DH structure from BIGNUM data. NB: although just copying
|
||||
* the BIGNUM static pointers would be more efficient we can't as they get
|
||||
* wiped using BN_clear_free() when DH_free() is called.
|
||||
* the BIGNUM static pointers would be more efficient, we can't do that
|
||||
* because they get wiped using BN_clear_free() when DH_free() is called.
|
||||
*/
|
||||
|
||||
#define make_dh(x) \
|
||||
DH * DH_get_##x(void) \
|
||||
{ \
|
||||
DH *dh; \
|
||||
dh = DH_new(); \
|
||||
if (!dh) \
|
||||
return NULL; \
|
||||
dh->p = BN_dup(&_bignum_dh##x##_p); \
|
||||
dh->g = BN_dup(&_bignum_dh##x##_g); \
|
||||
dh->q = BN_dup(&_bignum_dh##x##_q); \
|
||||
if (!dh->p || !dh->q || !dh->g) \
|
||||
{ \
|
||||
DH_free(dh); \
|
||||
return NULL; \
|
||||
} \
|
||||
return dh; \
|
||||
}
|
||||
\
|
||||
extern const BIGNUM _bignum_dh##x##_p, _bignum_dh##x##_g, _bignum_dh##x##_q; \
|
||||
\
|
||||
DH *DH_get_##x(void) \
|
||||
{ \
|
||||
DH *dh = DH_new(); \
|
||||
\
|
||||
if (dh == NULL) \
|
||||
return NULL; \
|
||||
dh->p = BN_dup(&_bignum_dh##x##_p); \
|
||||
dh->g = BN_dup(&_bignum_dh##x##_g); \
|
||||
dh->q = BN_dup(&_bignum_dh##x##_q); \
|
||||
if (dh->p == NULL || dh->q == NULL || dh->g == NULL) {\
|
||||
DH_free(dh); \
|
||||
return NULL; \
|
||||
} \
|
||||
return dh; \
|
||||
}
|
||||
|
||||
make_dh(1024_160)
|
||||
make_dh(2048_224)
|
||||
|
@ -342,17 +342,6 @@ int DH_KDF_X9_42(unsigned char *out, size_t outlen,
|
||||
# define EVP_PKEY_DH_KDF_X9_42 2
|
||||
# endif
|
||||
|
||||
#define declare_dh_bn(x) \
|
||||
const extern BIGNUM _bignum_dh##x##_p;\
|
||||
const extern BIGNUM _bignum_dh##x##_g;\
|
||||
const extern BIGNUM _bignum_dh##x##_q;
|
||||
|
||||
declare_dh_bn(1024_160)
|
||||
declare_dh_bn(2048_224)
|
||||
declare_dh_bn(2048_256)
|
||||
|
||||
#undef declare_dh_bn
|
||||
|
||||
/* BEGIN ERROR CODES */
|
||||
/*
|
||||
* The following lines are auto generated by the script mkerr.pl. Any changes
|
||||
|
@ -524,8 +524,21 @@ gmdifftest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
gmdifftest.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
|
||||
gmdifftest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
gmdifftest.o: gmdifftest.c
|
||||
gost2814789test.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h
|
||||
gost2814789test.o: gost2814789test.c
|
||||
gost2814789test.o: ../e_os.h ../engines/ccgost/gost89.h
|
||||
gost2814789test.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
gost2814789test.o: ../include/openssl/buffer.h ../include/openssl/conf.h
|
||||
gost2814789test.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
|
||||
gost2814789test.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
|
||||
gost2814789test.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
|
||||
gost2814789test.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
gost2814789test.o: ../include/openssl/hmac.h ../include/openssl/lhash.h
|
||||
gost2814789test.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||
gost2814789test.o: ../include/openssl/opensslconf.h
|
||||
gost2814789test.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
gost2814789test.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h
|
||||
gost2814789test.o: ../include/openssl/sha.h ../include/openssl/stack.h
|
||||
gost2814789test.o: ../include/openssl/symhacks.h ../include/openssl/x509.h
|
||||
gost2814789test.o: ../include/openssl/x509_vfy.h gost2814789test.c
|
||||
heartbeat_test.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
heartbeat_test.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
heartbeat_test.o: ../include/openssl/comp.h ../include/openssl/crypto.h
|
||||
|
Loading…
x
Reference in New Issue
Block a user