DSA_SIG_free(dsa_sig);
return rv;
}
+ if (BIO_puts(bp, "\n") <= 0)
+ return 0;
return X509_signature_dump(bp, sig, indent);
}
RSA_PSS_PARAMS_free(pss);
if (!rv)
return 0;
- } else if (!sig && BIO_puts(bp, "\n") <= 0) {
+ } else if (BIO_puts(bp, "\n") <= 0) {
return 0;
}
if (sig)
s = sig->data;
for (i = 0; i < n; i++) {
if ((i % 18) == 0) {
- if (BIO_write(bp, "\n", 1) <= 0)
+ if (i > 0 && BIO_write(bp, "\n", 1) <= 0)
return 0;
if (BIO_indent(bp, indent, indent) <= 0)
return 0;
return ameth->sig_print(bp, sigalg, sig, 9, 0);
}
}
+ if (BIO_write(bp, "\n", 1) != 1)
+ return 0;
if (sig)
return X509_signature_dump(bp, sig, 9);
- else if (BIO_puts(bp, "\n") <= 0)
- return 0;
return 1;
}
BIO_printf(out, ":%X", p[0] << 8 | p[1]);
p += 2;
}
- BIO_puts(out, "\n");
} else {
BIO_printf(out, "IP Address:<invalid>");
break;
POLICYINFO *pinfo;
/* First print out the policy OIDs */
for (i = 0; i < sk_POLICYINFO_num(pol); i++) {
+ if (i > 0)
+ BIO_puts(out, "\n");
pinfo = sk_POLICYINFO_value(pol, i);
BIO_printf(out, "%*sPolicy: ", indent, "");
i2a_ASN1_OBJECT(out, pinfo->policyid);
- BIO_puts(out, "\n");
- if (pinfo->qualifiers)
+ if (pinfo->qualifiers) {
+ BIO_puts(out, "\n");
print_qualifiers(out, pinfo->qualifiers, indent + 2);
+ }
}
return 1;
}
POLICYQUALINFO *qualinfo;
int i;
for (i = 0; i < sk_POLICYQUALINFO_num(quals); i++) {
+ if (i > 0)
+ BIO_puts(out, "\n");
qualinfo = sk_POLICYQUALINFO_value(quals, i);
switch (OBJ_obj2nid(qualinfo->pqualid)) {
case NID_id_qt_cps:
- BIO_printf(out, "%*sCPS: %s\n", indent, "",
+ BIO_printf(out, "%*sCPS: %s", indent, "",
qualinfo->d.cpsuri->data);
break;
BIO_printf(out, "%*sUnknown Qualifier: ", indent + 2, "");
i2a_ASN1_OBJECT(out, qualinfo->pqualid);
- BIO_puts(out, "\n");
break;
}
}
OPENSSL_free(tmp);
}
}
- BIO_puts(out, "\n");
+ if (notice->exptext)
+ BIO_puts(out, "\n");
}
if (notice->exptext)
- BIO_printf(out, "%*sExplicit Text: %s\n", indent, "",
+ BIO_printf(out, "%*sExplicit Text: %s", indent, "",
notice->exptext->data);
}
BIO_puts(out, "\n");
BIO_printf(out, "%*s%s\n", indent + 2, "",
node_data_critical(dat) ? "Critical" : "Non Critical");
- if (dat->qualifier_set)
+ if (dat->qualifier_set) {
print_qualifiers(out, dat->qualifier_set, indent + 2);
+ BIO_puts(out, "\n");
+ }
else
BIO_printf(out, "%*sNo Qualifiers\n", indent + 2, "");
}
{
int i;
for (i = 0; i < sk_GENERAL_NAME_num(gens); i++) {
+ if (i > 0)
+ BIO_puts(out, "\n");
BIO_printf(out, "%*s", indent + 2, "");
GENERAL_NAME_print(out, sk_GENERAL_NAME_value(gens, i));
- BIO_puts(out, "\n");
}
return 1;
}
DIST_POINT *point;
int i;
for (i = 0; i < sk_DIST_POINT_num(crld); i++) {
- BIO_puts(out, "\n");
+ if (i > 0)
+ BIO_puts(out, "\n");
point = sk_DIST_POINT_value(crld, i);
if (point->distpoint)
print_distpoint(out, point->distpoint, indent);
NAME_CONSTRAINTS *ncons = a;
do_i2r_name_constraints(method, ncons->permittedSubtrees,
bp, ind, "Permitted");
+ if (ncons->permittedSubtrees && ncons->excludedSubtrees)
+ BIO_puts(bp, "\n");
do_i2r_name_constraints(method, ncons->excludedSubtrees,
bp, ind, "Excluded");
return 1;
if (sk_GENERAL_SUBTREE_num(trees) > 0)
BIO_printf(bp, "%*s%s:\n", ind, "", name);
for (i = 0; i < sk_GENERAL_SUBTREE_num(trees); i++) {
+ if (i > 0)
+ BIO_puts(bp, "\n");
tree = sk_GENERAL_SUBTREE_value(trees, i);
BIO_printf(bp, "%*s", ind + 2, "");
if (tree->base->type == GEN_IPADD)
print_nc_ipadd(bp, tree->base->d.ip);
else
GENERAL_NAME_print(bp, tree->base);
- BIO_puts(bp, "\n");
}
return 1;
}
BIO_puts(out, "\n");
BIO_printf(out, "%*sPolicy Language: ", indent, "");
i2a_ASN1_OBJECT(out, pci->proxyPolicy->policyLanguage);
- BIO_puts(out, "\n");
if (pci->proxyPolicy->policy && pci->proxyPolicy->policy->data)
- BIO_printf(out, "%*sPolicy Text: %s\n", indent, "",
+ BIO_printf(out, "\n%*sPolicy Text: %s", indent, "",
pci->proxyPolicy->policy->data);
return 1;
}
BIO_puts(out, "<EMPTY>\n");
}
for (i = 0; i < sk_CONF_VALUE_num(val); i++) {
- if (ml)
+ if (ml) {
+ if (i > 0)
+ BIO_printf(out, "\n");
BIO_printf(out, "%*s", indent, "");
+ }
else if (i > 0)
BIO_printf(out, ", ");
nval = sk_CONF_VALUE_value(val, i);
}
}
#endif
- if (ml)
- BIO_puts(out, "\n");
}
}