diff options
author | Michael R Sweet <michael.r.sweet@gmail.com> | 2019-09-03 10:29:07 -0400 |
---|---|---|
committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2019-09-03 10:29:07 -0400 |
commit | 998a43a0ddc6fa4675e31c5d7fb61736e6a78125 (patch) | |
tree | 4801708e5dcaee2bdc692d72ba14714a41664e48 /cups | |
parent | bc5060a1ddee63b524a3f61a939c24829f727fc7 (diff) | |
download | cups-998a43a0ddc6fa4675e31c5d7fb61736e6a78125.tar.gz |
Revert GNU TLS FIPS-140 changes.
Diffstat (limited to 'cups')
-rw-r--r-- | cups/hash.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/cups/hash.c b/cups/hash.c index 7b3ea818e..bfec994aa 100644 --- a/cups/hash.c +++ b/cups/hash.c @@ -186,12 +186,6 @@ cupsHashData(const char *algorithm, /* I - Algorithm name */ size_t tempsize = 0; /* Truncate to this size? */ -# ifdef HAVE_GNUTLS_FIPS140_SET_MODE - unsigned oldmode = gnutls_fips140_mode_enabled(); - - gnutls_fips140_set_mode(GNUTLS_FIPS140_LAX, GNUTLS_FIPS140_SET_MODE_THREAD); -# endif /* HAVE_GNUTLS_FIPS140_SET_MODE */ - if (!strcmp(algorithm, "md5")) alg = GNUTLS_DIG_MD5; else if (!strcmp(algorithm, "sha")) @@ -229,10 +223,6 @@ cupsHashData(const char *algorithm, /* I - Algorithm name */ gnutls_hash_fast(alg, data, datalen, temp); memcpy(hash, temp, tempsize); -# ifdef HAVE_GNUTLS_FIPS140_SET_MODE - gnutls_fips140_set_mode(oldmode, GNUTLS_FIPS140_SET_MODE_THREAD); -# endif /* HAVE_GNUTLS_FIPS140_SET_MODE */ - return ((ssize_t)tempsize); } @@ -241,17 +231,9 @@ cupsHashData(const char *algorithm, /* I - Algorithm name */ gnutls_hash_fast(alg, data, datalen, hash); -# ifdef HAVE_GNUTLS_FIPS140_SET_MODE - gnutls_fips140_set_mode(oldmode, GNUTLS_FIPS140_SET_MODE_THREAD); -# endif /* HAVE_GNUTLS_FIPS140_SET_MODE */ - return ((ssize_t)gnutls_hash_get_len(alg)); } -# ifdef HAVE_GNUTLS_FIPS140_SET_MODE - gnutls_fips140_set_mode(oldmode, GNUTLS_FIPS140_SET_MODE_THREAD); -# endif /* HAVE_GNUTLS_FIPS140_SET_MODE */ - #else /* * No hash support beyond MD5 without CommonCrypto or GNU TLS... @@ -285,10 +267,6 @@ cupsHashData(const char *algorithm, /* I - Algorithm name */ too_small: -#ifdef HAVE_GNUTLS_FIPS140_SET_MODE - gnutls_fips140_set_mode(oldmode, GNUTLS_FIPS140_SET_MODE_THREAD); -#endif /* HAVE_GNUTLS_FIPS140_SET_MODE */ - _cupsSetError(IPP_STATUS_ERROR_INTERNAL, _("Hash buffer too small."), 1); return (-1); } |