Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from Jun 2, 2016

Conversation

manuelm
Copy link
Contributor

@manuelm manuelm commented Jun 2, 2016

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().

Depending on how the ec key gets created or imported key2hash() either
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
Copy link
Contributor

karel-m commented Jun 2, 2016

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

Thanks.

@manuelm
Copy link
Contributor Author

manuelm commented Jun 2, 2016

Fixed

@karel-m karel-m merged commit db018d4 into DCIT:master Jun 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants