summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2004-02-28 00:01:16 +0000
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2004-02-28 00:01:16 +0000
commitd04492a5df53ac998f5b45bf503547c618ed88d6 (patch)
tree95b8682855e5ae41960334606e8e453af5c366bb
parent3c8cb8bf7da97d2c93a9809a755c9c57882d47fe (diff)
downloadgnutls-d04492a5df53ac998f5b45bf503547c618ed88d6.tar.gz
some bugfixes. No longer allow sending client hello if a TLS version is not set.
-rw-r--r--configure.in2
-rw-r--r--lib/gnutls_handshake.c6
-rw-r--r--lib/gnutls_hash_int.c2
3 files changed, 3 insertions, 7 deletions
diff --git a/configure.in b/configure.in
index 2c79e5db8e..859f667db3 100644
--- a/configure.in
+++ b/configure.in
@@ -12,7 +12,7 @@ AC_DEFINE_UNQUOTED(T_OS, "$target_os", [OS name])
dnl Gnutls Version
GNUTLS_MAJOR_VERSION=1
GNUTLS_MINOR_VERSION=0
-GNUTLS_MICRO_VERSION=7
+GNUTLS_MICRO_VERSION=8
GNUTLS_VERSION=$GNUTLS_MAJOR_VERSION.$GNUTLS_MINOR_VERSION.$GNUTLS_MICRO_VERSION
AC_DEFINE_UNQUOTED(GNUTLS_VERSION, "$GNUTLS_VERSION", [version of gnutls])
diff --git a/lib/gnutls_handshake.c b/lib/gnutls_handshake.c
index 9d9de3d230..937f1af337 100644
--- a/lib/gnutls_handshake.c
+++ b/lib/gnutls_handshake.c
@@ -1487,12 +1487,10 @@ static int _gnutls_send_client_hello(gnutls_session session, int again)
resumed_security_parameters.version;
}
- if (hver <= 0) {
- if (hver == 0)
- hver = GNUTLS_E_INTERNAL_ERROR;
+ if (hver == GNUTLS_VERSION_UNKNOWN || hver == 0) {
gnutls_assert();
gnutls_free(data);
- return hver;
+ return GNUTLS_E_INTERNAL_ERROR;
}
data[pos++] = _gnutls_version_get_major(hver);
diff --git a/lib/gnutls_hash_int.c b/lib/gnutls_hash_int.c
index 54b4c12c6a..9bb191f9a4 100644
--- a/lib/gnutls_hash_int.c
+++ b/lib/gnutls_hash_int.c
@@ -158,12 +158,10 @@ GNUTLS_MAC_HANDLE _gnutls_hmac_init(gnutls_mac_algorithm algorithm,
result = gcry_md_open(&ret->handle, GCRY_MD_RMD160, GCRY_MD_FLAG_HMAC);
break;
default:
- gnutls_assert();
result = -1;
}
if (result) {
- gnutls_assert();
gnutls_free(ret);
ret = GNUTLS_MAC_FAILED;
}