summaryrefslogtreecommitdiffstats
path: root/lib/vtls/keylog.h
diff options
context:
space:
mode:
authorCurl Upstream <curl-library@cool.haxx.se>2020-06-23 21:41:50 (GMT)
committerBrad King <brad.king@kitware.com>2020-06-24 11:55:09 (GMT)
commit5717fdc114a704cddae629e20e6588191360e98a (patch)
tree36545299412c5cafb4d3e3eb464598af465ea4c8 /lib/vtls/keylog.h
parent735ea3001ae98636a4cb7caf15a40960c0da39a1 (diff)
downloadCMake-5717fdc114a704cddae629e20e6588191360e98a.zip
CMake-5717fdc114a704cddae629e20e6588191360e98a.tar.gz
CMake-5717fdc114a704cddae629e20e6588191360e98a.tar.bz2
curl 2020-06-23 (e9db32a0)
Code extracted from: https://github.com/curl/curl.git at commit e9db32a09af03f27e86d1251a9e68e9b7486d371 (curl-7_71_0).
Diffstat (limited to 'lib/vtls/keylog.h')
-rw-r--r--lib/vtls/keylog.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/lib/vtls/keylog.h b/lib/vtls/keylog.h
new file mode 100644
index 0000000..c6b99db
--- /dev/null
+++ b/lib/vtls/keylog.h
@@ -0,0 +1,56 @@
+#ifndef HEADER_CURL_KEYLOG_H
+#define HEADER_CURL_KEYLOG_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+#include "curl_setup.h"
+
+/*
+ * Opens the TLS key log file if requested by the user. The SSLKEYLOGFILE
+ * environment variable specifies the output file.
+ */
+void Curl_tls_keylog_open(void);
+
+/*
+ * Closes the TLS key log file if not already.
+ */
+void Curl_tls_keylog_close(void);
+
+/*
+ * Returns true if the user successfully enabled the TLS key log file.
+ */
+bool Curl_tls_keylog_enabled(void);
+
+/*
+ * Appends a key log file entry.
+ * Returns true iff the key log file is open and a valid entry was provided.
+ */
+bool Curl_tls_keylog_write(const char *label,
+ const unsigned char client_random[32],
+ const unsigned char *secret, size_t secretlen);
+
+/*
+ * Appends a line to the key log file, ensure it is terminated by a LF.
+ * Returns true iff the key log file is open and a valid line was provided.
+ */
+bool Curl_tls_keylog_write_line(const char *line);
+
+#endif /* HEADER_CURL_KEYLOG_H */