Add SSL_CTX_get_keylog_callback. Conscrypt would like to write a CTS test that the callback isn't set unexpectedly. Change-Id: I11f987422daf0544e90f5cff4d7aaf557ac1f5a2 Reviewed-on: https://boringssl-review.googlesource.com/11060 Reviewed-by: Kenny Root <kroot@google.com> Reviewed-by: David Benjamin <davidben@google.com> Commit-Queue: David Benjamin <davidben@google.com> CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index 04a1411..0978d75 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c
@@ -2524,6 +2524,11 @@ ctx->keylog_callback = cb; } +void (*SSL_CTX_get_keylog_callback(const SSL_CTX *ctx))(const SSL *ssl, + const char *line) { + return ctx->keylog_callback; +} + void SSL_CTX_set_current_time_cb(SSL_CTX *ctx, void (*cb)(const SSL *ssl, struct timeval *out_clock)) {