summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2022-06-28 20:44:50 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2022-06-28 20:44:50 +0000
commit654ddee2c5461218f6cee2da1f8b17bc86bb24f2 (patch)
treec21e7d7345ffab89ec34d26bb1301f6668014bce /lib
parenteee69984b9935a0a5c252353040b38a785650254 (diff)
Implement ssl{,_ctx}_security()
ok beck jsing sthen
Diffstat (limited to 'lib')
-rw-r--r--lib/libssl/ssl_seclevel.c16
1 files changed, 15 insertions, 1 deletions
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 <tb@openbsd.org>
*
@@ -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);
+}