pocoproject/poco — pull request #384 by cristiantm (2014-02-21 13:01:56+00:00)
Title: New hash algorithms support for RSADigestEngine

This is a improvement for RSADigestEngine to use Poco::Crypto::DigestEngine to calculate 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 (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.