diff options
Diffstat (limited to 'src/lib/libtls/tls_peer.c')
| -rw-r--r-- | src/lib/libtls/tls_peer.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/lib/libtls/tls_peer.c b/src/lib/libtls/tls_peer.c index ec97a30838..6d63a529f2 100644 --- a/src/lib/libtls/tls_peer.c +++ b/src/lib/libtls/tls_peer.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: tls_peer.c,v 1.8 2017/04/10 17:11:13 jsing Exp $ */ | 1 | /* $OpenBSD: tls_peer.c,v 1.9 2024/12/10 08:40:30 tb 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> |
| @@ -24,6 +24,14 @@ | |||
| 24 | #include "tls_internal.h" | 24 | #include "tls_internal.h" |
| 25 | 25 | ||
| 26 | const char * | 26 | const char * |
| 27 | tls_peer_cert_common_name(struct tls *ctx) | ||
| 28 | { | ||
| 29 | if (ctx->conninfo == NULL) | ||
| 30 | return (NULL); | ||
| 31 | return (ctx->conninfo->common_name); | ||
| 32 | } | ||
| 33 | |||
| 34 | const char * | ||
| 27 | tls_peer_cert_hash(struct tls *ctx) | 35 | tls_peer_cert_hash(struct tls *ctx) |
| 28 | { | 36 | { |
| 29 | if (ctx->conninfo == NULL) | 37 | if (ctx->conninfo == NULL) |
