Upgrade libtomcrypt
This commit is contained in:
@@ -40,7 +40,7 @@ int dsa_decrypt_key(const unsigned char *in, unsigned long inlen,
|
||||
}
|
||||
|
||||
/* decode to find out hash */
|
||||
LTC_SET_ASN1(decode, 0, LTC_ASN1_OBJECT_IDENTIFIER, hashOID, sizeof(hashOID)/sizeof(hashOID[0]));
|
||||
LTC_SET_ASN1(decode, 0, LTC_ASN1_OBJECT_IDENTIFIER, hashOID, LTC_ARRAY_SIZE(hashOID));
|
||||
err = der_decode_sequence(in, inlen, decode, 1);
|
||||
if (err != CRYPT_OK && err != CRYPT_INPUT_TOO_LONG) {
|
||||
return err;
|
||||
|
||||
@@ -93,7 +93,7 @@ static int s_dsa_make_params(prng_state *prng, int wprng, int group_size, int mo
|
||||
#endif
|
||||
|
||||
hash = -1;
|
||||
for (i = 0; i < sizeof(accepted_hashes)/sizeof(accepted_hashes[0]); ++i) {
|
||||
for (i = 0; i < LTC_ARRAY_SIZE(accepted_hashes); ++i) {
|
||||
hash = find_hash(accepted_hashes[i]);
|
||||
if (hash != -1) break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user