diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2016-02-05 15:43:53 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2016-02-08 18:43:49 +0000 |
commit | c9018bdf813e2a0ebb9e188318b4152743f8cb07 (patch) | |
tree | eedee9020d85ad9893beb960cfea0e7a87c45e96 /crypto | |
parent | 116503cd51aa3195ce16a82ce9b789abe58a8928 (diff) |
fix various formatting issues
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/pkcs12/p12_mutl.c | 2 | ||||
-rw-r--r-- | crypto/pkcs12/p12_sbag.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/crypto/pkcs12/p12_mutl.c b/crypto/pkcs12/p12_mutl.c index 62a62cbe9b..230f3e6b30 100644 --- a/crypto/pkcs12/p12_mutl.c +++ b/crypto/pkcs12/p12_mutl.c @@ -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, diff --git a/crypto/pkcs12/p12_sbag.c b/crypto/pkcs12/p12_sbag.c index d0ed1e13b0..62703b4dc3 100644 --- a/crypto/pkcs12/p12_sbag.c +++ b/crypto/pkcs12/p12_sbag.c @@ -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); |