From 7ca355bcb2eb86379c78cee41d854a85ccc69c9e Mon Sep 17 00:00:00 2001 From: tb Date: Tue, 28 Jun 2022 20:44:49 +0000 Subject: [PATCH] Implement ssl{,_ctx}_security() ok beck jsing sthen --- lib/libssl/ssl_seclevel.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/lib/libssl/ssl_seclevel.c b/lib/libssl/ssl_seclevel.c index 3da78c65b79..d86d38ebc89 100644 --- a/lib/libssl/ssl_seclevel.c +++ b/lib/libssl/ssl_seclevel.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_seclevel.c,v 1.1 2022/06/28 20:40:24 tb Exp $ */ +/* $OpenBSD: ssl_seclevel.c,v 1.2 2022/06/28 20:44:49 tb Exp $ */ /* * Copyright (c) 2020 Theo Buehler * @@ -192,3 +192,17 @@ ssl_security_dummy_cb(const SSL *ssl, const SSL_CTX *ctx, int op, int bits, { return 1; } + +int +ssl_ctx_security(const SSL_CTX *ctx, int op, int bits, int nid, void *other) +{ + return ctx->internal->cert->security_cb(NULL, ctx, op, bits, nid, other, + ctx->internal->cert->security_ex_data); +} + +int +ssl_security(const SSL *ssl, int op, int bits, int nid, void *other) +{ + return ssl->cert->security_cb(ssl, NULL, op, bits, nid, other, + ssl->cert->security_ex_data); +} -- 2.20.1