diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-11-05 18:15:47 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-11-05 18:15:47 +0000 |
commit | 22c31d91ab5766db23f65a28d01009f594095901 (patch) | |
tree | bcc29f5834eed5e146939bacbb1be0f154dc92b0 /src/common/tortls.h | |
parent | e94fad36aceece917b65a9558b2f1156c0dba3ea (diff) | |
download | tor-22c31d91ab5766db23f65a28d01009f594095901.tar.gz tor-22c31d91ab5766db23f65a28d01009f594095901.zip |
r16410@catbus: nickm | 2007-11-05 10:54:29 -0500
Code to remember client_random and server_random values, and to compute hmac using TLS master secret.
svn:r12381
Diffstat (limited to 'src/common/tortls.h')
-rw-r--r-- | src/common/tortls.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/common/tortls.h b/src/common/tortls.h index 89cbe3be58..eac337b921 100644 --- a/src/common/tortls.h +++ b/src/common/tortls.h @@ -41,6 +41,9 @@ typedef struct tor_tls_t tor_tls_t; case TOR_TLS_ERROR_NO_ROUTE: \ case TOR_TLS_ERROR_TIMEOUT +/**DOCDOC*/ +#define TOR_TLS_RANDOM_LEN 32 + #define TOR_TLS_IS_ERROR(rv) ((rv) < TOR_TLS_CLOSE) void tor_tls_free_all(void); @@ -65,6 +68,10 @@ void tor_tls_get_n_raw_bytes(tor_tls_t *tls, size_t *n_read, size_t *n_written); int tor_tls_used_v1_handshake(tor_tls_t *tls); +int tor_tls_get_random_values(tor_tls_t *tls, char *client_random_out, + char *server_random_out); +int tor_tls_hmac_with_master_secret(tor_tls_t *tls, char *hmac_out, + const char *data, size_t data_len); /* Log and abort if there are unhandled TLS errors in OpenSSL's error stack. */ |