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_locl.h | |
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_locl.h')
-rw-r--r-- | src/lib/libssl/ssl_locl.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/lib/libssl/ssl_locl.h b/src/lib/libssl/ssl_locl.h index 27397308ef..a9cab69ee0 100644 --- a/src/lib/libssl/ssl_locl.h +++ b/src/lib/libssl/ssl_locl.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_locl.h,v 1.337 2021/04/21 19:27:56 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_locl.h,v 1.338 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 | * |
@@ -1219,7 +1219,7 @@ int ssl3_do_write(SSL *s, int type); | |||
1219 | int ssl3_send_alert(SSL *s, int level, int desc); | 1219 | int ssl3_send_alert(SSL *s, int level, int desc); |
1220 | int ssl3_get_req_cert_types(SSL *s, CBB *cbb); | 1220 | int ssl3_get_req_cert_types(SSL *s, CBB *cbb); |
1221 | long ssl3_get_message(SSL *s, int st1, int stn, int mt, long max, int *ok); | 1221 | long ssl3_get_message(SSL *s, int st1, int stn, int mt, long max, int *ok); |
1222 | int ssl3_send_finished(SSL *s, int a, int b, const char *sender, int slen); | 1222 | int ssl3_send_finished(SSL *s, int state_a, int state_b); |
1223 | int ssl3_num_ciphers(void); | 1223 | int ssl3_num_ciphers(void); |
1224 | const SSL_CIPHER *ssl3_get_cipher(unsigned int u); | 1224 | const SSL_CIPHER *ssl3_get_cipher(unsigned int u); |
1225 | const SSL_CIPHER *ssl3_get_cipher_by_id(unsigned int id); | 1225 | const SSL_CIPHER *ssl3_get_cipher_by_id(unsigned int id); |
@@ -1371,10 +1371,14 @@ void tls1_transcript_freeze(SSL *s); | |||
1371 | void tls1_transcript_unfreeze(SSL *s); | 1371 | void tls1_transcript_unfreeze(SSL *s); |
1372 | int tls1_transcript_record(SSL *s, const unsigned char *buf, size_t len); | 1372 | int tls1_transcript_record(SSL *s, const unsigned char *buf, size_t len); |
1373 | 1373 | ||
1374 | int tls1_PRF(SSL *s, const unsigned char *secret, size_t secret_len, | ||
1375 | const void *seed1, size_t seed1_len, const void *seed2, size_t seed2_len, | ||
1376 | const void *seed3, size_t seed3_len, const void *seed4, size_t seed4_len, | ||
1377 | const void *seed5, size_t seed5_len, unsigned char *out, size_t out_len); | ||
1378 | |||
1374 | void tls1_cleanup_key_block(SSL *s); | 1379 | void tls1_cleanup_key_block(SSL *s); |
1375 | int tls1_change_cipher_state(SSL *s, int which); | 1380 | int tls1_change_cipher_state(SSL *s, int which); |
1376 | int tls1_setup_key_block(SSL *s); | 1381 | int tls1_setup_key_block(SSL *s); |
1377 | int tls1_final_finish_mac(SSL *s, const char *str, int slen, unsigned char *p); | ||
1378 | int tls1_generate_master_secret(SSL *s, unsigned char *out, | 1382 | int tls1_generate_master_secret(SSL *s, unsigned char *out, |
1379 | unsigned char *p, int len); | 1383 | unsigned char *p, int len); |
1380 | int tls1_export_keying_material(SSL *s, unsigned char *out, size_t olen, | 1384 | int tls1_export_keying_material(SSL *s, unsigned char *out, size_t olen, |
@@ -1383,6 +1387,9 @@ int tls1_export_keying_material(SSL *s, unsigned char *out, size_t olen, | |||
1383 | int tls1_alert_code(int code); | 1387 | int tls1_alert_code(int code); |
1384 | int ssl_ok(SSL *s); | 1388 | int ssl_ok(SSL *s); |
1385 | 1389 | ||
1390 | int tls12_derive_finished(SSL *s); | ||
1391 | int tls12_derive_peer_finished(SSL *s); | ||
1392 | |||
1386 | int ssl_using_ecc_cipher(SSL *s); | 1393 | int ssl_using_ecc_cipher(SSL *s); |
1387 | int ssl_check_srvr_ecc_cert_and_alg(X509 *x, SSL *s); | 1394 | int ssl_check_srvr_ecc_cert_and_alg(X509 *x, SSL *s); |
1388 | 1395 | ||