mirror of
https://github.com/curl/curl.git
synced 2026-07-31 09:08:03 +03:00
keylog: move some constants to header file
This allows TLS implementations to use the constants for defining sizes and verification.
This commit is contained in:
parent
6fa31a3043
commit
9ad2d8c557
2 changed files with 11 additions and 12 deletions
|
|
@ -36,18 +36,6 @@
|
|||
#include "curl_memory.h"
|
||||
#include "memdebug.h"
|
||||
|
||||
#define KEYLOG_LABEL_MAXLEN (sizeof("CLIENT_HANDSHAKE_TRAFFIC_SECRET") - 1)
|
||||
|
||||
#define CLIENT_RANDOM_SIZE 32
|
||||
|
||||
/*
|
||||
* The master secret in TLS 1.2 and before is always 48 bytes. In TLS 1.3, the
|
||||
* secret size depends on the cipher suite's hash function which is 32 bytes
|
||||
* for SHA-256 and 48 bytes for SHA-384.
|
||||
*/
|
||||
#define SECRET_MAXLEN 48
|
||||
|
||||
|
||||
/* The fp for the open SSLKEYLOGFILE, or NULL if not open */
|
||||
static FILE *keylog_file_fp;
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,17 @@
|
|||
***************************************************************************/
|
||||
#include "curl_setup.h"
|
||||
|
||||
#define KEYLOG_LABEL_MAXLEN (sizeof("CLIENT_HANDSHAKE_TRAFFIC_SECRET") - 1)
|
||||
|
||||
#define CLIENT_RANDOM_SIZE 32
|
||||
|
||||
/*
|
||||
* The master secret in TLS 1.2 and before is always 48 bytes. In TLS 1.3, the
|
||||
* secret size depends on the cipher suite's hash function which is 32 bytes
|
||||
* for SHA-256 and 48 bytes for SHA-384.
|
||||
*/
|
||||
#define SECRET_MAXLEN 48
|
||||
|
||||
/*
|
||||
* Opens the TLS key log file if requested by the user. The SSLKEYLOGFILE
|
||||
* environment variable specifies the output file.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue