summaryrefslogtreecommitdiff
path: root/lib/libcrypto/pkcs12
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2016-12-30 15:08:23 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2016-12-30 15:08:23 +0000
commit717d7c39aa4f52a21fb7f169d067d58e9e5667cf (patch)
tree7466412447dc4c9071e050fa344e4e00108f522b /lib/libcrypto/pkcs12
parent1e2d5010505b51c6871f7065b1c46f463992cdc3 (diff)
Expand M_PKCS12_* "compatibility" macros. No change to generated assembly.
Diffstat (limited to 'lib/libcrypto/pkcs12')
-rw-r--r--lib/libcrypto/pkcs12/p12_kiss.c6
-rw-r--r--lib/libcrypto/pkcs12/p12_npas.c4
-rw-r--r--lib/libcrypto/pkcs12/p12_utl.c10
3 files changed, 10 insertions, 10 deletions
diff --git a/lib/libcrypto/pkcs12/p12_kiss.c b/lib/libcrypto/pkcs12/p12_kiss.c
index df992a68fc6..eb2c3a76d52 100644
--- a/lib/libcrypto/pkcs12/p12_kiss.c
+++ b/lib/libcrypto/pkcs12/p12_kiss.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: p12_kiss.c,v 1.17 2016/03/11 07:08:44 mmcc Exp $ */
+/* $OpenBSD: p12_kiss.c,v 1.18 2016/12/30 15:08:22 jsing Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 1999.
*/
@@ -235,7 +235,7 @@ parse_bag(PKCS12_SAFEBAG *bag, const char *pass, int passlen, EVP_PKEY **pkey,
if ((attrib = PKCS12_get_attr (bag, NID_localKeyID)))
lkid = attrib->value.octet_string;
- switch (M_PKCS12_bag_type(bag)) {
+ switch (OBJ_obj2nid(bag->type)) {
case NID_keyBag:
if (!pkey || *pkey)
return 1;
@@ -255,7 +255,7 @@ parse_bag(PKCS12_SAFEBAG *bag, const char *pass, int passlen, EVP_PKEY **pkey,
break;
case NID_certBag:
- if (M_PKCS12_cert_bag_type(bag) != NID_x509Certificate )
+ if (OBJ_obj2nid(bag->value.bag->type) != NID_x509Certificate )
return 1;
if (!(x509 = PKCS12_certbag2x509(bag)))
return 0;
diff --git a/lib/libcrypto/pkcs12/p12_npas.c b/lib/libcrypto/pkcs12/p12_npas.c
index b9dea51b85f..7803721a268 100644
--- a/lib/libcrypto/pkcs12/p12_npas.c
+++ b/lib/libcrypto/pkcs12/p12_npas.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: p12_npas.c,v 1.10 2015/02/14 14:18:58 miod Exp $ */
+/* $OpenBSD: p12_npas.c,v 1.11 2016/12/30 15:08:22 jsing Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 1999.
*/
@@ -211,7 +211,7 @@ newpass_bag(PKCS12_SAFEBAG *bag, char *oldpass, char *newpass)
X509_SIG *p8new;
int p8_nid, p8_saltlen, p8_iter;
- if (M_PKCS12_bag_type(bag) != NID_pkcs8ShroudedKeyBag)
+ if (OBJ_obj2nid(bag->type) != NID_pkcs8ShroudedKeyBag)
return 1;
if (!(p8 = PKCS8_decrypt(bag->value.shkeybag, oldpass, -1)))
diff --git a/lib/libcrypto/pkcs12/p12_utl.c b/lib/libcrypto/pkcs12/p12_utl.c
index d7b9f9d2e67..e02ff3073eb 100644
--- a/lib/libcrypto/pkcs12/p12_utl.c
+++ b/lib/libcrypto/pkcs12/p12_utl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: p12_utl.c,v 1.13 2016/11/05 14:24:29 miod Exp $ */
+/* $OpenBSD: p12_utl.c,v 1.14 2016/12/30 15:08:22 jsing Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 1999.
*/
@@ -165,9 +165,9 @@ PKCS12_x509crl2certbag(X509_CRL *crl)
X509 *
PKCS12_certbag2x509(PKCS12_SAFEBAG *bag)
{
- if (M_PKCS12_bag_type(bag) != NID_certBag)
+ if (OBJ_obj2nid(bag->type) != NID_certBag)
return NULL;
- if (M_PKCS12_cert_bag_type(bag) != NID_x509Certificate)
+ if (OBJ_obj2nid(bag->value.bag->type) != NID_x509Certificate)
return NULL;
return ASN1_item_unpack(bag->value.bag->value.octet,
ASN1_ITEM_rptr(X509));
@@ -176,9 +176,9 @@ PKCS12_certbag2x509(PKCS12_SAFEBAG *bag)
X509_CRL *
PKCS12_certbag2x509crl(PKCS12_SAFEBAG *bag)
{
- if (M_PKCS12_bag_type(bag) != NID_crlBag)
+ if (OBJ_obj2nid(bag->type) != NID_crlBag)
return NULL;
- if (M_PKCS12_cert_bag_type(bag) != NID_x509Crl)
+ if (OBJ_obj2nid(bag->value.bag->type) != NID_x509Crl)
return NULL;
return ASN1_item_unpack(bag->value.bag->value.octet,
ASN1_ITEM_rptr(X509_CRL));