mirror of
https://github.com/openssl/openssl.git
synced 2025-03-19 19:50:42 +08:00
fix various formatting issues
Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
parent
116503cd51
commit
c9018bdf81
@ -542,9 +542,10 @@ int pkcs12_main(int argc, char **argv)
|
||||
|
||||
if ((options & INFO) && PKCS12_mac_present(p12)) {
|
||||
ASN1_INTEGER *tmaciter;
|
||||
|
||||
PKCS12_get0_mac(NULL, NULL, NULL, &tmaciter, p12);
|
||||
BIO_printf(bio_err, "MAC Iteration %ld\n",
|
||||
tmaciter ? ASN1_INTEGER_get(tmaciter) : 1);
|
||||
tmaciter != NULL ? ASN1_INTEGER_get(tmaciter) : 1L);
|
||||
}
|
||||
if (macver) {
|
||||
/* If we enter empty password try no password first */
|
||||
@ -665,6 +666,7 @@ int dump_certs_pkeys_bag(BIO *out, PKCS12_SAFEBAG *bag, char *pass,
|
||||
case NID_pkcs8ShroudedKeyBag:
|
||||
if (options & INFO) {
|
||||
X509_SIG *tp8;
|
||||
|
||||
BIO_printf(bio_err, "Shrouded Keybag: ");
|
||||
tp8 = PKCS12_SAFEBAG_get0_pkcs8(bag);
|
||||
alg_print(tp8->algor);
|
||||
|
@ -66,7 +66,7 @@
|
||||
|
||||
int PKCS12_mac_present(PKCS12 *p12)
|
||||
{
|
||||
return p12->mac ? 1 : 0;
|
||||
return p12->mac ? 1 : 0;
|
||||
}
|
||||
|
||||
void PKCS12_get0_mac(ASN1_OCTET_STRING **pmac, X509_ALGOR **pmacalg,
|
||||
|
@ -106,6 +106,7 @@ int PKCS12_SAFEBAG_get_nid(PKCS12_SAFEBAG *bag)
|
||||
int PKCS12_SAFEBAG_get_bag_nid(PKCS12_SAFEBAG *bag)
|
||||
{
|
||||
int btype = PKCS12_SAFEBAG_get_nid(bag);
|
||||
|
||||
if (btype != NID_certBag || btype != NID_crlBag || btype != NID_secretBag)
|
||||
return -1;
|
||||
return OBJ_obj2nid(bag->value.bag->type);
|
||||
@ -163,6 +164,7 @@ PKCS12_SAFEBAG *PKCS12_SAFEBAG_create0_p8inf(PKCS8_PRIV_KEY_INFO *p8)
|
||||
PKCS12_SAFEBAG *PKCS12_SAFEBAG_create0_pkcs8(X509_SIG *p8)
|
||||
{
|
||||
PKCS12_SAFEBAG *bag = PKCS12_SAFEBAG_new();
|
||||
|
||||
/* Set up the safe bag */
|
||||
if (bag == NULL) {
|
||||
PKCS12err(PKCS12_F_PKCS12_SAFEBAG_CREATE0_PKCS8, ERR_R_MALLOC_FAILURE);
|
||||
|
Loading…
x
Reference in New Issue
Block a user