22
edits
Line 146: | Line 146: | ||
The NSS cryptographic module performs explicit zeroization steps to clear the memory region previously occupied by a plaintext secret key, private key, or password. The function used to zeroize memory used by plaintext secret and private keys and passwords is the Standard C library function <code>memset()</code> or its synonym <code>PORT_Memset()</code>: | The NSS cryptographic module performs explicit zeroization steps to clear the memory region previously occupied by a plaintext secret key, private key, or password. The function used to zeroize memory used by plaintext secret and private keys and passwords is the Standard C library function <code>memset()</code> or its synonym <code>PORT_Memset()</code>: | ||
#define PORT_Memset memset | #define PORT_Memset memset | ||
If the memory is allocated from the heap, the [http:// | If the memory is allocated from the heap, the [http://mxr.mozilla.org/security/ident?i=PORT_ZFree <code>PORT_ZFree()</code>] function can be used to both zeroize and free memory: | ||
void | void | ||
PORT_ZFree(void *ptr, size_t len) | PORT_ZFree(void *ptr, size_t len) |
edits