diff options
author | Matt Caswell <matt@openssl.org> | 2017-05-22 12:33:42 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2017-05-22 14:00:43 +0100 |
commit | b77f3ed17134fe6bf99d143abb1aec3f2bfac555 (patch) | |
tree | a69d558f10df0648f0adcfb78a8b11933629879d /ssl/d1_lib.c | |
parent | a89325e41f52b4a1f58202f6d8f5597105fc9f5a (diff) |
Convert existing usage of assert() to ossl_assert() in libssl
Provides consistent output and approach.
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3496)
Diffstat (limited to 'ssl/d1_lib.c')
-rw-r--r-- | ssl/d1_lib.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/ssl/d1_lib.c b/ssl/d1_lib.c index 448b2eb1d4..150e875162 100644 --- a/ssl/d1_lib.c +++ b/ssl/d1_lib.c @@ -104,7 +104,10 @@ int dtls1_new(SSL *s) } s->d1 = d1; - s->method->ssl_clear(s); + + if (!s->method->ssl_clear(s)) + return 0; + return 1; } @@ -154,7 +157,7 @@ void dtls1_free(SSL *s) s->d1 = NULL; } -void dtls1_clear(SSL *s) +int dtls1_clear(SSL *s) { pqueue *buffered_messages; pqueue *sent_messages; @@ -186,7 +189,8 @@ void dtls1_clear(SSL *s) s->d1->sent_messages = sent_messages; } - ssl3_clear(s); + if (!ssl3_clear(s)) + return 0; if (s->method->version == DTLS_ANY_VERSION) s->version = DTLS_MAX_VERSION; @@ -196,6 +200,8 @@ void dtls1_clear(SSL *s) #endif else s->version = s->method->version; + + return 1; } long dtls1_ctrl(SSL *s, int cmd, long larg, void *parg) |