From df159794178eaab75bdfe6f692e876f2da10c396 Mon Sep 17 00:00:00 2001 From: bcook <> Date: Sun, 7 Dec 2014 16:56:17 +0000 Subject: Allow specific libtls hostname validation errors to propagate. Remove direct calls to printf from the tls_check_hostname() path. This allows NUL byte error messages to bubble up to the caller, to be logged in a program-appropriate way. It also removes non-portable calls to getprogname(). ok jsing@ --- src/lib/libtls/tls_internal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib/libtls/tls_internal.h') diff --git a/src/lib/libtls/tls_internal.h b/src/lib/libtls/tls_internal.h index a23e63f7af..bfd7146d7d 100644 --- a/src/lib/libtls/tls_internal.h +++ b/src/lib/libtls/tls_internal.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tls_internal.h,v 1.3 2014/12/07 15:48:02 bcook Exp $ */ +/* $OpenBSD: tls_internal.h,v 1.4 2014/12/07 16:56:17 bcook Exp $ */ /* * Copyright (c) 2014 Jeremie Courreges-Anglas * Copyright (c) 2014 Joel Sing @@ -62,7 +62,7 @@ struct tls { struct tls *tls_new(void); struct tls *tls_server_conn(struct tls *ctx); -int tls_check_hostname(X509 *cert, const char *host); +int tls_check_hostname(struct tls *ctx, X509 *cert, const char *host); int tls_configure_keypair(struct tls *ctx); int tls_configure_server(struct tls *ctx); int tls_configure_ssl(struct tls *ctx); -- cgit v1.2.3-55-g6feb