apps/x509.c: Improve indentation of the large print loop in x509_main()
@@ -888,15 +888,12 @@ int x509_main(int argc, char **argv)
corrupt_signature(signature);
}
- if (num) { /* TODO remove this needless guard and extra indentation below */
/* Process print options in the given order, as indicated by index i */
for (i = 1; i <= num; i++) {
if (issuer == i) {
- print_name(out, "issuer=", X509_get_issuer_name(x),
- get_nameopt());
+ print_name(out, "issuer=", X509_get_issuer_name(x), get_nameopt());
} else if (subject == i) {
- print_name(out, "subject=",
- X509_get_subject_name(x), get_nameopt());
+ print_name(out, "subject=", X509_get_subject_name(x), get_nameopt());
} else if (serial == i) {
BIO_printf(out, "serial=");
i2a_ASN1_INTEGER(out, X509_get0_serialNumber(x));
@@ -925,8 +922,7 @@ int x509_main(int argc, char **argv)
else
emlst = X509_get1_ocsp(x);
for (j = 0; j < sk_OPENSSL_STRING_num(emlst); j++)
- BIO_printf(out, "%s\n",
- sk_OPENSSL_STRING_value(emlst, j));
+ BIO_printf(out, "%s\n", sk_OPENSSL_STRING_value(emlst, j));
X509_email_free(emlst);
} else if (aliasout == i) {
unsigned char *alstr;
@@ -962,8 +958,7 @@ int x509_main(int argc, char **argv)
pkey = X509_get0_pubkey(x);
if (pkey == NULL) {
- BIO_printf(bio_err,
- "Modulus unavailable: cannot get key\n");
+ BIO_printf(bio_err, "Modulus unavailable: cannot get key\n");
goto end;
}
BIO_printf(out, "Modulus=");
@@ -1017,11 +1012,9 @@ int x509_main(int argc, char **argv)
BIO_printf(bio_err, "Out of memory\n");
goto end;
}
- BIO_printf(out, "%s Fingerprint=",
- OBJ_nid2sn(EVP_MD_type(fdig)));
+ BIO_printf(out, "%s Fingerprint=", OBJ_nid2sn(EVP_MD_type(fdig)));
for (j = 0; j < (int)n; j++) {
- BIO_printf(out, "%02X%c", md[j], (j + 1 == (int)n)
- ? '\n' : ':');
+ BIO_printf(out, "%02X%c", md[j], (j + 1 == (int)n) ? '\n' : ':');
}
} else if (ocspid == i) {
X509_ocspid_print(out, x);
@@ -1029,7 +1022,6 @@ int x509_main(int argc, char **argv)
print_x509v3_exts(out, x, ext_names);
}
}
- }
if (checkend) {
time_t tcheck = time(NULL) + checkoffset;
