summaryrefslogtreecommitdiffstats
path: root/src/ssl/d1_srvr.c
diff options
context:
space:
mode:
authorKenny Root <kroot@google.com>2015-09-25 00:44:37 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-09-25 00:44:37 +0000
commite246de8f184e644debf965ecdca552f006b56881 (patch)
treedc62c249d595198e0d99e43890019d21e901fbec /src/ssl/d1_srvr.c
parentc737bc23bc868fff21e5c1b95940813f709ea550 (diff)
parent00bc53f6f4436972b7a8dcf2c1e5fd0ad7515872 (diff)
downloadexternal_boringssl-e246de8f184e644debf965ecdca552f006b56881.zip
external_boringssl-e246de8f184e644debf965ecdca552f006b56881.tar.gz
external_boringssl-e246de8f184e644debf965ecdca552f006b56881.tar.bz2
am 00bc53f6: am a04d78d3: Revert "external/boringssl: sync with upstream."
* commit '00bc53f6f4436972b7a8dcf2c1e5fd0ad7515872': Revert "external/boringssl: sync with upstream."
Diffstat (limited to 'src/ssl/d1_srvr.c')
-rw-r--r--src/ssl/d1_srvr.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/src/ssl/d1_srvr.c b/src/ssl/d1_srvr.c
index 89c26aa..e49a3f0 100644
--- a/src/ssl/d1_srvr.c
+++ b/src/ssl/d1_srvr.c
@@ -112,8 +112,6 @@
* [including the GNU Public Licence.]
*/
-#include <openssl/ssl.h>
-
#include <assert.h>
#include <stdio.h>
@@ -152,6 +150,11 @@ int dtls1_accept(SSL *s) {
s->in_handshake++;
+ if (s->cert == NULL) {
+ OPENSSL_PUT_ERROR(SSL, dtls1_accept, SSL_R_NO_CERTIFICATE_SET);
+ return -1;
+ }
+
for (;;) {
state = s->state;
@@ -178,8 +181,8 @@ int dtls1_accept(SSL *s) {
goto end;
}
- if (!ssl3_init_handshake_buffer(s)) {
- OPENSSL_PUT_ERROR(SSL, ERR_R_INTERNAL_ERROR);
+ if (!ssl3_init_finished_mac(s)) {
+ OPENSSL_PUT_ERROR(SSL, dtls1_accept, ERR_R_INTERNAL_ERROR);
ret = -1;
goto end;
}
@@ -241,19 +244,8 @@ int dtls1_accept(SSL *s) {
s->init_num = 0;
break;
- case SSL3_ST_SW_CERT_STATUS_A:
- case SSL3_ST_SW_CERT_STATUS_B:
- ret = ssl3_send_certificate_status(s);
- if (ret <= 0) {
- goto end;
- }
- s->state = SSL3_ST_SW_KEY_EXCH_A;
- s->init_num = 0;
- break;
-
case SSL3_ST_SW_KEY_EXCH_A:
case SSL3_ST_SW_KEY_EXCH_B:
- case SSL3_ST_SW_KEY_EXCH_C:
alg_a = s->s3->tmp.new_cipher->algorithm_auth;
/* Send a ServerKeyExchange message if:
@@ -447,7 +439,7 @@ int dtls1_accept(SSL *s) {
goto end;
default:
- OPENSSL_PUT_ERROR(SSL, SSL_R_UNKNOWN_STATE);
+ OPENSSL_PUT_ERROR(SSL, dtls1_accept, SSL_R_UNKNOWN_STATE);
ret = -1;
goto end;
}