diff options
author | Bob Beck <beck@cvs.openbsd.org> | 2015-09-11 12:56:56 +0000 |
---|---|---|
committer | Bob Beck <beck@cvs.openbsd.org> | 2015-09-11 12:56:56 +0000 |
commit | 6990a7b7f6abe52a22744115d7997453d2736d2e (patch) | |
tree | 9aa2257e13c62db82cc59559c42af39bc63e7554 /lib/libtls/tls.h | |
parent | fe3d4dc9932d704863e1d6a2a61a71b5a8cc915b (diff) |
add tls_peer functions for checking names and issuers of peer certificates.
ok jsing@
Diffstat (limited to 'lib/libtls/tls.h')
-rw-r--r-- | lib/libtls/tls.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/libtls/tls.h b/lib/libtls/tls.h index 3cb24f0ee58..3d1682e2b67 100644 --- a/lib/libtls/tls.h +++ b/lib/libtls/tls.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tls.h,v 1.19 2015/09/11 11:28:01 jsing Exp $ */ +/* $OpenBSD: tls.h,v 1.20 2015/09/11 12:56:55 beck Exp $ */ /* * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> * @@ -76,6 +76,11 @@ void tls_config_verify(struct tls_config *_config); void tls_config_verify_client(struct tls_config *_config); void tls_config_verify_client_optional(struct tls_config *_config); +int tls_peer_cert_provided(struct tls *ctx); +int tls_peer_cert_contains_name(struct tls *ctx, const char *name); +int tls_peer_cert_issuer(struct tls *ctx, char **name); +int tls_peer_cert_subject(struct tls *ctx, char **subject); + void tls_config_clear_keys(struct tls_config *_config); int tls_config_parse_protocols(uint32_t *_protocols, const char *_protostr); |