aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crypto/c_src
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2012-08-20 12:31:28 +0200
committerIngela Anderton Andin <[email protected]>2012-08-22 14:00:43 +0200
commitc5541a4c03b89fcbcb0dd1bfab8460b1287cc6cb (patch)
treec0e5875462f260c9d21fddbfc2d4236a4ab79b17 /lib/crypto/c_src
parent42e65ffe5f2659d998ff0a7e5ebea2573c23a86f (diff)
downloadotp-c5541a4c03b89fcbcb0dd1bfab8460b1287cc6cb.tar.gz
otp-c5541a4c03b89fcbcb0dd1bfab8460b1287cc6cb.tar.bz2
otp-c5541a4c03b89fcbcb0dd1bfab8460b1287cc6cb.zip
crypto: Add sha224 for rsa sign/verify
Diffstat (limited to 'lib/crypto/c_src')
-rw-r--r--lib/crypto/c_src/crypto.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c
index d9ae8a87a3..9a1a6f6c55 100644
--- a/lib/crypto/c_src/crypto.c
+++ b/lib/crypto/c_src/crypto.c
@@ -1564,6 +1564,12 @@ static void sha1_digest(unsigned char* in, unsigned int in_len, unsigned char* o
{
SHA1(in, in_len, out);
}
+#ifdef HAVE_SHA224
+static void sha224_digest(unsigned char* in, unsigned int in_len, unsigned char* out)
+{
+ SHA224(in, in_len, out);
+}
+#endif
#ifdef HAVE_SHA256
static void sha256_digest(unsigned char* in, unsigned int in_len, unsigned char* out)
{
@@ -1595,6 +1601,13 @@ struct digest_type_t digest_types[] =
{
{"md5", MD5_DIGEST_LENGTH, NID_md5, md5_digest},
{"sha", SHA_DIGEST_LENGTH, NID_sha1, sha1_digest},
+ {"sha224",
+#ifdef HAVE_SHA224
+ SHA224_LEN, NID_sha224, sha224_digest
+#else
+ 0
+#endif
+ },
{"sha256",
#ifdef HAVE_SHA256
SHA256_LEN, NID_sha256, sha256_digest