makeshift fix of --enable-integrity-test option
This commit is contained in:
@@ -61,7 +61,8 @@ endif
|
||||
libstrongswan_la_LIBADD = -lpthread -ldl
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/src/libstrongswan
|
||||
AM_CFLAGS =
|
||||
AM_CFLAGS = -DIPSEC_DIR=\"${ipsecdir}\" \
|
||||
-DIPSEC_PLUGINDIR=\"${plugindir}\"
|
||||
|
||||
if USE_LEAK_DETECTIVE
|
||||
AM_CFLAGS += -DLEAK_DETECTIVE
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include <debug.h>
|
||||
#include <crypto/signers/hmac_signer.h>
|
||||
#include <crypto/signers/signer.h>
|
||||
#include "fips.h"
|
||||
|
||||
extern const u_char FIPS_rodata_start[];
|
||||
@@ -56,7 +56,7 @@ bool fips_compute_hmac_signature(const char *key, char *signature)
|
||||
DBG1(" RODATA: %p + %6d = %p",
|
||||
FIPS_rodata_start, (int)rodata_len, FIPS_rodata_end);
|
||||
|
||||
signer = (signer_t *)hmac_signer_create(HASH_SHA1, HASH_SIZE_SHA1);
|
||||
signer = lib->crypto->create_signer(lib->crypto, AUTH_HMAC_SHA1_128);
|
||||
if (signer == NULL)
|
||||
{
|
||||
DBG1(" SHA-1 HMAC signer could not be created");
|
||||
|
||||
@@ -26,6 +26,10 @@ int main(int argc, char* argv[])
|
||||
char *hmac_key = "strongSwan Version " VERSION;
|
||||
char hmac_signature[BUF_LEN];
|
||||
|
||||
/* initialize library */
|
||||
library_init(IPSEC_DIR "/strongswan.conf");
|
||||
lib->plugins->load(lib->plugins, IPSEC_PLUGINDIR, "libstrongswan-");
|
||||
|
||||
if (!fips_compute_hmac_signature(hmac_key, hmac_signature))
|
||||
{
|
||||
exit(1);
|
||||
@@ -54,5 +58,7 @@ int main(int argc, char* argv[])
|
||||
fprintf(f, "\n");
|
||||
fprintf(f, "#endif /* FIPS_SIGNATURE_H_ @} */\n");
|
||||
fclose(f);
|
||||
|
||||
library_deinit();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user