Home GnuPG

Add fast path for _gcry_fips_is_operational

Description

Add fast path for _gcry_fips_is_operational

* src/fips.c (no_fips_mode_required): Rename to...
(_gcry_no_fips_mode_required): ...this and make externally available.
* src/g10lib.h (_gcry_no_fips_mode_required): New extern.
(fips_mode): Inline _gcry_fips_mode to macro, use
_gcry_no_fips_mode_required directly.
(fips_is_operational): Inline fips_mode check from
_gcry_fips_in_operational.

Add fast path to reduce call overhead in src/visibility.c where
fips_is_operational is called before cipher/md/etc operations.

  • Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>

Details

Provenance
jukiviliAuthored on Jun 19 2018, 5:34 PM
Parents
rC233e2049a2cc: Access cipher mode routines through routine pointers
Branches
Unknown
Tags
Unknown