diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libtls/tls_peer.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/lib/libtls/tls_peer.c b/src/lib/libtls/tls_peer.c index 8a74613ef8..802a9c2780 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.5 2015/10/07 23:33:38 beck Exp $ */ | 1 | /* $OpenBSD: tls_peer.c,v 1.6 2016/08/22 17:08:10 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> |
@@ -26,24 +26,24 @@ | |||
26 | const char * | 26 | const char * |
27 | tls_peer_cert_hash(struct tls *ctx) | 27 | tls_peer_cert_hash(struct tls *ctx) |
28 | { | 28 | { |
29 | if (ctx->conninfo) | 29 | if (ctx->conninfo == NULL) |
30 | return (ctx->conninfo->hash); | 30 | return (NULL); |
31 | return NULL; | 31 | return (ctx->conninfo->hash); |
32 | } | 32 | } |
33 | const char * | 33 | const char * |
34 | tls_peer_cert_issuer(struct tls *ctx) | 34 | tls_peer_cert_issuer(struct tls *ctx) |
35 | { | 35 | { |
36 | if (ctx->conninfo) | 36 | if (ctx->conninfo == NULL) |
37 | return (ctx->conninfo->issuer); | 37 | return (NULL); |
38 | return NULL; | 38 | return (ctx->conninfo->issuer); |
39 | } | 39 | } |
40 | 40 | ||
41 | const char * | 41 | const char * |
42 | tls_peer_cert_subject(struct tls *ctx) | 42 | tls_peer_cert_subject(struct tls *ctx) |
43 | { | 43 | { |
44 | if (ctx->conninfo) | 44 | if (ctx->conninfo == NULL) |
45 | return (ctx->conninfo->subject); | 45 | return (NULL); |
46 | return NULL; | 46 | return (ctx->conninfo->subject); |
47 | } | 47 | } |
48 | 48 | ||
49 | int | 49 | int |