Fix camellia_keysize() to not change the keysize if it is correct.
It was rounding 32 down to 24, 24 down to 16, and claiming 16 was invalid.
This commit is contained in:
parent
e3acd4cabe
commit
65254f65bf
@ -711,9 +711,9 @@ void camellia_done(symmetric_key *skey) {}
|
||||
|
||||
int camellia_keysize(int *keysize)
|
||||
{
|
||||
if (*keysize > 32) { *keysize = 32; }
|
||||
else if (*keysize > 24) { *keysize = 24; }
|
||||
else if (*keysize > 16) { *keysize = 16; }
|
||||
if (*keysize >= 32) { *keysize = 32; }
|
||||
else if (*keysize >= 24) { *keysize = 24; }
|
||||
else if (*keysize >= 16) { *keysize = 16; }
|
||||
else return CRYPT_INVALID_KEYSIZE;
|
||||
return CRYPT_OK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user