self-test for FIPS mode

Werner Koch wk at gnupg.org
Wed Aug 12 08:30:07 CEST 2015


On Tue, 11 Aug 2015 18:15, xxiao8 at fosiao.com said:

> For libgcrypt the self-tests at runtime are all embedded in various
> source code, is there a way I can run the FIPS selftests explicitly?

You may call

      if (gcry_control (GCRYCTL_SELFTEST, 0))
        fail ("running self-test failed\n");

ay any time:

| @item GCRYCTL_SELFTEST; Arguments: none
| This may be used at anytime to have the library run all implemented
| self-tests.  It works in standard and in FIPS mode.  Returns 0 on
| success or an error code on failure.



Shalom-Salam,

   Werner

-- 
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.




More information about the Gcrypt-devel mailing list