mirror of
https://github.com/open-quantum-safe/liboqs.git
synced 2025-10-16 00:03:40 -04:00
Sync more common files on master with nist-branch
This commit is contained in:
parent
b1cee208e6
commit
97ed95da21
@ -8,7 +8,7 @@
|
|||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void OQS_API OQS_MEM_cleanse(void *ptr, size_t len) {
|
OQS_API void OQS_MEM_cleanse(void *ptr, size_t len) {
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
SecureZeroMemory(ptr, len);
|
SecureZeroMemory(ptr, len);
|
||||||
#elif defined(HAVE_MEMSET_S)
|
#elif defined(HAVE_MEMSET_S)
|
||||||
@ -22,14 +22,14 @@ void OQS_API OQS_MEM_cleanse(void *ptr, size_t len) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void OQS_API OQS_MEM_secure_free(void *ptr, size_t len) {
|
OQS_API void OQS_MEM_secure_free(void *ptr, size_t len) {
|
||||||
if (ptr != NULL) {
|
if (ptr != NULL) {
|
||||||
OQS_MEM_cleanse(ptr, len);
|
OQS_MEM_cleanse(ptr, len);
|
||||||
free(ptr); // IGNORE free-check
|
free(ptr); // IGNORE free-check
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void OQS_API OQS_MEM_insecure_free(void *ptr) {
|
OQS_API void OQS_MEM_insecure_free(void *ptr) {
|
||||||
free(ptr); // IGNORE free-check
|
free(ptr); // IGNORE free-check
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <oqs/common.h>
|
#include <oqs/common.h>
|
||||||
|
|
||||||
#if USE_OPENSSL
|
#if USE_OPENSSL
|
||||||
#include <openssl/conf.h>
|
#include <openssl/conf.h>
|
||||||
#include <openssl/evp.h>
|
#include <openssl/evp.h>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user