+67
-4
lines changedFilter options
+67
-4
lines changed Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
1
-
# $OpenBSD: Makefile,v 1.73 2021/09/14 14:30:57 schwarze Exp $
1
+
# $OpenBSD: Makefile,v 1.74 2021/10/23 11:41:52 beck Exp $
2
2
3
3
.include <bsd.own.mk>
4
4
@@ -32,6 +32,7 @@ MAN = BIO_f_ssl.3 \
32
32
SSL_CTX_set_default_passwd_cb.3 \
33
33
SSL_CTX_set_generate_session_id.3 \
34
34
SSL_CTX_set_info_callback.3 \
35
+
SSL_CTX_set_keylog_callback.3 \
35
36
SSL_CTX_set_max_cert_list.3 \
36
37
SSL_CTX_set_min_proto_version.3 \
37
38
SSL_CTX_set_mode.3 \
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
1
+
.\" $OpenBSD: SSL_CTX_set_keylog_callback.3,v 1.1 2021/10/23 11:41:52 beck Exp $
2
+
.\" Copyright (c) 2021, Bob Beck <beck@openbsd.org>
3
+
.\"
4
+
.\" Permission to use, copy, modify, and distribute this software for any
5
+
.\" purpose with or without fee is hereby granted, provided that the above
6
+
.\" copyright notice and this permission notice appear in all copies.
7
+
.\"
8
+
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9
+
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10
+
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11
+
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12
+
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13
+
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14
+
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15
+
.\"
16
+
.Dd $Mdocdate: October 23 2021 $
17
+
.Dt SSL_CTX_SET_KEYLOG_CALLBACK 3
18
+
.Os
19
+
.Sh NAME
20
+
.Nm SSL_CTX_set_keylog_callback ,
21
+
.Nm SSL_CTX_get_keylog_callback
22
+
.Nd set and get the unused key logging callback
23
+
.Sh SYNOPSIS
24
+
.In openssl/ssl.h
25
+
.Bd -literal
26
+
typedef void (*SSL_CTX_keylog_cb_func)(const SSL *ssl, const char *line)
27
+
.Ed
28
+
.Ft void
29
+
.Fn SSL_CTX_set_keylog_callback "SSL_CTX *ctx" "SSL_CTX_keylog_cb_func cb"
30
+
.Ft SSL_CTX_keylog_cb_func
31
+
.Fn SSL_CTX_get_keylog_callback "const SSL_CTX *ctx"
32
+
.Sh DESCRIPTION
33
+
.Fn SSL_CTX_set_keylog_callback
34
+
sets the TLS key logging callback.
35
+
This callback is never called in LibreSSL.
36
+
.Pp
37
+
.Fn SSL_CTX_set_keylog_callback
38
+
retrieves the previously set TLS key logging callback.
39
+
.Pp
40
+
These functions are provided only for compatibility with OpenSSL.
41
+
.Sh RETURN VALUES
42
+
.Fn SSL_CTX_get_keylog_callback
43
+
returns the previously set TLS key logging callback, or NULL
44
+
if no callback has been set.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
1
-
/* $OpenBSD: ssl.h,v 1.210 2021/10/15 16:48:46 jsing Exp $ */
1
+
/* $OpenBSD: ssl.h,v 1.211 2021/10/23 11:41:51 beck Exp $ */
2
2
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3
3
* All rights reserved.
4
4
*
@@ -505,6 +505,11 @@ void SSL_set_msg_callback(SSL *ssl, void (*cb)(int write_p, int version,
505
505
int content_type, const void *buf, size_t len, SSL *ssl, void *arg));
506
506
#define SSL_CTX_set_msg_callback_arg(ctx, arg) SSL_CTX_ctrl((ctx), SSL_CTRL_SET_MSG_CALLBACK_ARG, 0, (arg))
507
507
#define SSL_set_msg_callback_arg(ssl, arg) SSL_ctrl((ssl), SSL_CTRL_SET_MSG_CALLBACK_ARG, 0, (arg))
508
+
typedef void (*SSL_CTX_keylog_cb_func)(const SSL *ssl, const char *line);
509
+
#if defined(LIBRESSL_NEW_API)
510
+
void SSL_CTX_set_keylog_callback(SSL_CTX *ctx, SSL_CTX_keylog_cb_func cb);
511
+
SSL_CTX_keylog_cb_func SSL_CTX_get_keylog_callback(const SSL_CTX *ctx);
512
+
#endif
508
513
509
514
#ifndef LIBRESSL_INTERNAL
510
515
struct ssl_aead_ctx_st;
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
1
-
/* $OpenBSD: ssl_lib.c,v 1.268 2021/09/10 08:59:56 tb Exp $ */
1
+
/* $OpenBSD: ssl_lib.c,v 1.269 2021/10/23 11:41:52 beck Exp $ */
2
2
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3
3
* All rights reserved.
4
4
*
@@ -770,6 +770,18 @@ int
770
770
return (s->internal->verify_callback);
771
771
}
772
772
773
+
void
774
+
SSL_CTX_set_keylog_callback(SSL_CTX *ctx, SSL_CTX_keylog_cb_func cb)
775
+
{
776
+
ctx->internal->keylog_callback = cb;
777
+
}
778
+
779
+
SSL_CTX_keylog_cb_func
780
+
SSL_CTX_get_keylog_callback(const SSL_CTX *ctx)
781
+
{
782
+
return (ctx->internal->keylog_callback);
783
+
}
784
+
773
785
int
774
786
SSL_CTX_get_verify_mode(const SSL_CTX *ctx)
775
787
{
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
1
-
/* $OpenBSD: ssl_locl.h,v 1.361 2021/10/23 08:34:36 jsing Exp $ */
1
+
/* $OpenBSD: ssl_locl.h,v 1.362 2021/10/23 11:41:52 beck Exp $ */
2
2
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3
3
* All rights reserved.
4
4
*
@@ -843,6 +843,7 @@ typedef struct ssl_ctx_internal_st {
843
843
uint8_t *tlsext_ecpointformatlist; /* our list */
844
844
size_t tlsext_supportedgroups_length;
845
845
uint16_t *tlsext_supportedgroups; /* our list */
846
+
SSL_CTX_keylog_cb_func keylog_callback; /* Unused. For OpenSSL compatibility. */
846
847
} SSL_CTX_INTERNAL;
847
848
848
849
struct ssl_ctx_st {
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4