summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/pkcs7
diff options
context:
space:
mode:
authorjsing <>2016-12-30 15:38:13 +0000
committerjsing <>2016-12-30 15:38:13 +0000
commit839da8fff8567f7cd4ca2db04b35ff34048ddb4c (patch)
tree504f0cb89b43c50cb0a2a5677649170a8b6c460e /src/lib/libcrypto/pkcs7
parentc592ddf845454b07eca995ae32ea87dc1eeb9719 (diff)
downloadopenbsd-839da8fff8567f7cd4ca2db04b35ff34048ddb4c.tar.gz
openbsd-839da8fff8567f7cd4ca2db04b35ff34048ddb4c.tar.bz2
openbsd-839da8fff8567f7cd4ca2db04b35ff34048ddb4c.zip
Expand ASN1_ITEM_rptr macros - no change in generated assembly.
Diffstat (limited to 'src/lib/libcrypto/pkcs7')
-rw-r--r--src/lib/libcrypto/pkcs7/bio_pk7.c4
-rw-r--r--src/lib/libcrypto/pkcs7/pk7_attr.c6
-rw-r--r--src/lib/libcrypto/pkcs7/pk7_doit.c6
-rw-r--r--src/lib/libcrypto/pkcs7/pk7_mime.c10
4 files changed, 13 insertions, 13 deletions
diff --git a/src/lib/libcrypto/pkcs7/bio_pk7.c b/src/lib/libcrypto/pkcs7/bio_pk7.c
index 0e4a4f7559..ad3c5e2698 100644
--- a/src/lib/libcrypto/pkcs7/bio_pk7.c
+++ b/src/lib/libcrypto/pkcs7/bio_pk7.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bio_pk7.c,v 1.4 2014/06/29 17:05:36 jsing Exp $ */ 1/* $OpenBSD: bio_pk7.c,v 1.5 2016/12/30 15:38:13 jsing Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project. 3 * project.
4 */ 4 */
@@ -62,5 +62,5 @@
62BIO * 62BIO *
63BIO_new_PKCS7(BIO *out, PKCS7 *p7) 63BIO_new_PKCS7(BIO *out, PKCS7 *p7)
64{ 64{
65 return BIO_new_NDEF(out, (ASN1_VALUE *)p7, ASN1_ITEM_rptr(PKCS7)); 65 return BIO_new_NDEF(out, (ASN1_VALUE *)p7, &PKCS7_it);
66} 66}
diff --git a/src/lib/libcrypto/pkcs7/pk7_attr.c b/src/lib/libcrypto/pkcs7/pk7_attr.c
index 554a47673b..07722f98e1 100644
--- a/src/lib/libcrypto/pkcs7/pk7_attr.c
+++ b/src/lib/libcrypto/pkcs7/pk7_attr.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: pk7_attr.c,v 1.10 2014/10/28 05:46:56 miod Exp $ */ 1/* $OpenBSD: pk7_attr.c,v 1.11 2016/12/30 15:38:13 jsing Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2001. 3 * project 2001.
4 */ 4 */
@@ -76,7 +76,7 @@ PKCS7_add_attrib_smimecap(PKCS7_SIGNER_INFO *si, STACK_OF(X509_ALGOR) *cap)
76 return 0; 76 return 0;
77 } 77 }
78 seq->length = ASN1_item_i2d((ASN1_VALUE *)cap, &seq->data, 78 seq->length = ASN1_item_i2d((ASN1_VALUE *)cap, &seq->data,
79 ASN1_ITEM_rptr(X509_ALGORS)); 79 &X509_ALGORS_it);
80 return PKCS7_add_signed_attribute(si, NID_SMIMECapabilities, 80 return PKCS7_add_signed_attribute(si, NID_SMIMECapabilities,
81 V_ASN1_SEQUENCE, seq); 81 V_ASN1_SEQUENCE, seq);
82} 82}
@@ -93,7 +93,7 @@ PKCS7_get_smimecap(PKCS7_SIGNER_INFO *si)
93 p = cap->value.sequence->data; 93 p = cap->value.sequence->data;
94 return (STACK_OF(X509_ALGOR) *) 94 return (STACK_OF(X509_ALGOR) *)
95 ASN1_item_d2i(NULL, &p, cap->value.sequence->length, 95 ASN1_item_d2i(NULL, &p, cap->value.sequence->length,
96 ASN1_ITEM_rptr(X509_ALGORS)); 96 &X509_ALGORS_it);
97} 97}
98 98
99/* Basic smime-capabilities OID and optional integer arg */ 99/* Basic smime-capabilities OID and optional integer arg */
diff --git a/src/lib/libcrypto/pkcs7/pk7_doit.c b/src/lib/libcrypto/pkcs7/pk7_doit.c
index bd873143c1..e84eee6d8f 100644
--- a/src/lib/libcrypto/pkcs7/pk7_doit.c
+++ b/src/lib/libcrypto/pkcs7/pk7_doit.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: pk7_doit.c,v 1.39 2016/11/05 15:19:07 miod Exp $ */ 1/* $OpenBSD: pk7_doit.c,v 1.40 2016/12/30 15:38:13 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -915,7 +915,7 @@ PKCS7_SIGNER_INFO_sign(PKCS7_SIGNER_INFO *si)
915 } 915 }
916 916
917 alen = ASN1_item_i2d((ASN1_VALUE *)si->auth_attr, &abuf, 917 alen = ASN1_item_i2d((ASN1_VALUE *)si->auth_attr, &abuf,
918 ASN1_ITEM_rptr(PKCS7_ATTR_SIGN)); 918 &PKCS7_ATTR_SIGN_it);
919 if (!abuf) 919 if (!abuf)
920 goto err; 920 goto err;
921 if (EVP_DigestSignUpdate(&mctx, abuf, alen) <= 0) 921 if (EVP_DigestSignUpdate(&mctx, abuf, alen) <= 0)
@@ -1090,7 +1090,7 @@ PKCS7_signatureVerify(BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si, X509 *x509)
1090 goto err; 1090 goto err;
1091 1091
1092 alen = ASN1_item_i2d((ASN1_VALUE *)sk, &abuf, 1092 alen = ASN1_item_i2d((ASN1_VALUE *)sk, &abuf,
1093 ASN1_ITEM_rptr(PKCS7_ATTR_VERIFY)); 1093 &PKCS7_ATTR_VERIFY_it);
1094 if (alen <= 0) { 1094 if (alen <= 0) {
1095 PKCS7err(PKCS7_F_PKCS7_SIGNATUREVERIFY, ERR_R_ASN1_LIB); 1095 PKCS7err(PKCS7_F_PKCS7_SIGNATUREVERIFY, ERR_R_ASN1_LIB);
1096 ret = -1; 1096 ret = -1;
diff --git a/src/lib/libcrypto/pkcs7/pk7_mime.c b/src/lib/libcrypto/pkcs7/pk7_mime.c
index 31023f22c6..fad331bf16 100644
--- a/src/lib/libcrypto/pkcs7/pk7_mime.c
+++ b/src/lib/libcrypto/pkcs7/pk7_mime.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: pk7_mime.c,v 1.12 2014/10/18 17:20:40 jsing Exp $ */ 1/* $OpenBSD: pk7_mime.c,v 1.13 2016/12/30 15:38:13 jsing Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project. 3 * project.
4 */ 4 */
@@ -64,14 +64,14 @@ int
64i2d_PKCS7_bio_stream(BIO *out, PKCS7 *p7, BIO *in, int flags) 64i2d_PKCS7_bio_stream(BIO *out, PKCS7 *p7, BIO *in, int flags)
65{ 65{
66 return i2d_ASN1_bio_stream(out, (ASN1_VALUE *)p7, in, flags, 66 return i2d_ASN1_bio_stream(out, (ASN1_VALUE *)p7, in, flags,
67 ASN1_ITEM_rptr(PKCS7)); 67 &PKCS7_it);
68} 68}
69 69
70int 70int
71PEM_write_bio_PKCS7_stream(BIO *out, PKCS7 *p7, BIO *in, int flags) 71PEM_write_bio_PKCS7_stream(BIO *out, PKCS7 *p7, BIO *in, int flags)
72{ 72{
73 return PEM_write_bio_ASN1_stream(out, (ASN1_VALUE *) p7, in, flags, 73 return PEM_write_bio_ASN1_stream(out, (ASN1_VALUE *) p7, in, flags,
74 "PKCS7", ASN1_ITEM_rptr(PKCS7)); 74 "PKCS7", &PKCS7_it);
75} 75}
76 76
77int 77int
@@ -88,11 +88,11 @@ SMIME_write_PKCS7(BIO *bio, PKCS7 *p7, BIO *data, int flags)
88 88
89 89
90 return SMIME_write_ASN1(bio, (ASN1_VALUE *)p7, data, flags, 90 return SMIME_write_ASN1(bio, (ASN1_VALUE *)p7, data, flags,
91 ctype_nid, NID_undef, mdalgs, ASN1_ITEM_rptr(PKCS7)); 91 ctype_nid, NID_undef, mdalgs, &PKCS7_it);
92} 92}
93 93
94PKCS7 * 94PKCS7 *
95SMIME_read_PKCS7(BIO *bio, BIO **bcont) 95SMIME_read_PKCS7(BIO *bio, BIO **bcont)
96{ 96{
97 return (PKCS7 *)SMIME_read_ASN1(bio, bcont, ASN1_ITEM_rptr(PKCS7)); 97 return (PKCS7 *)SMIME_read_ASN1(bio, bcont, &PKCS7_it);
98} 98}