From 99847161a75bd94bdf99fa2ca33bdf6be5cdda7f Mon Sep 17 00:00:00 2001 From: tb Date: Tue, 22 Feb 2022 12:36:17 +0000 Subject: [PATCH] acme-client: only warn on PEM_write_ECPrivateKey() failure instead of everytime ec_create_key() is called. From wolf at wolfsden dot cz ok florian --- usr.sbin/acme-client/key.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/usr.sbin/acme-client/key.c b/usr.sbin/acme-client/key.c index 6604751caef..c75a3b7e2ca 100644 --- a/usr.sbin/acme-client/key.c +++ b/usr.sbin/acme-client/key.c @@ -1,4 +1,4 @@ -/* $Id: key.c,v 1.3 2021/11/18 17:26:43 tb Exp $ */ +/* $Id: key.c,v 1.4 2022/02/22 12:36:17 tb Exp $ */ /* * Copyright (c) 2019 Renaud Allard * Copyright (c) 2016 Kristaps Dzonsons @@ -98,7 +98,7 @@ ec_key_create(FILE *f, const char *fname) /* Serialise the key to the disc in EC format */ if (!PEM_write_ECPrivateKey(f, eckey, NULL, NULL, 0, NULL, NULL)) { - warnx("PEM_write_ECPrivateKey"); + warnx("%s: PEM_write_ECPrivateKey", fname); goto err; } @@ -113,8 +113,6 @@ ec_key_create(FILE *f, const char *fname) goto err; } - warnx("%s: PEM_write_ECPrivateKey", fname); - goto out; err: -- 2.20.1