Add fast path for _gcry_fips_is_operational

Authored by jukivili on Jun 19 2018, 5:34 PM.

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

Committed
jukiviliJun 19 2018, 6:29 PM
Parents
rC233e2049a2cc: Access cipher mode routines through routine pointers
Branches
Unknown
Tags
Unknown