summaryrefslogtreecommitdiffstats
path: root/src/ssl/d1_srvr.c
diff options
context:
space:
mode:
authorAdam Langley <agl@google.com>2015-09-24 10:57:52 -0700
committerAdam Langley <agl@google.com>2015-09-24 11:04:03 -0700
commit1e4884f615b20946411a74e41eb9c6aa65e2d5f3 (patch)
treedd743d9d64af3145fe96b8d5fc2f3427544794bd /src/ssl/d1_srvr.c
parent08656b61d075740bfb24ddcce65223146259fc02 (diff)
downloadexternal_boringssl-1e4884f615b20946411a74e41eb9c6aa65e2d5f3.zip
external_boringssl-1e4884f615b20946411a74e41eb9c6aa65e2d5f3.tar.gz
external_boringssl-1e4884f615b20946411a74e41eb9c6aa65e2d5f3.tar.bz2
external/boringssl: sync with upstream.
This change imports the current version of BoringSSL. The only local change now is that |BORINGSSL_201509| is defined in base.h. This allows this change to be made without (hopefully) breaking the build. This change will need https://android-review.googlesource.com/172744 to be landed afterwards to update a test. Change-Id: I6d1f463f7785a2423bd846305af91c973c326104
Diffstat (limited to 'src/ssl/d1_srvr.c')
-rw-r--r--src/ssl/d1_srvr.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/ssl/d1_srvr.c b/src/ssl/d1_srvr.c
index e49a3f0..89c26aa 100644
--- a/src/ssl/d1_srvr.c
+++ b/src/ssl/d1_srvr.c
@@ -112,6 +112,8 @@
* [including the GNU Public Licence.]
*/
+#include <openssl/ssl.h>
+
#include <assert.h>
#include <stdio.h>
@@ -150,11 +152,6 @@ 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;
@@ -181,8 +178,8 @@ int dtls1_accept(SSL *s) {
goto end;
}
- if (!ssl3_init_finished_mac(s)) {
- OPENSSL_PUT_ERROR(SSL, dtls1_accept, ERR_R_INTERNAL_ERROR);
+ if (!ssl3_init_handshake_buffer(s)) {
+ OPENSSL_PUT_ERROR(SSL, ERR_R_INTERNAL_ERROR);
ret = -1;
goto end;
}
@@ -244,8 +241,19 @@ 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:
@@ -439,7 +447,7 @@ int dtls1_accept(SSL *s) {
goto end;
default:
- OPENSSL_PUT_ERROR(SSL, dtls1_accept, SSL_R_UNKNOWN_STATE);
+ OPENSSL_PUT_ERROR(SSL, SSL_R_UNKNOWN_STATE);
ret = -1;
goto end;
}