apps/crl: Print just the hash value if printing just hash
This partially reverts the output format change for
openssl crl -hash output.
Fixes
@@ -308,14 +308,18 @@ int crl_main(int argc, char **argv)
X509_NAME_hash_ex(X509_CRL_get_issuer(x), app_get0_libctx(),
app_get0_propq(), &ok);
+ if (num > 1)
BIO_printf(bio_out, "issuer name hash=");
- if (ok)
+ if (ok) {
BIO_printf(bio_out, "%08lx\n", hash_value);
- else
+ } else {
BIO_puts(bio_out, "<ERROR>");
+ goto end;
+ }
}
#ifndef OPENSSL_NO_MD5
if (hash_old == i) {
+ if (num > 1)
BIO_printf(bio_out, "issuer name old hash=");
BIO_printf(bio_out, "%08lx\n",
X509_NAME_hash_old(X509_CRL_get_issuer(x)));
