From 74dfa426d682906adb2679ad8e4a4824d3cd27e4 Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Thu, 6 Sep 2018 09:22:24 +0900 Subject: Remove fips_mode support originally available in libgcrypt. * _gpgrt_secmem_malloc_internal: Remove fips_mode() call and its handling. --- src/secmem.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/secmem.c b/src/secmem.c index ad82dfb..dd1d3cc 100644 --- a/src/secmem.c +++ b/src/secmem.c @@ -619,12 +619,6 @@ _gpgrt_secmem_malloc_internal (size_t size, int xhint) return NULL; } } - if (not_locked && fips_mode ()) - { - _gpgrt_log_info (_("secure memory pool is not locked while in FIPS mode\n")); - _gpg_err_set_errno (ENOMEM); - return NULL; - } if (show_warning && !suspend_warning) { show_warning = 0; @@ -642,9 +636,8 @@ _gpgrt_secmem_malloc_internal (size_t size, int xhint) } /* If we are called from xmalloc style function resort to the - * overflow pools to return memory. We don't do this in FIPS mode, - * though. */ - if ((xhint || auto_expand) && !fips_mode ()) + * overflow pools to return memory. */ + if ((xhint || auto_expand)) { for (pool = pool->next; pool; pool = pool->next) { -- cgit v1.2.3