aboutsummaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authorBodo Möller <bodo@openssl.org>2000-09-04 15:34:43 +0000
committerBodo Möller <bodo@openssl.org>2000-09-04 15:34:43 +0000
commitbbb8de0966f0181498a0491f42d8b839778a93e7 (patch)
tree5a645a6357da154d8a320950a302cdf6f1d7e793 /ssl
parent5e386163801a248063afbc9e346ab1b098356729 (diff)
downloadopenssl-bbb8de0966f0181498a0491f42d8b839778a93e7.tar.gz
Avoid abort() throughout the library, except when preprocessor
symbols for debugging are defined.
Diffstat (limited to 'ssl')
-rw-r--r--ssl/s3_clnt.c7
-rw-r--r--ssl/s3_srvr.c5
-rw-r--r--ssl/ssl.h2
-rw-r--r--ssl/ssl_lib.c13
4 files changed, 18 insertions, 9 deletions
diff --git a/ssl/s3_clnt.c b/ssl/s3_clnt.c
index 783b1dce3e..62040f9f1d 100644
--- a/ssl/s3_clnt.c
+++ b/ssl/s3_clnt.c
@@ -142,7 +142,12 @@ int ssl3_connect(SSL *s)
if (cb != NULL) cb(s,SSL_CB_HANDSHAKE_START,1);
if ((s->version & 0xff00 ) != 0x0300)
- abort();
+ {
+ SSLerr(SSL_F_SSL3_CONNECT, SSL_R_INTERNAL_ERROR);
+ ret = -1;
+ goto end;
+ }
+
/* s->version=SSL3_VERSION; */
s->type=SSL_ST_CONNECT;
diff --git a/ssl/s3_srvr.c b/ssl/s3_srvr.c
index c1895dda88..bb8cfb31e5 100644
--- a/ssl/s3_srvr.c
+++ b/ssl/s3_srvr.c
@@ -153,7 +153,10 @@ int ssl3_accept(SSL *s)
if (cb != NULL) cb(s,SSL_CB_HANDSHAKE_START,1);
if ((s->version>>8) != 3)
- abort();
+ {
+ SSLerr(SSL_F_SSL3_ACCEPT, SSL_R_INTERNAL_ERROR);
+ return -1;
+ }
s->type=SSL_ST_ACCEPT;
if (s->init_buf == NULL)
diff --git a/ssl/ssl.h b/ssl/ssl.h
index 1c55cf02ab..f418b9921b 100644
--- a/ssl/ssl.h
+++ b/ssl/ssl.h
@@ -553,7 +553,7 @@ struct ssl_st
#ifndef NO_BIO
BIO *rbio; /* used by SSL_read */
BIO *wbio; /* used by SSL_write */
- BIO *bbio; /* used during session-id reuse to concatinate
+ BIO *bbio; /* used during session-id reuse to concatenate
* messages */
#else
char *rbio; /* used by SSL_read */
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c
index ee840f09c5..5fd93ecd48 100644
--- a/ssl/ssl_lib.c
+++ b/ssl/ssl_lib.c
@@ -58,6 +58,8 @@
* [including the GNU Public Licence.]
*/
+
+#include <assert.h>
#include <stdio.h>
#include <openssl/objects.h>
#include <openssl/lhash.h>
@@ -1851,12 +1853,11 @@ void ssl_free_wbio_buffer(SSL *s)
if (s->bbio == s->wbio)
{
/* remove buffering */
- under=BIO_pop(s->wbio);
- if (under != NULL)
- s->wbio=under;
- else
- abort(); /* ok */
- }
+ s->wbio=BIO_pop(s->wbio);
+#ifdef REF_CHECK /* not the usual REF_CHECK, but this avoids adding one more preprocessor symbol */
+ assert(s->wbio != NULL);
+#endif
+ }
BIO_free(s->bbio);
s->bbio=NULL;
}