Navigation Menu

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

New hash algorithms support for RSADigestEngine #384

Merged
merged 4 commits into from Mar 9, 2014

Conversation

cristiantm
Copy link
Contributor

This is a improvement for RSADigestEngine to use Poco::Crypto::DigestEngine to calculate the hash before signing.

That way we can support RSA signatures with any hash supported by OpenSSL, not only MD5 and SHA1. It was also required a new method (nid()) on DigestEngine to obtain the NID (numeric object ID) of the algorithm, to be used on the OpenSSL RSA_sign call.

The original constructor for RSADigestEngine using the enumeration of MD5 and SHA1 algorithms is kept for backward compatibility but marked as deprecated (using comment only), but now also uses Poco::Crypto::DigestEngine instead the two instances Poco::MD5Engine and Poco::SHA1Engine.

A new test case was also created for a SHA256 RSA Signature.

the hash before signing. That way we can then support RSA signatures
with any hash supported by OpenSSL, not only MD5 and SHA1. It was also
required a new method on DigestEngine to obtain the NID (numeric ID) of
the algorithm, to be used on the OpenSSL RSA_sign call.
obiltschnig added a commit that referenced this pull request Mar 9, 2014
New hash algorithms support for RSADigestEngine
@obiltschnig obiltschnig merged commit 4b6a5f3 into pocoproject:develop Mar 9, 2014
@cristiantm cristiantm deleted the improve-rsadigest branch March 9, 2014 18:49
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