summaryrefslogtreecommitdiffstats
path: root/engines/e_4758cca.c
diff options
context:
space:
mode:
Diffstat (limited to 'engines/e_4758cca.c')
-rw-r--r--engines/e_4758cca.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/engines/e_4758cca.c b/engines/e_4758cca.c
index 3b593c79c5..b605a79cff 100644
--- a/engines/e_4758cca.c
+++ b/engines/e_4758cca.c
@@ -709,10 +709,8 @@ static int cca_rsa_verify(int type, const unsigned char *m,
&keyTokenLength, keyToken, &length, hashBuffer,
&lsiglen, (unsigned char *)sigbuf);
- if (type == NID_sha1 || type == NID_md5) {
- OPENSSL_cleanse(hashBuffer, keyLength + 1);
- OPENSSL_free(hashBuffer);
- }
+ if (type == NID_sha1 || type == NID_md5)
+ OPENSSL_clear_free(hashBuffer, keyLength + 1);
return ((returnCode || reasonCode) ? 0 : 1);
}
@@ -820,10 +818,8 @@ static int cca_rsa_sign(int type, const unsigned char *m, unsigned int m_len,
&keyTokenLength, keyToken, &length, hashBuffer,
&outputLength, &outputBitLength, sigret);
- if (type == NID_sha1 || type == NID_md5) {
- OPENSSL_cleanse(hashBuffer, keyLength + 1);
- OPENSSL_free(hashBuffer);
- }
+ if (type == NID_sha1 || type == NID_md5)
+ OPENSSL_clear_free(hashBuffer, keyLength + 1);
*siglen = outputLength;