diff options
author | jsing <> | 2018-02-08 10:19:31 +0000 |
---|---|---|
committer | jsing <> | 2018-02-08 10:19:31 +0000 |
commit | ba784f0df690dc69577e1ee14a448cda91b89262 (patch) | |
tree | fbaa7b6f7b55a0e6130366b9d6bb63fa8074d471 /src/lib/libtls/tls.c | |
parent | 939cef15b79268da075126b9cf88c8578d0ad48c (diff) | |
download | openbsd-ba784f0df690dc69577e1ee14a448cda91b89262.tar.gz openbsd-ba784f0df690dc69577e1ee14a448cda91b89262.tar.bz2 openbsd-ba784f0df690dc69577e1ee14a448cda91b89262.zip |
Have tls_keypair_pubkey_hash() call tls_keypair_load_cert() instead of
rolling its own certificate loading. This also means we get better error
reporting on failure.
Diffstat (limited to 'src/lib/libtls/tls.c')
-rw-r--r-- | src/lib/libtls/tls.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/libtls/tls.c b/src/lib/libtls/tls.c index fdf4a981a8..0e206e2c7e 100644 --- a/src/lib/libtls/tls.c +++ b/src/lib/libtls/tls.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tls.c,v 1.73 2018/02/08 08:09:10 jsing Exp $ */ | 1 | /* $OpenBSD: tls.c,v 1.74 2018/02/08 10:19:31 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -313,7 +313,8 @@ tls_configure_ssl_keypair(struct tls *ctx, SSL_CTX *ssl_ctx, | |||
313 | tls_set_errorx(ctx, "failed to load certificate"); | 313 | tls_set_errorx(ctx, "failed to load certificate"); |
314 | goto err; | 314 | goto err; |
315 | } | 315 | } |
316 | if (tls_keypair_pubkey_hash(keypair, &keypair->pubkey_hash) == -1) | 316 | if (tls_keypair_pubkey_hash(keypair, &ctx->error, |
317 | &keypair->pubkey_hash) == -1) | ||
317 | goto err; | 318 | goto err; |
318 | } | 319 | } |
319 | 320 | ||