diff --git a/src/OVAL/oval_probe_session.c b/src/OVAL/oval_probe_session.c index 435ca148fd..b443cbcc80 100644 --- a/src/OVAL/oval_probe_session.c +++ b/src/OVAL/oval_probe_session.c @@ -48,6 +48,7 @@ #include "oval_probe_ext.h" #include "probe-table.h" #include "oval_types.h" +#include "crapi/crapi.h" #if defined(OSCAP_THREAD_SAFE) #include @@ -93,6 +94,13 @@ static void oval_probe_session_libinit(void) SEXP_free((SEXP_t *)exp); ncache_libinit(); + /* + * Initialize crypto API + */ +#ifndef OS_WINDOWS + if (crapi_init (NULL) != 0) + return (NULL); +#endif } /** diff --git a/src/OVAL/probes/independent/filehash58_probe.c b/src/OVAL/probes/independent/filehash58_probe.c index ff1e065746..32a38562bd 100644 --- a/src/OVAL/probes/independent/filehash58_probe.c +++ b/src/OVAL/probes/independent/filehash58_probe.c @@ -210,12 +210,6 @@ int filehash58_probe_offline_mode_supported() void *filehash58_probe_init(void) { - /* - * Initialize crypto API - */ - if (crapi_init (NULL) != 0) - return (NULL); - /* * Initialize mutex. */ diff --git a/src/OVAL/probes/independent/filehash_probe.c b/src/OVAL/probes/independent/filehash_probe.c index 522d976512..6d8780dc95 100644 --- a/src/OVAL/probes/independent/filehash_probe.c +++ b/src/OVAL/probes/independent/filehash_probe.c @@ -190,12 +190,6 @@ int filehash_probe_offline_mode_supported() void *filehash_probe_init(void) { - /* - * Initialize crypto API - */ - if (crapi_init (NULL) != 0) - return (NULL); - /* * Initialize mutex. */ diff --git a/src/OVAL/probes/independent/filemd5_probe.c b/src/OVAL/probes/independent/filemd5_probe.c index d0de402d8b..99913581f0 100644 --- a/src/OVAL/probes/independent/filemd5_probe.c +++ b/src/OVAL/probes/independent/filemd5_probe.c @@ -163,12 +163,6 @@ int probe_offline_mode_supported() void *probe_init (void) { - /* - * Initialize crypto API - */ - if (crapi_init (NULL) != 0) - return (NULL); - /* * Initialize mutex. */