From b603840066e66177580e3511e3359282bb9fe3ba Mon Sep 17 00:00:00 2001 From: Klas Lindfors Date: Sat, 8 Feb 2014 21:18:33 +0100 Subject: [PATCH] make sure to set ret to false before goto --- yubico-piv-tool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yubico-piv-tool.c b/yubico-piv-tool.c index 29c0ab0..20e06e8 100644 --- a/yubico-piv-tool.c +++ b/yubico-piv-tool.c @@ -676,15 +676,15 @@ static bool import_cert(SCARDHANDLE *card, enum enum_key_format cert_format, cert = PEM_read_X509(input_file, NULL, NULL, password); if(!cert) { fprintf(stderr, "Failed loading certificate for import.\n"); - goto import_cert_out; ret = false; + goto import_cert_out; } } else if(cert_format == key_format_arg_PKCS12) { p12 = d2i_PKCS12_fp(input_file, NULL); if(!p12) { fprintf(stderr, "Failed to load PKCS12 from file.\n"); - goto import_cert_out; ret = false; + goto import_cert_out; } if(!PKCS12_parse(p12, password, &private_key, &cert, NULL)) { fprintf(stderr, "Failed to parse PKCS12 structure.\n");