summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_locl.h
diff options
context:
space:
mode:
authorjsing <>2022-10-01 16:23:15 +0000
committerjsing <>2022-10-01 16:23:15 +0000
commitd5e660940f76ba9fedb2400c0fa888e996ee93c9 (patch)
tree17355bd2c7397fbcda5912079e30abc288561c2f /src/lib/libssl/ssl_locl.h
parent891337e5a26a9faa47ed08abfbaeaf58e11c669c (diff)
downloadopenbsd-d5e660940f76ba9fedb2400c0fa888e996ee93c9.tar.gz
openbsd-d5e660940f76ba9fedb2400c0fa888e996ee93c9.tar.bz2
openbsd-d5e660940f76ba9fedb2400c0fa888e996ee93c9.zip
Move handshake message handling functions from ssl_both.c to client/server.
Currently, ssl_both.c contains several functions that are used by both the legacy client and legacy server. This interwines the client and server, making it harder to make progressive changes. While it does deduplicate some code, it also ends up with code that is conditioned on s->server and forces the caller to pass in SSL3_ST_* values. Move these functions from ssl_both.c into ssl_clnt.c and ssl_srvr.c, renaming as appropriate and removing the s->server conditionals. Also move the client and server function prototypes from ssl_locl.h into the .c files, making them static in the process. ok tb@
Diffstat (limited to 'src/lib/libssl/ssl_locl.h')
-rw-r--r--src/lib/libssl/ssl_locl.h37
1 files changed, 1 insertions, 36 deletions
diff --git a/src/lib/libssl/ssl_locl.h b/src/lib/libssl/ssl_locl.h
index a6fc6eaa32..a8d5308e8c 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.425 2022/09/10 15:29:33 jsing Exp $ */ 1/* $OpenBSD: ssl_locl.h,v 1.426 2022/10/01 16:23:15 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 *
@@ -1357,16 +1357,10 @@ int ssl_verify_alarm_type(long type);
1357int SSL_SESSION_ticket(SSL_SESSION *ss, unsigned char **out, size_t *out_len); 1357int SSL_SESSION_ticket(SSL_SESSION *ss, unsigned char **out, size_t *out_len);
1358 1358
1359const SSL_CIPHER *ssl3_get_cipher_by_char(const unsigned char *p); 1359const SSL_CIPHER *ssl3_get_cipher_by_char(const unsigned char *p);
1360int ssl3_send_server_certificate(SSL *s);
1361int ssl3_send_newsession_ticket(SSL *s);
1362int ssl3_send_cert_status(SSL *s);
1363int ssl3_get_finished(SSL *s, int state_a, int state_b);
1364int ssl3_send_change_cipher_spec(SSL *s, int state_a, int state_b);
1365int ssl3_do_write(SSL *s, int type); 1360int ssl3_do_write(SSL *s, int type);
1366int ssl3_send_alert(SSL *s, int level, int desc); 1361int ssl3_send_alert(SSL *s, int level, int desc);
1367int ssl3_get_req_cert_types(SSL *s, CBB *cbb); 1362int ssl3_get_req_cert_types(SSL *s, CBB *cbb);
1368int ssl3_get_message(SSL *s, int st1, int stn, int mt, long max); 1363int ssl3_get_message(SSL *s, int st1, int stn, int mt, long max);
1369int ssl3_send_finished(SSL *s, int state_a, int state_b);
1370int ssl3_num_ciphers(void); 1364int ssl3_num_ciphers(void);
1371const SSL_CIPHER *ssl3_get_cipher(unsigned int u); 1365const SSL_CIPHER *ssl3_get_cipher(unsigned int u);
1372const SSL_CIPHER *ssl3_get_cipher_by_id(unsigned int id); 1366const SSL_CIPHER *ssl3_get_cipher_by_id(unsigned int id);
@@ -1424,35 +1418,6 @@ int ssl_server_legacy_first_packet(SSL *s);
1424int ssl3_write_pending(SSL *s, int type, const unsigned char *buf, 1418int ssl3_write_pending(SSL *s, int type, const unsigned char *buf,
1425 unsigned int len); 1419 unsigned int len);
1426 1420
1427/* some client-only functions */
1428int ssl3_send_client_hello(SSL *s);
1429int ssl3_get_dtls_hello_verify(SSL *s);
1430int ssl3_get_server_hello(SSL *s);
1431int ssl3_get_certificate_request(SSL *s);
1432int ssl3_get_new_session_ticket(SSL *s);
1433int ssl3_get_cert_status(SSL *s);
1434int ssl3_get_server_done(SSL *s);
1435int ssl3_send_client_verify(SSL *s);
1436int ssl3_send_client_certificate(SSL *s);
1437int ssl_do_client_cert_cb(SSL *s, X509 **px509, EVP_PKEY **ppkey);
1438int ssl3_send_client_key_exchange(SSL *s);
1439int ssl3_get_server_key_exchange(SSL *s);
1440int ssl3_get_server_certificate(SSL *s);
1441int ssl3_check_cert_and_algorithm(SSL *s);
1442int ssl3_check_finished(SSL *s);
1443
1444/* some server-only functions */
1445int ssl3_get_client_hello(SSL *s);
1446int ssl3_send_dtls_hello_verify_request(SSL *s);
1447int ssl3_send_server_hello(SSL *s);
1448int ssl3_send_hello_request(SSL *s);
1449int ssl3_send_server_key_exchange(SSL *s);
1450int ssl3_send_certificate_request(SSL *s);
1451int ssl3_send_server_done(SSL *s);
1452int ssl3_get_client_certificate(SSL *s);
1453int ssl3_get_client_key_exchange(SSL *s);
1454int ssl3_get_cert_verify(SSL *s);
1455
1456int ssl_kex_generate_dhe(DH *dh, DH *dh_params); 1421int ssl_kex_generate_dhe(DH *dh, DH *dh_params);
1457int ssl_kex_generate_dhe_params_auto(DH *dh, size_t key_len); 1422int ssl_kex_generate_dhe_params_auto(DH *dh, size_t key_len);
1458int ssl_kex_params_dhe(DH *dh, CBB *cbb); 1423int ssl_kex_params_dhe(DH *dh, CBB *cbb);