Define MODP_CUSTOM constructors as variadic functions
They now match the dh_constructor_t signature. This is a follow up for
the changes merged with b668bf3f9e and should fix use of MODP_CUSTOM on
Apple's ARM64 platform.
This commit is contained in:
@@ -289,11 +289,13 @@ gcrypt_dh_t *gcrypt_dh_create(diffie_hellman_group_t group)
|
||||
/*
|
||||
* Described in header.
|
||||
*/
|
||||
gcrypt_dh_t *gcrypt_dh_create_custom(diffie_hellman_group_t group,
|
||||
chunk_t g, chunk_t p)
|
||||
gcrypt_dh_t *gcrypt_dh_create_custom(diffie_hellman_group_t group, ...)
|
||||
{
|
||||
if (group == MODP_CUSTOM)
|
||||
{
|
||||
chunk_t g, p;
|
||||
|
||||
VA_ARGS_GET(group, g, p);
|
||||
return create_generic(group, p.len, g, p);
|
||||
}
|
||||
return NULL;
|
||||
|
||||
@@ -48,12 +48,10 @@ gcrypt_dh_t *gcrypt_dh_create(diffie_hellman_group_t group);
|
||||
* Creates a new gcrypt_dh_t object for MODP_CUSTOM.
|
||||
*
|
||||
* @param group MODP_CUSTOM
|
||||
* @param g generator
|
||||
* @param p prime
|
||||
* @param ... expects generator and prime as chunk_t
|
||||
* @return gcrypt_dh_t object, NULL if not supported
|
||||
*/
|
||||
gcrypt_dh_t *gcrypt_dh_create_custom(diffie_hellman_group_t group,
|
||||
chunk_t g, chunk_t p);
|
||||
gcrypt_dh_t *gcrypt_dh_create_custom(diffie_hellman_group_t group, ...);
|
||||
|
||||
#endif /** GCRYPT_DH_H_ @}*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user