summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2003-08-09 18:59:51 +0000
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2003-08-09 18:59:51 +0000
commit18b419b7d4efa6b1e4638fbf8e950294d23c1eca (patch)
treeade9e558963ff1da2c6316ae16cc548ddf419073
parent0ca5efcd826de416530152306470150160da0a88 (diff)
downloadgnutls-18b419b7d4efa6b1e4638fbf8e950294d23c1eca.tar.gz
*** empty log message ***
-rw-r--r--lib/gnutls_handshake.c3
-rw-r--r--lib/gnutls_kx.c1
-rw-r--r--lib/gnutls_mpi.c7
3 files changed, 5 insertions, 6 deletions
diff --git a/lib/gnutls_handshake.c b/lib/gnutls_handshake.c
index 6469ff9460..555c7344c3 100644
--- a/lib/gnutls_handshake.c
+++ b/lib/gnutls_handshake.c
@@ -816,7 +816,8 @@ static int _gnutls_recv_handshake_header(gnutls_session session,
SSL2_HEADERS);
if (ret < 0) {
- return GNUTLS_E_UNEXPECTED_PACKET_LENGTH;
+ gnutls_assert();
+ return ret;
}
/* The case ret==0 is catched here.
diff --git a/lib/gnutls_kx.c b/lib/gnutls_kx.c
index 80a6bf789c..768996f241 100644
--- a/lib/gnutls_kx.c
+++ b/lib/gnutls_kx.c
@@ -469,6 +469,7 @@ int _gnutls_recv_client_certificate( gnutls_session session)
gnutls_assert();
return GNUTLS_E_NO_CERTIFICATE_FOUND;
}
+
return ret;
}
diff --git a/lib/gnutls_mpi.c b/lib/gnutls_mpi.c
index e1cd74e5fa..c6149396f9 100644
--- a/lib/gnutls_mpi.c
+++ b/lib/gnutls_mpi.c
@@ -43,7 +43,7 @@ int _gnutls_mpi_scan( GNUTLS_MPI *ret_mpi, const opaque *buffer, size_t *nbytes
int ret;
ret = gcry_mpi_scan( ret_mpi, GCRYMPI_FMT_USG, buffer, *nbytes, nbytes);
- if (!ret) return ret;
+ if (ret) return GNUTLS_E_MPI_SCAN_FAILED;
/* MPIs with 0 bits are illegal
*/
@@ -59,8 +59,7 @@ int _gnutls_mpi_scan_pgp( GNUTLS_MPI *ret_mpi, const opaque *buffer, size_t *nby
{
int ret;
ret = gcry_mpi_scan( ret_mpi, GCRYMPI_FMT_PGP, buffer, *nbytes, nbytes);
-
- if (!ret) return ret;
+ if (ret) return GNUTLS_E_MPI_SCAN_FAILED;
/* MPIs with 0 bits are illegal
*/
@@ -77,7 +76,6 @@ int _gnutls_mpi_print( opaque *buffer, size_t *nbytes, const GNUTLS_MPI a )
int ret;
ret = gcry_mpi_print( GCRYMPI_FMT_USG, buffer, *nbytes, nbytes, a);
-
if (!ret) return ret;
return GNUTLS_E_MPI_PRINT_FAILED;
@@ -89,7 +87,6 @@ int _gnutls_mpi_print_lz( opaque *buffer, size_t *nbytes, const GNUTLS_MPI a )
int ret;
ret = gcry_mpi_print( GCRYMPI_FMT_STD, buffer, *nbytes, nbytes, a);
-
if (!ret) return ret;
return GNUTLS_E_MPI_PRINT_FAILED;