From e91b0cac6a0747a3d5ebd034e1bc0551c9c82b6b Mon Sep 17 00:00:00 2001 From: tb Date: Tue, 28 Jun 2022 20:34:17 +0000 Subject: [PATCH] Implement SSL_{CTX_}_{g,s}et_security_level(3) ok beck jsing sthen --- lib/libssl/ssl_lib.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/lib/libssl/ssl_lib.c b/lib/libssl/ssl_lib.c index 6adc28a5e34..2bbc8e54d0c 100644 --- a/lib/libssl/ssl_lib.c +++ b/lib/libssl/ssl_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_lib.c,v 1.290 2022/03/18 18:01:17 jsing Exp $ */ +/* $OpenBSD: ssl_lib.c,v 1.291 2022/06/28 20:34:17 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -3271,6 +3271,30 @@ SSL_CTX_get_ssl_method(const SSL_CTX *ctx) return ctx->method; } +int +SSL_CTX_get_security_level(const SSL_CTX *ctx) +{ + return ctx->internal->cert->security_level; +} + +void +SSL_CTX_set_security_level(SSL_CTX *ctx, int level) +{ + ctx->internal->cert->security_level = level; +} + +int +SSL_get_security_level(const SSL *ssl) +{ + return ssl->cert->security_level; +} + +void +SSL_set_security_level(SSL *ssl, int level) +{ + ssl->cert->security_level = level; +} + static int ssl_cipher_id_cmp_BSEARCH_CMP_FN(const void *a_, const void *b_) { -- 2.20.1