mbedcrypto: Make bignum_bin2bn behave like others

Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Simo Sorce
2019-03-12 18:43:42 -04:00
committed by Andreas Schneider
parent fd30cf0676
commit 997fe4d418
4 changed files with 6 additions and 37 deletions

View File

@@ -247,20 +247,6 @@ int ssh_dh_init(void)
goto error;
}
#if defined(HAVE_LIBMBEDCRYPTO)
/* FIXME */
p_group1 = bignum_new();
bignum_bin2bn(p_group1_value, P_GROUP1_LEN, p_group1);
p_group14 = bignum_new();
bignum_bin2bn(p_group14_value, P_GROUP14_LEN, p_group14);
p_group16 = bignum_new();
bignum_bin2bn(p_group16_value, P_GROUP16_LEN, p_group16);
p_group18 = bignum_new();
bignum_bin2bn(p_group18_value, P_GROUP18_LEN, p_group18);
#else
bignum_bin2bn(p_group1_value, P_GROUP1_LEN, &p_group1);
if (p_group1 == NULL) {
goto error;
@@ -278,8 +264,6 @@ int ssh_dh_init(void)
goto error;
}
#endif
dh_crypto_initialized = 1;
return 0;