From 368b501095ffe62862d468562cfaf9d1012ca99c Mon Sep 17 00:00:00 2001 From: jsing <> Date: Fri, 11 Sep 2015 11:28:01 +0000 Subject: Provide tls_peer_cert_hash() which returns a hash of the raw certificate that was presented by the peer. The hash used is currently SHA256, however since we prefix the result with the hash name, we can change this in the future as the need arises. The same output can be generated by using: h=$(openssl x509 -outform der -in mycert.crt | sha256) printf "SHA256:${h}\n" ok beck@ --- src/lib/libtls/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/lib/libtls/Makefile') diff --git a/src/lib/libtls/Makefile b/src/lib/libtls/Makefile index 4b6b34c283..0e3329589e 100644 --- a/src/lib/libtls/Makefile +++ b/src/lib/libtls/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.14 2015/09/11 07:07:23 jmc Exp $ +# $OpenBSD: Makefile,v 1.15 2015/09/11 11:28:01 jsing Exp $ CFLAGS+= -Wall -Werror -Wimplicit CFLAGS+= -DLIBRESSL_INTERNAL @@ -15,6 +15,7 @@ HDRS= tls.h SRCS= tls.c \ tls_client.c \ tls_config.c \ + tls_peer.c \ tls_server.c \ tls_util.c \ tls_verify.c -- cgit v1.2.3-55-g6feb