summaryrefslogtreecommitdiff
path: root/lib/libssl/d1_srvr.c
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2015-09-13 09:20:20 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2015-09-13 09:20:20 +0000
commit921ecfc17185c6c187819784c19ace189b3af3f5 (patch)
treeb9c7a0389d4ee1ff694027441eab147b2649ca85 /lib/libssl/d1_srvr.c
parenteac71f4ebe59b116be833523d12779778d16bed5 (diff)
The *_accept() functions increment in_handshake at the start of the function,
then decrement it and call a callback on exit from the function. As such, these functions should not return in the middle, otherwise in_handshake is never decremented and the callback never called. ok beck@ "with many sighs" miod@
Diffstat (limited to 'lib/libssl/d1_srvr.c')
-rw-r--r--lib/libssl/d1_srvr.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/libssl/d1_srvr.c b/lib/libssl/d1_srvr.c
index f5e0ec3e4b7..f6664237aee 100644
--- a/lib/libssl/d1_srvr.c
+++ b/lib/libssl/d1_srvr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: d1_srvr.c,v 1.66 2015/09/12 20:51:33 jsing Exp $ */
+/* $OpenBSD: d1_srvr.c,v 1.67 2015/09/13 09:20:19 jsing Exp $ */
/*
* DTLS implementation written by Nagendra Modadugu
* (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
@@ -202,7 +202,8 @@ dtls1_accept(SSL *s)
if (s->cert == NULL) {
SSLerr(SSL_F_DTLS1_ACCEPT, SSL_R_NO_CERTIFICATE_SET);
- return (-1);
+ ret = -1;
+ goto end;
}
for (;;) {
@@ -224,7 +225,8 @@ dtls1_accept(SSL *s)
if ((s->version & 0xff00) != (DTLS1_VERSION & 0xff00)) {
SSLerr(SSL_F_DTLS1_ACCEPT, ERR_R_INTERNAL_ERROR);
- return -1;
+ ret = -1;
+ goto end;
}
s->type = SSL_ST_ACCEPT;