diff options
| author | jsing <> | 2018-02-08 10:19:31 +0000 |
|---|---|---|
| committer | jsing <> | 2018-02-08 10:19:31 +0000 |
| commit | 1f7ca2478ab23918c94907b989d2935db2a2b660 (patch) | |
| tree | fbaa7b6f7b55a0e6130366b9d6bb63fa8074d471 /src/lib/libtls/tls.c | |
| parent | c7ad994cfcd0b5397342480b627e9e39807037f4 (diff) | |
| download | openbsd-1f7ca2478ab23918c94907b989d2935db2a2b660.tar.gz openbsd-1f7ca2478ab23918c94907b989d2935db2a2b660.tar.bz2 openbsd-1f7ca2478ab23918c94907b989d2935db2a2b660.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 '')
| -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 | ||
