summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_clnt.c
diff options
context:
space:
mode:
authorjsing <>2018-08-24 17:30:32 +0000
committerjsing <>2018-08-24 17:30:32 +0000
commit4ca92876cd1aa45f9ac5ea123afc11e1ef4574cb (patch)
treee155083a9870a0f69abb8ecb24bb8173c2a5a5c6 /src/lib/libssl/ssl_clnt.c
parent889f96509d5657ac456e0494e76acae731f1fc78 (diff)
downloadopenbsd-4ca92876cd1aa45f9ac5ea123afc11e1ef4574cb.tar.gz
openbsd-4ca92876cd1aa45f9ac5ea123afc11e1ef4574cb.tar.bz2
openbsd-4ca92876cd1aa45f9ac5ea123afc11e1ef4574cb.zip
Clean up handshake message start/finish functions.
Now that all handshake messages are created using CBB, remove the non-CBB ssl3_handshake_msg_start()/ssl3_handshake_msg_finish() functions. Rename the CBB variants by dropping the _cbb suffix. ok bcook@ inoguchi@ tb@
Diffstat (limited to 'src/lib/libssl/ssl_clnt.c')
-rw-r--r--src/lib/libssl/ssl_clnt.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/lib/libssl/ssl_clnt.c b/src/lib/libssl/ssl_clnt.c
index b026aaaee2..cf055d3ee1 100644
--- a/src/lib/libssl/ssl_clnt.c
+++ b/src/lib/libssl/ssl_clnt.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_clnt.c,v 1.32 2018/08/19 15:38:03 jsing Exp $ */ 1/* $OpenBSD: ssl_clnt.c,v 1.33 2018/08/24 17:30:32 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 *
@@ -683,7 +683,7 @@ ssl3_send_client_hello(SSL *s)
683 if (!SSL_IS_DTLS(s) || D1I(s)->send_cookie == 0) 683 if (!SSL_IS_DTLS(s) || D1I(s)->send_cookie == 0)
684 arc4random_buf(s->s3->client_random, SSL3_RANDOM_SIZE); 684 arc4random_buf(s->s3->client_random, SSL3_RANDOM_SIZE);
685 685
686 if (!ssl3_handshake_msg_start_cbb(s, &cbb, &client_hello, 686 if (!ssl3_handshake_msg_start(s, &cbb, &client_hello,
687 SSL3_MT_CLIENT_HELLO)) 687 SSL3_MT_CLIENT_HELLO))
688 goto err; 688 goto err;
689 689
@@ -775,7 +775,7 @@ ssl3_send_client_hello(SSL *s)
775 goto err; 775 goto err;
776 } 776 }
777 777
778 if (!ssl3_handshake_msg_finish_cbb(s, &cbb)) 778 if (!ssl3_handshake_msg_finish(s, &cbb))
779 goto err; 779 goto err;
780 780
781 S3I(s)->hs.state = SSL3_ST_CW_CLNT_HELLO_B; 781 S3I(s)->hs.state = SSL3_ST_CW_CLNT_HELLO_B;
@@ -2321,7 +2321,7 @@ ssl3_send_client_key_exchange(SSL *s)
2321 goto err; 2321 goto err;
2322 } 2322 }
2323 2323
2324 if (!ssl3_handshake_msg_start_cbb(s, &cbb, &kex, 2324 if (!ssl3_handshake_msg_start(s, &cbb, &kex,
2325 SSL3_MT_CLIENT_KEY_EXCHANGE)) 2325 SSL3_MT_CLIENT_KEY_EXCHANGE))
2326 goto err; 2326 goto err;
2327 2327
@@ -2344,7 +2344,7 @@ ssl3_send_client_key_exchange(SSL *s)
2344 goto err; 2344 goto err;
2345 } 2345 }
2346 2346
2347 if (!ssl3_handshake_msg_finish_cbb(s, &cbb)) 2347 if (!ssl3_handshake_msg_finish(s, &cbb))
2348 goto err; 2348 goto err;
2349 2349
2350 S3I(s)->hs.state = SSL3_ST_CW_KEY_EXCH_B; 2350 S3I(s)->hs.state = SSL3_ST_CW_KEY_EXCH_B;
@@ -2378,7 +2378,7 @@ ssl3_send_client_verify(SSL *s)
2378 memset(&cbb, 0, sizeof(cbb)); 2378 memset(&cbb, 0, sizeof(cbb));
2379 2379
2380 if (S3I(s)->hs.state == SSL3_ST_CW_CERT_VRFY_A) { 2380 if (S3I(s)->hs.state == SSL3_ST_CW_CERT_VRFY_A) {
2381 if (!ssl3_handshake_msg_start_cbb(s, &cbb, &cert_verify, 2381 if (!ssl3_handshake_msg_start(s, &cbb, &cert_verify,
2382 SSL3_MT_CERTIFICATE_VERIFY)) 2382 SSL3_MT_CERTIFICATE_VERIFY))
2383 goto err; 2383 goto err;
2384 2384
@@ -2489,7 +2489,7 @@ ssl3_send_client_verify(SSL *s)
2489 if (!CBB_add_bytes(&cbb_signature, signature, signature_len)) 2489 if (!CBB_add_bytes(&cbb_signature, signature, signature_len))
2490 goto err; 2490 goto err;
2491 2491
2492 if (!ssl3_handshake_msg_finish_cbb(s, &cbb)) 2492 if (!ssl3_handshake_msg_finish(s, &cbb))
2493 goto err; 2493 goto err;
2494 2494
2495 S3I(s)->hs.state = SSL3_ST_CW_CERT_VRFY_B; 2495 S3I(s)->hs.state = SSL3_ST_CW_CERT_VRFY_B;
@@ -2561,13 +2561,13 @@ ssl3_send_client_certificate(SSL *s)
2561 } 2561 }
2562 2562
2563 if (S3I(s)->hs.state == SSL3_ST_CW_CERT_C) { 2563 if (S3I(s)->hs.state == SSL3_ST_CW_CERT_C) {
2564 if (!ssl3_handshake_msg_start_cbb(s, &cbb, &client_cert, 2564 if (!ssl3_handshake_msg_start(s, &cbb, &client_cert,
2565 SSL3_MT_CERTIFICATE)) 2565 SSL3_MT_CERTIFICATE))
2566 goto err; 2566 goto err;
2567 if (!ssl3_output_cert_chain(s, &client_cert, 2567 if (!ssl3_output_cert_chain(s, &client_cert,
2568 (S3I(s)->tmp.cert_req == 2) ? NULL : s->cert->key->x509)) 2568 (S3I(s)->tmp.cert_req == 2) ? NULL : s->cert->key->x509))
2569 goto err; 2569 goto err;
2570 if (!ssl3_handshake_msg_finish_cbb(s, &cbb)) 2570 if (!ssl3_handshake_msg_finish(s, &cbb))
2571 goto err; 2571 goto err;
2572 2572
2573 S3I(s)->hs.state = SSL3_ST_CW_CERT_D; 2573 S3I(s)->hs.state = SSL3_ST_CW_CERT_D;