diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2016-12-30 15:34:36 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2016-12-30 15:34:36 +0000 |
commit | 868a9b4a1c2426358ad12473b12e87cbc800d1f9 (patch) | |
tree | d321e67d1135265754f987eea8de8d71f66fa469 /lib/libcrypto/pkcs12 | |
parent | acdd431b143fbf2bfa2ea735841c15e3880d6a19 (diff) |
Expand ASN1_ITEM_rptr macros - no change in generated assembly.
Diffstat (limited to 'lib/libcrypto/pkcs12')
-rw-r--r-- | lib/libcrypto/pkcs12/p12_add.c | 14 | ||||
-rw-r--r-- | lib/libcrypto/pkcs12/p12_p8d.c | 4 | ||||
-rw-r--r-- | lib/libcrypto/pkcs12/p12_p8e.c | 4 | ||||
-rw-r--r-- | lib/libcrypto/pkcs12/p12_utl.c | 18 |
4 files changed, 20 insertions, 20 deletions
diff --git a/lib/libcrypto/pkcs12/p12_add.c b/lib/libcrypto/pkcs12/p12_add.c index cb7f72b3652..954ca03ebbf 100644 --- a/lib/libcrypto/pkcs12/p12_add.c +++ b/lib/libcrypto/pkcs12/p12_add.c @@ -1,4 +1,4 @@ -/* $OpenBSD: p12_add.c,v 1.13 2015/09/30 18:41:06 jsing Exp $ */ +/* $OpenBSD: p12_add.c,v 1.14 2016/12/30 15:34:35 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -156,7 +156,7 @@ PKCS12_pack_p7data(STACK_OF(PKCS12_SAFEBAG) *sk) goto err; } - if (!ASN1_item_pack(sk, ASN1_ITEM_rptr(PKCS12_SAFEBAGS), &p7->d.data)) { + if (!ASN1_item_pack(sk, &PKCS12_SAFEBAGS_it, &p7->d.data)) { PKCS12err(PKCS12_F_PKCS12_PACK_P7DATA, PKCS12_R_CANT_PACK_STRUCTURE); goto err; @@ -177,7 +177,7 @@ PKCS12_unpack_p7data(PKCS7 *p7) PKCS12_R_CONTENT_TYPE_NOT_DATA); return NULL; } - return ASN1_item_unpack(p7->d.data, ASN1_ITEM_rptr(PKCS12_SAFEBAGS)); + return ASN1_item_unpack(p7->d.data, &PKCS12_SAFEBAGS_it); } /* Turn a stack of SAFEBAGS into a PKCS#7 encrypted data ContentInfo */ @@ -215,7 +215,7 @@ PKCS12_pack_p7encdata(int pbe_nid, const char *pass, int passlen, p7->d.encrypted->enc_data->algorithm = pbe; ASN1_OCTET_STRING_free(p7->d.encrypted->enc_data->enc_data); if (!(p7->d.encrypted->enc_data->enc_data = PKCS12_item_i2d_encrypt( - pbe, ASN1_ITEM_rptr(PKCS12_SAFEBAGS), pass, passlen, bags, 1))) { + pbe, &PKCS12_SAFEBAGS_it, pass, passlen, bags, 1))) { PKCS12err(PKCS12_F_PKCS12_PACK_P7ENCDATA, PKCS12_R_ENCRYPT_ERROR); goto err; @@ -234,7 +234,7 @@ PKCS12_unpack_p7encdata(PKCS7 *p7, const char *pass, int passlen) if (!PKCS7_type_is_encrypted(p7)) return NULL; return PKCS12_item_decrypt_d2i(p7->d.encrypted->enc_data->algorithm, - ASN1_ITEM_rptr(PKCS12_SAFEBAGS), pass, passlen, + &PKCS12_SAFEBAGS_it, pass, passlen, p7->d.encrypted->enc_data->enc_data, 1); } @@ -247,7 +247,7 @@ PKCS12_decrypt_skey(PKCS12_SAFEBAG *bag, const char *pass, int passlen) int PKCS12_pack_authsafes(PKCS12 *p12, STACK_OF(PKCS7) *safes) { - if (ASN1_item_pack(safes, ASN1_ITEM_rptr(PKCS12_AUTHSAFES), + if (ASN1_item_pack(safes, &PKCS12_AUTHSAFES_it, &p12->authsafes->d.data)) return 1; return 0; @@ -262,5 +262,5 @@ PKCS12_unpack_authsafes(PKCS12 *p12) return NULL; } return ASN1_item_unpack(p12->authsafes->d.data, - ASN1_ITEM_rptr(PKCS12_AUTHSAFES)); + &PKCS12_AUTHSAFES_it); } diff --git a/lib/libcrypto/pkcs12/p12_p8d.c b/lib/libcrypto/pkcs12/p12_p8d.c index 5d3339e2f21..68af6bf5b53 100644 --- a/lib/libcrypto/pkcs12/p12_p8d.c +++ b/lib/libcrypto/pkcs12/p12_p8d.c @@ -1,4 +1,4 @@ -/* $OpenBSD: p12_p8d.c,v 1.5 2014/07/11 08:44:49 jsing Exp $ */ +/* $OpenBSD: p12_p8d.c,v 1.6 2016/12/30 15:34:35 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2001. */ @@ -64,5 +64,5 @@ PKCS8_PRIV_KEY_INFO * PKCS8_decrypt(X509_SIG *p8, const char *pass, int passlen) { return PKCS12_item_decrypt_d2i(p8->algor, - ASN1_ITEM_rptr(PKCS8_PRIV_KEY_INFO), pass, passlen, p8->digest, 1); + &PKCS8_PRIV_KEY_INFO_it, pass, passlen, p8->digest, 1); } diff --git a/lib/libcrypto/pkcs12/p12_p8e.c b/lib/libcrypto/pkcs12/p12_p8e.c index db3db872148..e39d5975d50 100644 --- a/lib/libcrypto/pkcs12/p12_p8e.c +++ b/lib/libcrypto/pkcs12/p12_p8e.c @@ -1,4 +1,4 @@ -/* $OpenBSD: p12_p8e.c,v 1.6 2015/09/30 18:41:06 jsing Exp $ */ +/* $OpenBSD: p12_p8e.c,v 1.7 2016/12/30 15:34:35 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2001. */ @@ -86,7 +86,7 @@ PKCS8_encrypt(int pbe_nid, const EVP_CIPHER *cipher, const char *pass, p8->algor = pbe; ASN1_OCTET_STRING_free(p8->digest); p8->digest = PKCS12_item_i2d_encrypt(pbe, - ASN1_ITEM_rptr(PKCS8_PRIV_KEY_INFO), pass, passlen, p8inf, 1); + &PKCS8_PRIV_KEY_INFO_it, pass, passlen, p8inf, 1); if (!p8->digest) { PKCS12err(PKCS12_F_PKCS8_ENCRYPT, PKCS12_R_ENCRYPT_ERROR); goto err; diff --git a/lib/libcrypto/pkcs12/p12_utl.c b/lib/libcrypto/pkcs12/p12_utl.c index e02ff3073eb..eb95417d1b1 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.14 2016/12/30 15:08:22 jsing Exp $ */ +/* $OpenBSD: p12_utl.c,v 1.15 2016/12/30 15:34:35 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -127,38 +127,38 @@ OPENSSL_uni2asc(unsigned char *uni, int unilen) int i2d_PKCS12_bio(BIO *bp, PKCS12 *p12) { - return ASN1_item_i2d_bio(ASN1_ITEM_rptr(PKCS12), bp, p12); + return ASN1_item_i2d_bio(&PKCS12_it, bp, p12); } int i2d_PKCS12_fp(FILE *fp, PKCS12 *p12) { - return ASN1_item_i2d_fp(ASN1_ITEM_rptr(PKCS12), fp, p12); + return ASN1_item_i2d_fp(&PKCS12_it, fp, p12); } PKCS12 * d2i_PKCS12_bio(BIO *bp, PKCS12 **p12) { - return ASN1_item_d2i_bio(ASN1_ITEM_rptr(PKCS12), bp, p12); + return ASN1_item_d2i_bio(&PKCS12_it, bp, p12); } PKCS12 * d2i_PKCS12_fp(FILE *fp, PKCS12 **p12) { - return ASN1_item_d2i_fp(ASN1_ITEM_rptr(PKCS12), fp, p12); + return ASN1_item_d2i_fp(&PKCS12_it, fp, p12); } PKCS12_SAFEBAG * PKCS12_x5092certbag(X509 *x509) { - return PKCS12_item_pack_safebag(x509, ASN1_ITEM_rptr(X509), + return PKCS12_item_pack_safebag(x509, &X509_it, NID_x509Certificate, NID_certBag); } PKCS12_SAFEBAG * PKCS12_x509crl2certbag(X509_CRL *crl) { - return PKCS12_item_pack_safebag(crl, ASN1_ITEM_rptr(X509_CRL), + return PKCS12_item_pack_safebag(crl, &X509_CRL_it, NID_x509Crl, NID_crlBag); } @@ -170,7 +170,7 @@ PKCS12_certbag2x509(PKCS12_SAFEBAG *bag) if (OBJ_obj2nid(bag->value.bag->type) != NID_x509Certificate) return NULL; return ASN1_item_unpack(bag->value.bag->value.octet, - ASN1_ITEM_rptr(X509)); + &X509_it); } X509_CRL * @@ -181,5 +181,5 @@ PKCS12_certbag2x509crl(PKCS12_SAFEBAG *bag) 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)); + &X509_CRL_it); } |