summary refs log tree commit diff
path: root/tls_keypair.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2021-04-18 17:54:23 -0400
committerJune McEnroe <june@causal.agency>2021-04-18 17:54:23 -0400
commit3bb2203d08dbddd9356334d350275be577e9fa84 (patch)
treedfc4bf1648d4e0e4d3161267235b1b392e832228 /tls_keypair.c
parentBump version to 3.3.1p1 (diff)
parentImport LibreSSL 3.3.2 (diff)
downloadlibretls-3bb2203d08dbddd9356334d350275be577e9fa84.tar.gz
libretls-3bb2203d08dbddd9356334d350275be577e9fa84.zip
Merge LibreSSL 3.3.2 into master
Diffstat (limited to '')
-rw-r--r--tls_keypair.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tls_keypair.c b/tls_keypair.c
index a98e5c2..a12d21d 100644
--- a/tls_keypair.c
+++ b/tls_keypair.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tls_keypair.c,v 1.6 2018/04/07 16:35:34 jsing Exp $ */
+/* $OpenBSD: tls_keypair.c,v 1.8 2021/01/05 17:37:12 jsing Exp $ */
 /*
  * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
  *
@@ -137,7 +137,7 @@ tls_keypair_load_cert(struct tls_keypair *keypair, struct tls_error *error,
 {
 	char *errstr = "unknown";
 	BIO *cert_bio = NULL;
-	int ssl_err;
+	unsigned long ssl_err;
 	int rv = -1;
 
 	X509_free(*cert);
@@ -155,7 +155,7 @@ tls_keypair_load_cert(struct tls_keypair *keypair, struct tls_error *error,
 	if ((*cert = PEM_read_bio_X509(cert_bio, NULL, tls_password_cb,
 	    NULL)) == NULL) {
 		if ((ssl_err = ERR_peek_error()) != 0)
-		    errstr = ERR_error_string(ssl_err, NULL);
+			errstr = ERR_error_string(ssl_err, NULL);
 		tls_error_set(error, "failed to load certificate: %s", errstr);
 		goto err;
 	}