summaryrefslogtreecommitdiffstats
path: root/apps/rehash.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2018-04-25 19:59:36 +0200
committerRichard Levitte <levitte@openssl.org>2018-04-25 19:59:36 +0200
commite6a833cb97ed762408b57ea3efa83bd10c1d2a78 (patch)
treeb7c4fb2127c9a4ec8f70c9da4c6f21c7068e7589 /apps/rehash.c
parent3625f6c977beccd7bb0d80a1a670c19f4338a27a (diff)
openssl rehash: exit 0 on warnings, same as c_rehash
Fixes #6083 Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> (Merged from https://github.com/openssl/openssl/pull/6084)
Diffstat (limited to 'apps/rehash.c')
-rw-r--r--apps/rehash.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/apps/rehash.c b/apps/rehash.c
index 2b6167f1de..521bf6175e 100644
--- a/apps/rehash.c
+++ b/apps/rehash.c
@@ -126,9 +126,10 @@ static int add_entry(enum Type type, unsigned int hash, const char *filename,
for (ep = bp->first_entry; ep; ep = ep->next) {
if (digest && memcmp(digest, ep->digest, evpmdsize) == 0) {
BIO_printf(bio_err,
- "%s: skipping duplicate %s in %s\n", opt_getprog(),
+ "%s: warning: skipping duplicate %s in %s\n",
+ opt_getprog(),
type == TYPE_CERT ? "certificate" : "CRL", filename);
- return 1;
+ return 0;
}
if (strcmp(filename, ep->filename) == 0) {
found = ep;
@@ -140,7 +141,7 @@ static int add_entry(enum Type type, unsigned int hash, const char *filename,
if (ep == NULL) {
if (bp->num_needed >= MAX_COLLISIONS) {
BIO_printf(bio_err,
- "%s: hash table overflow for %s\n",
+ "%s: error: hash table overflow for %s\n",
opt_getprog(), filename);
return 1;
}
@@ -231,7 +232,7 @@ static int do_file(const char *filename, const char *fullpath, enum Hash h)
/* Does it have X.509 data in it? */
if ((b = BIO_new_file(fullpath, "r")) == NULL) {
- BIO_printf(bio_err, "%s: skipping %s, cannot open file\n",
+ BIO_printf(bio_err, "%s: error: skipping %s, cannot open file\n",
opt_getprog(), filename);
errs++;
goto end;
@@ -243,7 +244,7 @@ static int do_file(const char *filename, const char *fullpath, enum Hash h)
if (sk_X509_INFO_num(inf) != 1) {
BIO_printf(bio_err,
- "%s: skipping %s,"
+ "%s: warning: skipping %s,"
"it does not contain exactly one certificate or CRL\n",
opt_getprog(), filename);
/* This is not an error. */