Skip to content
This repository was archived by the owner on Oct 25, 2022. It is now read-only.

expose getNegotiatedVersion #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion token_bind_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ static void setNegotiatedVersion(SSL* ssl, uint8_t major_version,
/* getNegotiatedVersion retrieves the negotiated major and minor version from
|ssl|. The major version number is written to out[0], and and the minor
version number is written to out[1]. */
static void getNegotiatedVersion(SSL* ssl, uint8_t* out) {
void getNegotiatedVersion(SSL* ssl, uint8_t* out) {
uintptr_t version =
(uintptr_t)SSL_get_ex_data(ssl, ssl_ex_data_index_negotiated_version);
out[0] = version;
Expand Down
5 changes: 5 additions & 0 deletions token_bind_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,4 +156,9 @@ bool tbSetPadding(tbKeyType key_type, EVP_PKEY_CTX* key_ctx);
void tbHashTokenBindingID(const uint8_t* tokbind_id, size_t tokbind_id_len,
uint8_t hash_out[TB_HASH_LEN]);

/* getNegotiatedVersion retrieves the negotiated major and minor version from
|ssl|. The major version number is written to out[0], and and the minor
version number is written to out[1]. */
void getNegotiatedVersion(SSL* ssl, uint8_t* out);

#endif /* TOKEN_BIND_CSRC_TOKEN_BIND_COMMON_H_ */