diff options
Diffstat (limited to 'src/lib/libssl/ssl_both.c')
-rw-r--r-- | src/lib/libssl/ssl_both.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libssl/ssl_both.c b/src/lib/libssl/ssl_both.c index 6625286daf..789ab01213 100644 --- a/src/lib/libssl/ssl_both.c +++ b/src/lib/libssl/ssl_both.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_both.c,v 1.25 2021/03/24 18:44:00 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_both.c,v 1.26 2021/03/27 17:56:28 tb Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -181,7 +181,7 @@ ssl3_send_finished(SSL *s, int a, int b, const char *sender, int slen) | |||
181 | S3I(s)->tmp.finish_md_len = md_len; | 181 | S3I(s)->tmp.finish_md_len = md_len; |
182 | 182 | ||
183 | /* Copy finished so we can use it for renegotiation checks. */ | 183 | /* Copy finished so we can use it for renegotiation checks. */ |
184 | if (s->internal->type == SSL_ST_CONNECT) { | 184 | if (!s->server) { |
185 | memcpy(S3I(s)->previous_client_finished, | 185 | memcpy(S3I(s)->previous_client_finished, |
186 | S3I(s)->tmp.finish_md, md_len); | 186 | S3I(s)->tmp.finish_md, md_len); |
187 | S3I(s)->previous_client_finished_len = md_len; | 187 | S3I(s)->previous_client_finished_len = md_len; |
@@ -285,7 +285,7 @@ ssl3_get_finished(SSL *s, int a, int b) | |||
285 | 285 | ||
286 | /* Copy finished so we can use it for renegotiation checks. */ | 286 | /* Copy finished so we can use it for renegotiation checks. */ |
287 | OPENSSL_assert(md_len <= EVP_MAX_MD_SIZE); | 287 | OPENSSL_assert(md_len <= EVP_MAX_MD_SIZE); |
288 | if (s->internal->type == SSL_ST_ACCEPT) { | 288 | if (s->server) { |
289 | memcpy(S3I(s)->previous_client_finished, | 289 | memcpy(S3I(s)->previous_client_finished, |
290 | S3I(s)->tmp.peer_finish_md, md_len); | 290 | S3I(s)->tmp.peer_finish_md, md_len); |
291 | S3I(s)->previous_client_finished_len = md_len; | 291 | S3I(s)->previous_client_finished_len = md_len; |