DCIT / perl-CryptX

https://metacpan.org/pod/CryptX
Other
35 stars 23 forks source link

Ensure Crypt::PK::ECC->key2hash()->{curve_name} is lowercase #14

Closed manuelm closed 8 years ago

manuelm commented 8 years ago

Depending on how the ec key gets created or imported key2hash() returns the curve_name property either in lower- or uppercase. The value is lowercase if the curve parameters are imported or set by the user and uppercase if the name is directly returned from libtomcrypt.

Since generate_key() expects the name in lowercase, we convert the value to lowercase as well. As a sideeffect this also avoids unneccessary curve parameter lookups in Crypt::PK::ECC::_curve_name_lookup().

karel-m commented 8 years ago

Patch is OK, could you please fix Travis CI failure You planned 93 tests but ran 95.

Thanks.

manuelm commented 8 years ago

Fixed