diff options
Diffstat (limited to 'src/lib/libcrypto/engine/hw_4758_cca.c')
-rw-r--r-- | src/lib/libcrypto/engine/hw_4758_cca.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/libcrypto/engine/hw_4758_cca.c b/src/lib/libcrypto/engine/hw_4758_cca.c index 6d41b9ed2a..4f5ae8a46d 100644 --- a/src/lib/libcrypto/engine/hw_4758_cca.c +++ b/src/lib/libcrypto/engine/hw_4758_cca.c | |||
@@ -223,6 +223,7 @@ static int bind_helper(ENGINE *e) | |||
223 | return 1; | 223 | return 1; |
224 | } | 224 | } |
225 | 225 | ||
226 | #ifndef ENGINE_DYNAMIC_SUPPORT | ||
226 | static ENGINE *engine_4758_cca(void) | 227 | static ENGINE *engine_4758_cca(void) |
227 | { | 228 | { |
228 | ENGINE *ret = ENGINE_new(); | 229 | ENGINE *ret = ENGINE_new(); |
@@ -244,6 +245,7 @@ void ENGINE_load_4758cca(void) | |||
244 | ENGINE_free(e_4758); | 245 | ENGINE_free(e_4758); |
245 | ERR_clear_error(); | 246 | ERR_clear_error(); |
246 | } | 247 | } |
248 | #endif | ||
247 | 249 | ||
248 | static int ibm_4758_cca_destroy(ENGINE *e) | 250 | static int ibm_4758_cca_destroy(ENGINE *e) |
249 | { | 251 | { |
@@ -715,7 +717,7 @@ static int cca_rsa_verify(int type, const unsigned char *m, unsigned int m_len, | |||
715 | 717 | ||
716 | if (type == NID_sha1 || type == NID_md5) | 718 | if (type == NID_sha1 || type == NID_md5) |
717 | { | 719 | { |
718 | memset(hashBuffer, 0, keyLength+1); | 720 | OPENSSL_cleanse(hashBuffer, keyLength+1); |
719 | OPENSSL_free(hashBuffer); | 721 | OPENSSL_free(hashBuffer); |
720 | } | 722 | } |
721 | 723 | ||
@@ -838,7 +840,7 @@ static int cca_rsa_sign(int type, const unsigned char *m, unsigned int m_len, | |||
838 | 840 | ||
839 | if (type == NID_sha1 || type == NID_md5) | 841 | if (type == NID_sha1 || type == NID_md5) |
840 | { | 842 | { |
841 | memset(hashBuffer, 0, keyLength+1); | 843 | OPENSSL_cleanse(hashBuffer, keyLength+1); |
842 | OPENSSL_free(hashBuffer); | 844 | OPENSSL_free(hashBuffer); |
843 | } | 845 | } |
844 | 846 | ||