AC_DEFINE_UNQUOTED(GNUTLS_VERSION, "$GNUTLS_VERSION", [version of gnutls])
-GNUTLS_GCRYPT_VERSION=1.1.44
+GNUTLS_GCRYPT_VERSION=1.1.90
GNUTLS_LIBTASN1_VERSION=0.2.5
AC_DEFINE_UNQUOTED(GNUTLS_GCRYPT_VERSION, "$GNUTLS_GCRYPT_VERSION", [version of gcrypt])
AC_DEFINE_UNQUOTED(GNUTLS_LIBTASN1_VERSION, "$GNUTLS_LIBTASN1_VERSION", [version of libtasn1])
dnl Can't disable - gnutls depends on gcrypt
AC_DEFINE(USE_GCRYPT, 1, [use gcrypt])
-# Since libgcrypt 1.1.90 we have a new function to create nonces etc.
-# it is useful to use this one instead of the the standard random
-# functions. As a temporary solution we check for that function and
-# don't require an unrelease libgcrypt. This should be changed after
-# libgcrypt 1.2 has been released.
-save_LIBS="$LIBS"
-LIBS="$LIBS $LIBGCRYPT_LIBS"
-AC_CHECK_FUNCS(gcry_create_nonce)
-LIBS="$save_LIBS"
-
-
AC_MSG_CHECKING([whether to disable SRP authentication support])
AC_ARG_ENABLE( srp-authentication, [ --disable-srp-authentication Disable the SRP authentication support],
ac_enable_srp=no
GNUTLS_HASH_HANDLE _gnutls_hash_init(gnutls_mac_algorithm algorithm)
{
GNUTLS_MAC_HANDLE ret = NULL;
- gcry_error_t result;
+ gcry_error_t result = 0;
ret = gnutls_malloc(sizeof(GNUTLS_MAC_HANDLE_INT));
if (ret == NULL) {
default:
gnutls_assert();
gnutls_free( ret);
- ret = GNUTLS_HASH_FAILED; break;
+ ret = GNUTLS_HASH_FAILED;
}
if (result) {
const void *key, int keylen)
{
GNUTLS_MAC_HANDLE ret;
- gcry_error_t result;
+ gcry_error_t result = 0;
ret = gnutls_malloc(sizeof(GNUTLS_MAC_HANDLE_INT));
if (ret == NULL)
*/
int _gnutls_get_random(opaque * res, int bytes, int level)
{
-#ifdef HAVE_GCRY_CREATE_NONCE
if (level == GNUTLS_WEAK_RANDOM) {
gcry_create_nonce( res, bytes);
return 0;
}
-#endif
gcry_randomize( res, bytes, level);
goto cleanup;
}
STR_APPEND(str_escape(string, escaped, sizeof_escaped));
+ gnutls_free(string); string = NULL;
} else {
char *res;
cleanup:
gnutls_free( value2);
+ gnutls_free( string);
gnutls_free( escaped);
_gnutls_string_clear(&out_str);
return result;