diff options
author | jsing <> | 2015-09-11 16:28:37 +0000 |
---|---|---|
committer | jsing <> | 2015-09-11 16:28:37 +0000 |
commit | 396c0de2b029bf62cad52ca0c26f6652679681ad (patch) | |
tree | 07de9f4ea223bdb360a6ea9a6ca3786e496a5fbd /src/lib/libssl/d1_both.c | |
parent | 17940a7d2ce479d9b1d953966cf5889735aa9714 (diff) | |
download | openbsd-396c0de2b029bf62cad52ca0c26f6652679681ad.tar.gz openbsd-396c0de2b029bf62cad52ca0c26f6652679681ad.tar.bz2 openbsd-396c0de2b029bf62cad52ca0c26f6652679681ad.zip |
Replace dtls1_send_finished() with ssl3_send_finished() - they're now
both essentially the same (in fact DTLS benefits from improvements
previously made to the ssl3_send_finished() function).
ok beck@
Diffstat (limited to 'src/lib/libssl/d1_both.c')
-rw-r--r-- | src/lib/libssl/d1_both.c | 43 |
1 files changed, 1 insertions, 42 deletions
diff --git a/src/lib/libssl/d1_both.c b/src/lib/libssl/d1_both.c index 4d2827a2c0..dd67028a38 100644 --- a/src/lib/libssl/d1_both.c +++ b/src/lib/libssl/d1_both.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: d1_both.c,v 1.36 2015/09/11 15:59:21 jsing Exp $ */ | 1 | /* $OpenBSD: d1_both.c,v 1.37 2015/09/11 16:28:37 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. |
@@ -902,47 +902,6 @@ f_err: | |||
902 | return (-1); | 902 | return (-1); |
903 | } | 903 | } |
904 | 904 | ||
905 | int | ||
906 | dtls1_send_finished(SSL *s, int a, int b, const char *sender, int slen) | ||
907 | { | ||
908 | unsigned char *p; | ||
909 | int i; | ||
910 | unsigned long l; | ||
911 | |||
912 | if (s->state == a) { | ||
913 | p = ssl3_handshake_msg_start(s, SSL3_MT_FINISHED); | ||
914 | |||
915 | i = s->method->ssl3_enc->final_finish_mac(s, sender, slen, | ||
916 | s->s3->tmp.finish_md); | ||
917 | s->s3->tmp.finish_md_len = i; | ||
918 | memcpy(p, s->s3->tmp.finish_md, i); | ||
919 | p += i; | ||
920 | l = i; | ||
921 | |||
922 | /* | ||
923 | * Copy the finished so we can use it for | ||
924 | * renegotiation checks | ||
925 | */ | ||
926 | if (s->type == SSL_ST_CONNECT) { | ||
927 | OPENSSL_assert(i <= EVP_MAX_MD_SIZE); | ||
928 | memcpy(s->s3->previous_client_finished, | ||
929 | s->s3->tmp.finish_md, i); | ||
930 | s->s3->previous_client_finished_len = i; | ||
931 | } else { | ||
932 | OPENSSL_assert(i <= EVP_MAX_MD_SIZE); | ||
933 | memcpy(s->s3->previous_server_finished, | ||
934 | s->s3->tmp.finish_md, i); | ||
935 | s->s3->previous_server_finished_len = i; | ||
936 | } | ||
937 | |||
938 | ssl3_handshake_msg_finish(s, l); | ||
939 | |||
940 | s->state = b; | ||
941 | } | ||
942 | |||
943 | return (ssl3_handshake_write(s)); | ||
944 | } | ||
945 | |||
946 | /* | 905 | /* |
947 | * for these 2 messages, we need to | 906 | * for these 2 messages, we need to |
948 | * ssl->enc_read_ctx re-init | 907 | * ssl->enc_read_ctx re-init |