diff options
author | jsing <> | 2021-04-25 13:15:23 +0000 |
---|---|---|
committer | jsing <> | 2021-04-25 13:15:23 +0000 |
commit | ebe128ca73ce7d178a186b93684c8bf8577f3b80 (patch) | |
tree | 0d77df32f82a4eb3addc8531055c43c868f52f5e /src/lib/libssl/ssl_srvr.c | |
parent | 6b7899114d6b9acd6fbc1fc2f5129bf1ca98ac1c (diff) | |
download | openbsd-ebe128ca73ce7d178a186b93684c8bf8577f3b80.tar.gz openbsd-ebe128ca73ce7d178a186b93684c8bf8577f3b80.tar.bz2 openbsd-ebe128ca73ce7d178a186b93684c8bf8577f3b80.zip |
Clean up derivation of finished/peer finished.
Make this process more readable by having specific client/server functions,
calling the correct one based on s->server. This allows to remove various
SSL_ST_ACCEPT/SSL_ST_CONNECT checks, along with duplicate code.
ok inoguchi@ tb@
Diffstat (limited to 'src/lib/libssl/ssl_srvr.c')
-rw-r--r-- | src/lib/libssl/ssl_srvr.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/lib/libssl/ssl_srvr.c b/src/lib/libssl/ssl_srvr.c index c85a25158f..2c15081f45 100644 --- a/src/lib/libssl/ssl_srvr.c +++ b/src/lib/libssl/ssl_srvr.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_srvr.c,v 1.103 2021/04/21 19:27:56 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_srvr.c,v 1.104 2021/04/25 13:15:22 jsing 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 | * |
@@ -666,10 +666,8 @@ ssl3_accept(SSL *s) | |||
666 | 666 | ||
667 | case SSL3_ST_SW_FINISHED_A: | 667 | case SSL3_ST_SW_FINISHED_A: |
668 | case SSL3_ST_SW_FINISHED_B: | 668 | case SSL3_ST_SW_FINISHED_B: |
669 | ret = ssl3_send_finished(s, | 669 | ret = ssl3_send_finished(s, SSL3_ST_SW_FINISHED_A, |
670 | SSL3_ST_SW_FINISHED_A, SSL3_ST_SW_FINISHED_B, | 670 | SSL3_ST_SW_FINISHED_B); |
671 | TLS_MD_SERVER_FINISH_CONST, | ||
672 | TLS_MD_SERVER_FINISH_CONST_SIZE); | ||
673 | if (ret <= 0) | 671 | if (ret <= 0) |
674 | goto end; | 672 | goto end; |
675 | S3I(s)->hs.state = SSL3_ST_SW_FLUSH; | 673 | S3I(s)->hs.state = SSL3_ST_SW_FLUSH; |