summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2017-02-21 11:05:48 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2017-03-06 22:24:33 +0100
commitd0b11504c94032cf93438b88cdf808127aeffc2e (patch)
tree8c662838979c7ab3b0dc205717e4c0d535404438
parentd4611a82da79d8e6472b394bfe68c5d9c267593a (diff)
downloadgnutls-d0b11504c94032cf93438b88cdf808127aeffc2e.tar.gz
Added _gnutls_lib_force_operational
This allows recovering from _gnutls_lib_simulate_error() which in turn allows more advanced tests. Not documented, and intended to be an internal symbol only. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
-rw-r--r--lib/fips.c5
-rw-r--r--lib/fips.h1
-rw-r--r--lib/libgnutls.map1
3 files changed, 7 insertions, 0 deletions
diff --git a/lib/fips.c b/lib/fips.c
index 677c047b7b..9d0d9977ca 100644
--- a/lib/fips.c
+++ b/lib/fips.c
@@ -418,3 +418,8 @@ void _gnutls_lib_simulate_error(void)
{
_gnutls_switch_lib_state(LIB_STATE_ERROR);
}
+
+void _gnutls_lib_force_operational(void)
+{
+ _gnutls_switch_lib_state(LIB_STATE_OPERATIONAL);
+}
diff --git a/lib/fips.h b/lib/fips.h
index 637bcd7c27..4de5ea2422 100644
--- a/lib/fips.h
+++ b/lib/fips.h
@@ -71,5 +71,6 @@ unsigned _gnutls_fips_mode_enabled(void);
void _gnutls_switch_lib_state(gnutls_lib_state_t state);
void _gnutls_lib_simulate_error(void);
+void _gnutls_lib_force_operational(void);
#endif /* FIPS_H */
diff --git a/lib/libgnutls.map b/lib/libgnutls.map
index 80d5bbf33b..ba4ef45a0e 100644
--- a/lib/libgnutls.map
+++ b/lib/libgnutls.map
@@ -1172,6 +1172,7 @@ GNUTLS_PRIVATE_3_4 {
# Internal symbols used by fips-test
_gnutls_lib_simulate_error;
+ _gnutls_lib_force_operational;
#symbols needed for crypto-selftests
_gnutls_log_level;
_gnutls_digest_exists;