Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ New in 0.4.14; unreleased
* Added support for the "pkcs11prov" provider with OpenSSL 3.0
(Małgorzata Olszówka)
* Removed support for OpenSSL older than 1.0.2 (Michał Trojnara)
* Added PKCS11_FORCE_CLEANUP to force cleanup on exit and avoid memory leaks
with certain PKCS#11 modules

New in 0.4.13; 2024-12-13; Michał Trojnara
* Increased maximum PIN length (Michał Trojnara)
Expand Down
2 changes: 1 addition & 1 deletion src/eng_back.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ static int ENGINE_CTX_ctrl_set_vlog(ENGINE_CTX *ctx, void *cb)
return 1;
}

int ENGINE_CTX_ctrl(ENGINE_CTX *ctx, int cmd, long i, void *p, void (*f)())
int ENGINE_CTX_ctrl(ENGINE_CTX *ctx, int cmd, long i, void *p, void (*f)(void))
{
(void)i; /* We don't currently take integer parameters */
(void)f; /* We don't currently take callback parameters */
Expand Down
4 changes: 0 additions & 4 deletions src/provider.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,6 @@ typedef struct {
void *ui_method_data;
} PASSPHRASE_DATA;

#if defined(_WIN32) || defined(_WIN64)
#define strcasecmp _stricmp
#endif

/******************************************************************************/
/* Utility functions */
/******************************************************************************/
Expand Down
4 changes: 4 additions & 0 deletions src/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@
#include "config.h"
#endif

#if defined(_WIN32) || defined(_WIN64)
#define strcasecmp _stricmp
#endif

/* defined in util_uri.c */
typedef struct util_ctx_st UTIL_CTX; /* opaque */

Expand Down
4 changes: 4 additions & 0 deletions src/util_uri.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ static int util_ctx_enumerate_slots_unlocked(UTIL_CTX *ctx)
*/
static void exit_callback(void)
{
const char *str = getenv("PKCS11_FORCE_CLEANUP");

if (str && (!strcmp(str, "1") || !strcasecmp(str, "yes")))
return;
g_shutdown_mode = 1;
}

Expand Down
Loading