2019-03-25 19:52:00 +01:00
|
|
|
Index: libgcrypt-1.8.4/src/global.c
|
|
|
|
===================================================================
|
2019-06-27 17:31:10 +02:00
|
|
|
--- libgcrypt-1.8.4.orig/src/global.c
|
|
|
|
+++ libgcrypt-1.8.4/src/global.c
|
|
|
|
@@ -141,27 +141,10 @@ global_init (void)
|
2019-03-25 19:52:00 +01:00
|
|
|
}
|
|
|
|
|
2019-06-27 17:31:10 +02:00
|
|
|
|
2019-03-25 19:52:00 +01:00
|
|
|
-#ifndef FIPS_MODULE_PATH
|
|
|
|
-#define FIPS_MODULE_PATH "/etc/system-fips"
|
|
|
|
-#endif
|
|
|
|
-
|
|
|
|
void __attribute__ ((constructor)) _gcry_global_constructor (void)
|
|
|
|
{
|
2019-06-27 17:31:10 +02:00
|
|
|
- int rv;
|
|
|
|
-
|
2019-03-25 19:52:00 +01:00
|
|
|
/* We always need the FSM lock to be functional. */
|
|
|
|
_gcry_initialize_fsm_lock ();
|
2019-06-27 17:31:10 +02:00
|
|
|
-
|
2019-03-25 19:52:00 +01:00
|
|
|
- rv = access (FIPS_MODULE_PATH, F_OK);
|
|
|
|
- if (rv < 0 && errno != ENOENT)
|
|
|
|
- rv = 0;
|
|
|
|
-
|
|
|
|
- if (!rv)
|
2019-06-27 17:31:10 +02:00
|
|
|
- {
|
|
|
|
- /* We run the integrity check at this point. The remaining
|
|
|
|
- selftests are run before use of the library by application. */
|
|
|
|
- _gcry_fips_run_selftests (0);
|
|
|
|
- }
|
|
|
|
}
|
|
|
|
|
|
|
|
/* This function is called by the macro fips_is_operational and makes
|