summaryrefslogtreecommitdiff
path: root/mysys_ssl/my_sha.ic
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-03-06 13:06:03 +0100
committerSergei Golubchik <serg@mariadb.org>2017-03-10 18:21:26 +0100
commitd6a7aece0826e0c115eb21912527c77596c1305e (patch)
treea08ea49d3154f59572868f45cbb14ba51a705cfd /mysys_ssl/my_sha.ic
parentbd1139ad2722cf8717cd1aaac4431f369d39562f (diff)
downloadmariadb-git-d6a7aece0826e0c115eb21912527c77596c1305e.tar.gz
my_sha2 service
Diffstat (limited to 'mysys_ssl/my_sha.ic')
-rw-r--r--mysys_ssl/my_sha.ic4
1 files changed, 3 insertions, 1 deletions
diff --git a/mysys_ssl/my_sha.ic b/mysys_ssl/my_sha.ic
index 5a95c9c4682..a7ec8bad593 100644
--- a/mysys_ssl/my_sha.ic
+++ b/mysys_ssl/my_sha.ic
@@ -26,7 +26,7 @@
#include <my_global.h>
#include <stdarg.h>
-#define HASH_SIZE 20
+#define HASH_SIZE (NUM > 1 ? NUM/8 : 20)
#if defined(HAVE_YASSL)
#include "sha.hpp"
@@ -66,6 +66,8 @@ static void sha_result(CONTEXT *context, uchar digest[HASH_SIZE])
#define yCONTEXT(y) xCONTEXT(y)
#define CONTEXT yCONTEXT(NUM)
#define SHA1_CTX SHA_CTX
+#define SHA224_CTX SHA256_CTX
+#define SHA384_CTX SHA512_CTX
#define xSHA_Init(x) SHA ## x ## _Init
#define xSHA_Update(x) SHA ## x ## _Update