summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_locl.h
diff options
context:
space:
mode:
authorjsing <>2018-11-08 22:28:52 +0000
committerjsing <>2018-11-08 22:28:52 +0000
commit3ddaece0e07a9c99e3a1f04d188c5ece7176ee46 (patch)
treeea0388ba51cbbc63fa62e563b9694fedd9ef0f74 /src/lib/libssl/ssl_locl.h
parent638a717c204f5dd9a5b399e3c095815fb6d15124 (diff)
downloadopenbsd-3ddaece0e07a9c99e3a1f04d188c5ece7176ee46.tar.gz
openbsd-3ddaece0e07a9c99e3a1f04d188c5ece7176ee46.tar.bz2
openbsd-3ddaece0e07a9c99e3a1f04d188c5ece7176ee46.zip
Clean up and simplify the handshake transcript code.
This provides a cleaner, simpler and more readable API, with code that uses a BUF_MEM instead of a BIO. ok beck@ ("hurry up") and tb@.
Diffstat (limited to 'src/lib/libssl/ssl_locl.h')
-rw-r--r--src/lib/libssl/ssl_locl.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/lib/libssl/ssl_locl.h b/src/lib/libssl/ssl_locl.h
index 32766de1cf..3b08f8c772 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.221 2018/11/08 20:55:18 jsing Exp $ */ 1/* $OpenBSD: ssl_locl.h,v 1.222 2018/11/08 22:28:52 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 *
@@ -780,8 +780,8 @@ typedef struct ssl3_state_internal_st {
780 int wpend_ret; /* number of bytes submitted */ 780 int wpend_ret; /* number of bytes submitted */
781 const unsigned char *wpend_buf; 781 const unsigned char *wpend_buf;
782 782
783 /* used during startup, digest all incoming/outgoing packets */ 783 /* Transcript of handshake messages that have been sent and received. */
784 BIO *handshake_buffer; 784 BUF_MEM *handshake_transcript;
785 785
786 /* Rolling hash of handshake messages. */ 786 /* Rolling hash of handshake messages. */
787 EVP_MD_CTX *handshake_hash; 787 EVP_MD_CTX *handshake_hash;
@@ -1238,11 +1238,14 @@ int tls1_handshake_hash_value(SSL *s, const unsigned char *out, size_t len,
1238 size_t *outlen); 1238 size_t *outlen);
1239void tls1_handshake_hash_free(SSL *s); 1239void tls1_handshake_hash_free(SSL *s);
1240 1240
1241int tls1_init_finished_mac(SSL *s); 1241int tls1_transcript_init(SSL *s);
1242int tls1_finish_mac(SSL *s, const unsigned char *buf, int len); 1242void tls1_transcript_free(SSL *s);
1243void tls1_free_digest_list(SSL *s); 1243int tls1_transcript_append(SSL *s, const unsigned char *buf, size_t len);
1244int tls1_transcript_data(SSL *s, const unsigned char **data, size_t *len);
1245void tls1_transcript_freeze(SSL *s);
1246int tls1_transcript_record(SSL *s, const unsigned char *buf, size_t len);
1247
1244void tls1_cleanup_key_block(SSL *s); 1248void tls1_cleanup_key_block(SSL *s);
1245int tls1_digest_cached_records(SSL *s);
1246int tls1_change_cipher_state(SSL *s, int which); 1249int tls1_change_cipher_state(SSL *s, int which);
1247int tls1_setup_key_block(SSL *s); 1250int tls1_setup_key_block(SSL *s);
1248int tls1_enc(SSL *s, int snd); 1251int tls1_enc(SSL *s, int snd);