diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2019-08-13 13:27:27 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2019-08-13 13:27:27 +0000 |
commit | 2c3cf6484fcb5faecc83185f5c6d8609f4439b08 (patch) | |
tree | ea816e61c35712c658d94a3efe95d7f6c32252a5 /usr.sbin/rpki-client/cert.c | |
parent | a748a0a28f4d1ca4c081f5fdb33f797d70c5bea2 (diff) |
Show the most common warnings only if verbose is set. Most of these warnings
were shown because of an inconsistent rpki database and is no real problem.
OK florian@
Diffstat (limited to 'usr.sbin/rpki-client/cert.c')
-rw-r--r-- | usr.sbin/rpki-client/cert.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.sbin/rpki-client/cert.c b/usr.sbin/rpki-client/cert.c index 9db30d4c969..2e17694bfd3 100644 --- a/usr.sbin/rpki-client/cert.c +++ b/usr.sbin/rpki-client/cert.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cert.c,v 1.6 2019/06/20 13:50:03 claudio Exp $ */ +/* $OpenBSD: cert.c,v 1.7 2019/08/13 13:27:26 claudio Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -1109,7 +1109,8 @@ cert_parse_inner(X509 **xp, const char *fn, const unsigned char *dgst, int ta) *xp = NULL; if ((bio = BIO_new_file(fn, "rb")) == NULL) { - cryptowarnx("%s: BIO_new_file", fn); + if (verbose > 0) + cryptowarnx("%s: BIO_new_file", fn); return NULL; } @@ -1155,7 +1156,8 @@ cert_parse_inner(X509 **xp, const char *fn, const unsigned char *dgst, int ta) assert(sz == SHA256_DIGEST_LENGTH); if (memcmp(mdbuf, dgst, SHA256_DIGEST_LENGTH)) { - warnx("%s: bad message digest", p.fn); + if (verbose > 0) + warnx("%s: bad message digest", p.fn); goto out; } } |