update crypto

This commit is contained in:
Zhi Guan
2017-03-08 15:02:42 +08:00
parent 4d84dd7557
commit 002096751c
29 changed files with 1062 additions and 134 deletions

View File

@@ -47,6 +47,9 @@
* ====================================================================
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <openssl/ec.h>
#include <openssl/evp.h>
#include <openssl/err.h>
@@ -888,8 +891,10 @@ end:
SM9Ciphertext_free(ret);
ret = NULL;
}
OPENSSL_cleanse(key, keylen);
OPENSSL_free(key);
if (key) {
OPENSSL_cleanse(key, keylen);
OPENSSL_free(key);
}
return ret;
}