Macros | Functions
secure.c File Reference

Security related functions. More...

Go to the source code of this file.

Macros

#define SECURE_CL_PERM   (posix_mode_t) (POSIX_S_IRUSR | POSIX_S_IWUSR)
 Permissions for Cancel-Lock secret file.
 
#define SECURE_CL_SECSIZE   (size_t) 64
 Size of secret (64 octets is sufficient for the SHA2 family)
 
#define MAIN_ERR_PREFIX   "MAIN: "
 Message prefix for security related functions.
 

Functions

void secure_clear_memory (char *p, size_t len)
 Remove string from memory. More...
 
void secure_clear_string (char *p)
 Remove string from memory. More...
 
void secure_cl_secret (const char *pathname)
 Generate file with new secret if CL secret file is missing. More...
 

Detailed Description

Security related functions.

Copyright (c) 2017-2020 by the developers. See the LICENSE file for details. If nothing else is specified, functions return zero to indicate success and a negative value to indicate an error.

Using a separate source file for this make it easier to use different compiler flags. It will also make it harder for optimizers to break the intended functionality of the functions in this file.

Definition in file secure.c.


Generated at 2024-04-27 using  doxygen