Home GnuPG

Simplify the logic for no_secure_memory.

Description

Simplify the logic for no_secure_memory.

* src/global.c (_gcry_vcontrol): Don't set NO_SECURE_MEMORY when
FIPS mode is enabled.
(get_no_secure_memory): Remove.  Don't touch NO_SECURE_MEMORY,
when examining the variable.
(do_malloc, _gcry_is_secure): Just use NO_SECURE_MEMORY.

By ignoring GCRYCTL_DISABLE_SECMEM when FIPS, the code is now
straightforward.

  • Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>

Details

Provenance
gniibeAuthored on Dec 16 2021, 3:34 AM
Parents
rC0c1d55a84c89: Add SM3 x86-64 AVX/BMI2 assembly implementation
Branches
Unknown
Tags
Unknown