diff options
Diffstat (limited to 'src/lib/libssl/d1_srvr.c')
-rw-r--r-- | src/lib/libssl/d1_srvr.c | 31 |
1 files changed, 2 insertions, 29 deletions
diff --git a/src/lib/libssl/d1_srvr.c b/src/lib/libssl/d1_srvr.c index 8027e44123..472d0de9dd 100644 --- a/src/lib/libssl/d1_srvr.c +++ b/src/lib/libssl/d1_srvr.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: d1_srvr.c,v 1.68 2016/11/04 18:30:21 guenther Exp $ */ | 1 | /* $OpenBSD: d1_srvr.c,v 1.69 2016/12/06 13:38:11 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * DTLS implementation written by Nagendra Modadugu | 3 | * DTLS implementation written by Nagendra Modadugu |
4 | * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. | 4 | * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. |
@@ -368,7 +368,7 @@ dtls1_accept(SSL *s) | |||
368 | if (!(s->s3->tmp.new_cipher->algorithm_auth & | 368 | if (!(s->s3->tmp.new_cipher->algorithm_auth & |
369 | SSL_aNULL)) { | 369 | SSL_aNULL)) { |
370 | dtls1_start_timer(s); | 370 | dtls1_start_timer(s); |
371 | ret = dtls1_send_server_certificate(s); | 371 | ret = ssl3_send_server_certificate(s); |
372 | if (ret <= 0) | 372 | if (ret <= 0) |
373 | goto end; | 373 | goto end; |
374 | if (s->tlsext_status_expected) | 374 | if (s->tlsext_status_expected) |
@@ -722,30 +722,3 @@ dtls1_send_hello_verify_request(SSL *s) | |||
722 | /* s->state = DTLS1_ST_SW_HELLO_VERIFY_REQUEST_B */ | 722 | /* s->state = DTLS1_ST_SW_HELLO_VERIFY_REQUEST_B */ |
723 | return (ssl3_handshake_write(s)); | 723 | return (ssl3_handshake_write(s)); |
724 | } | 724 | } |
725 | |||
726 | int | ||
727 | dtls1_send_server_certificate(SSL *s) | ||
728 | { | ||
729 | unsigned long l; | ||
730 | X509 *x; | ||
731 | |||
732 | if (s->state == SSL3_ST_SW_CERT_A) { | ||
733 | x = ssl_get_server_send_cert(s); | ||
734 | if (x == NULL) { | ||
735 | SSLerr(SSL_F_DTLS1_SEND_SERVER_CERTIFICATE, | ||
736 | ERR_R_INTERNAL_ERROR); | ||
737 | return (0); | ||
738 | } | ||
739 | |||
740 | l = dtls1_output_cert_chain(s, x); | ||
741 | s->state = SSL3_ST_SW_CERT_B; | ||
742 | s->init_num = (int)l; | ||
743 | s->init_off = 0; | ||
744 | |||
745 | /* buffer the message to handle re-xmits */ | ||
746 | dtls1_buffer_message(s, 0); | ||
747 | } | ||
748 | |||
749 | /* SSL3_ST_SW_CERT_B */ | ||
750 | return (dtls1_do_write(s, SSL3_RT_HANDSHAKE)); | ||
751 | } | ||