diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2018-02-08 10:19:32 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2018-02-08 10:19:32 +0000 |
commit | ad3ea31d0ace632c67eb58e46dec0caa7d583275 (patch) | |
tree | 78d0b71da970414567687d46bfa345542fd8b093 /lib/libtls/tls.c | |
parent | 80ef9e8331b6bea4fe0ef725e8383b2bf746afad (diff) |
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 'lib/libtls/tls.c')
-rw-r--r-- | lib/libtls/tls.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libtls/tls.c b/lib/libtls/tls.c index fdf4a981a86..0e206e2c7ef 100644 --- a/lib/libtls/tls.c +++ b/lib/libtls/tls.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls.c,v 1.73 2018/02/08 08:09:10 jsing Exp $ */ +/* $OpenBSD: tls.c,v 1.74 2018/02/08 10:19:31 jsing Exp $ */ /* * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> * @@ -313,7 +313,8 @@ tls_configure_ssl_keypair(struct tls *ctx, SSL_CTX *ssl_ctx, tls_set_errorx(ctx, "failed to load certificate"); goto err; } - if (tls_keypair_pubkey_hash(keypair, &keypair->pubkey_hash) == -1) + if (tls_keypair_pubkey_hash(keypair, &ctx->error, + &keypair->pubkey_hash) == -1) goto err; } |