Blame doc/functions/gnutls_fips140_set_mode

Packit aea12f
Packit aea12f
Packit aea12f
Packit aea12f
Packit aea12f
@deftypefun {void} {gnutls_fips140_set_mode} (gnutls_fips_mode_t @var{mode}, unsigned @var{flags})
Packit aea12f
@var{mode}: the FIPS140-2 mode to switch to
Packit aea12f
Packit aea12f
@var{flags}: should be zero or @code{GNUTLS_FIPS140_SET_MODE_THREAD} 
Packit aea12f
Packit aea12f
That function is not thread-safe when changing the mode with no flags
Packit aea12f
(globally), and should be called prior to creating any threads. Its
Packit aea12f
behavior with no flags after threads are created is undefined.
Packit aea12f
Packit aea12f
When the flag @code{GNUTLS_FIPS140_SET_MODE_THREAD}  is specified
Packit aea12f
then this call will change the FIPS140-2 mode for this particular
Packit aea12f
thread and not for the whole process. That way an application
Packit aea12f
can utilize this function to set and reset mode for specific
Packit aea12f
operations.
Packit aea12f
Packit aea12f
This function never fails but will be a no-op if used when
Packit aea12f
the library is not in FIPS140-2 mode. When asked to switch to unknown
Packit aea12f
values for  @code{mode} or to @code{GNUTLS_FIPS140_SELFTESTS}  mode, the library
Packit aea12f
switches to @code{GNUTLS_FIPS140_STRICT}  mode.
Packit aea12f
Packit aea12f
@strong{Since:} 3.6.2
Packit aea12f
@end deftypefun