File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 102102 #error "wolfTPM and MAXQ10XX are incompatible with each other."
103103#endif
104104
105- /* wc_ForceZero was added in wolfSSL 5.8.4. Provide a fallback for older
106- * versions to securely zero sensitive memory. */
107- #if defined(LIBWOLFSSL_VERSION_HEX ) && LIBWOLFSSL_VERSION_HEX >= 0x05008004
108- #include <wolfssl/wolfcrypt/memory.h>
109- #else
110- static void wc_ForceZero (void * mem , size_t len ) {
111- volatile byte * p = (volatile byte * )mem ;
112- while (len -- ) * p ++ = 0 ;
113- }
114- #endif
115-
116105/* Helper to get size of struct field */
117106#define FIELD_SIZE (type , field ) (sizeof(((type *)0)->field))
118107
Original file line number Diff line number Diff line change 3939#include <wolfpkcs11/pkcs11.h>
4040#include <wolfpkcs11/version.h>
4141
42+ /* wc_ForceZero was added in wolfSSL 5.8.4. Provide a fallback for older
43+ * versions to securely zero sensitive memory. */
44+ #include <wolfssl/version.h>
45+ #if !defined(LIBWOLFSSL_VERSION_HEX ) || LIBWOLFSSL_VERSION_HEX < 0x05008004
46+ static WC_INLINE void wc_ForceZero (void * mem , size_t len ) {
47+ volatile byte * p = (volatile byte * )mem ;
48+ while (len -- ) * p ++ = 0 ;
49+ }
50+ #endif
51+
4252#ifdef __cplusplus
4353extern "C" {
4454#endif
You can’t perform that action at this time.
0 commit comments