提交 285c6913 编写于 作者: M Matt Caswell

Fix no-dh

The new serializer code broke no-dh builds so we add some more guards to fix it.
Reviewed-by: NBernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/10644)
上级 501fcfb8
......@@ -399,6 +399,7 @@ static const OSSL_ALGORITHM deflt_serializer[] = {
{ "RSA", "default=yes,format=pem,type=public",
rsa_pub_pem_serializer_functions },
#ifndef OPENSSL_NO_DH
{ "DH", "default=yes,format=text,type=private",
dh_priv_text_serializer_functions },
{ "DH", "default=yes,format=text,type=public",
......@@ -417,6 +418,7 @@ static const OSSL_ALGORITHM deflt_serializer[] = {
dh_pub_pem_serializer_functions },
{ "DH", "default=yes,format=pem,type=domainparams",
dh_param_pem_serializer_functions },
#endif
{ NULL, NULL, NULL }
};
......
......@@ -8,5 +8,7 @@ $DSA_GOAL=../../libimplementations.a
SOURCE[$SERIALIZER_GOAL]=serializer_common.c
SOURCE[$RSA_GOAL]=serializer_rsa.c serializer_rsa_priv.c serializer_rsa_pub.c
SOURCE[$DH_GOAL]=serializer_dh.c serializer_dh_priv.c serializer_dh_pub.c serializer_dh_param.c
IF[{- !$disabled{dh} -}]
SOURCE[$DH_GOAL]=serializer_dh.c serializer_dh_priv.c serializer_dh_pub.c serializer_dh_param.c
ENDIF
SOURCE[$DSA_GOAL]=serializer_dsa.c serializer_dsa_priv.c serializer_dsa_pub.c serializer_dsa_param.c
......@@ -139,6 +139,7 @@ static int test_fromdata_rsa(void)
return ret;
}
#ifndef OPENSSL_NO_DH
/* Array indexes used in test_fromdata_dh */
#define PRIV_KEY 0
#define PUB_KEY 1
......@@ -187,10 +188,13 @@ static int test_fromdata_dh(void)
return ret;
}
#endif
int setup_tests(void)
{
ADD_TEST(test_fromdata_rsa);
#ifndef OPENSSL_NO_DH
ADD_TEST(test_fromdata_dh);
#endif
return 1;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册