Add support for SHA-224

This commit is contained in:
Christian Hohnstaedt 2015-02-13 09:41:10 +01:00
parent 31eb2153a4
commit fa4085611c
2 changed files with 3 additions and 2 deletions

View File

@ -270,7 +270,7 @@ QList<int> pki_key::possibleHashNids()
switch (EVP_PKEY_type(key->type)) {
case EVP_PKEY_RSA:
nids << NID_md5 << NID_sha1 << NID_sha256 <<
nids << NID_md5 << NID_sha1 << NID_sha224 << NID_sha256 <<
NID_sha384 << NID_sha512 << NID_ripemd160;
break;
case EVP_PKEY_DSA:
@ -282,7 +282,7 @@ QList<int> pki_key::possibleHashNids()
case EVP_PKEY_EC:
nids << NID_sha1;
#if OPENSSL_VERSION_NUMBER >= 0x10000000L
nids << NID_sha256 << NID_sha384 << NID_sha512;
nids << NID_sha224 << NID_sha256 << NID_sha384 << NID_sha512;
#endif
break;
}

View File

@ -15,6 +15,7 @@ static struct {
} hashalgos[] = {
{ "MD 5", EVP_md5() },
{ "SHA 1", EVP_sha1() },
{ "SHA 224", EVP_sha224() },
{ "SHA 256", EVP_sha256() },
{ "SHA 384", EVP_sha384() },
{ "SHA 512", EVP_sha512() },