diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libtls/tls_conninfo.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/lib/libtls/tls_conninfo.c b/src/lib/libtls/tls_conninfo.c index 8e479ed84c..d44dc842b6 100644 --- a/src/lib/libtls/tls_conninfo.c +++ b/src/lib/libtls/tls_conninfo.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: tls_conninfo.c,v 1.20 2018/02/10 04:48:44 jsing Exp $ */ | 1 | /* $OpenBSD: tls_conninfo.c,v 1.21 2019/11/02 13:37:59 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2015 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2015 Joel Sing <jsing@openbsd.org> |
| 4 | * Copyright (c) 2015 Bob Beck <beck@openbsd.org> | 4 | * Copyright (c) 2015 Bob Beck <beck@openbsd.org> |
| @@ -246,6 +246,7 @@ tls_conninfo_populate(struct tls *ctx) | |||
| 246 | goto err; | 246 | goto err; |
| 247 | if ((ctx->conninfo->cipher = strdup(tmp)) == NULL) | 247 | if ((ctx->conninfo->cipher = strdup(tmp)) == NULL) |
| 248 | goto err; | 248 | goto err; |
| 249 | ctx->conninfo->cipher_strength = SSL_get_cipher_bits(ctx->ssl_conn, NULL); | ||
| 249 | 250 | ||
| 250 | if (ctx->servername != NULL) { | 251 | if (ctx->servername != NULL) { |
| 251 | if ((ctx->conninfo->servername = | 252 | if ((ctx->conninfo->servername = |
| @@ -312,6 +313,14 @@ tls_conn_cipher(struct tls *ctx) | |||
| 312 | return (ctx->conninfo->cipher); | 313 | return (ctx->conninfo->cipher); |
| 313 | } | 314 | } |
| 314 | 315 | ||
| 316 | int | ||
| 317 | tls_conn_cipher_strength(struct tls *ctx) | ||
| 318 | { | ||
| 319 | if (ctx->conninfo == NULL) | ||
| 320 | return (0); | ||
| 321 | return (ctx->conninfo->cipher_strength); | ||
| 322 | } | ||
| 323 | |||
| 315 | const char * | 324 | const char * |
| 316 | tls_conn_servername(struct tls *ctx) | 325 | tls_conn_servername(struct tls *ctx) |
| 317 | { | 326 | { |
