diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2014-08-14 11:26:33 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2014-08-14 11:26:35 +0200 |
commit | a3175ff6177a3feab8e1da134924851827bd0900 (patch) | |
tree | d419887c2df773159e9db73eb0879fa4f7a9cc67 /src/cli.c | |
parent | df2a9540df2d187f90f5f45ee5cd7c9358f1ba7b (diff) | |
download | gnutls-a3175ff6177a3feab8e1da134924851827bd0900.tar.gz |
gnutls-cli: added --fips140-mode command line option
That option will report the status of the FIPS140-2 mode in the library.
Diffstat (limited to 'src/cli.c')
-rw-r--r-- | src/cli.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -1303,6 +1303,16 @@ static void cmd_parser(int argc, char **argv) if (rest == NULL && argc > 0) rest = argv[0]; + + if (HAVE_OPT(FIPS140_MODE)) { + if (gnutls_fips140_mode_enabled() != 0) { + fprintf(stderr, "library is in FIPS140-2 mode\n"); + exit(0); + } + fprintf(stderr, "library is NOT in FIPS140-2 mode\n"); + exit(1); + } + if (HAVE_OPT(BENCHMARK_CIPHERS)) { benchmark_cipher(OPT_VALUE_DEBUG); exit(0); |