summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjsing <>2019-08-11 10:26:04 +0000
committerjsing <>2019-08-11 10:26:04 +0000
commit08cb6e4d4d31afbeec6bc3bdd6594710504fd25b (patch)
tree23e0fa817c299bb6bf465d9f9269141ece85ff80
parent0c938f6425f6b4d1c43e4e81f5818e5fb6e4c536 (diff)
downloadopenbsd-08cb6e4d4d31afbeec6bc3bdd6594710504fd25b.tar.gz
openbsd-08cb6e4d4d31afbeec6bc3bdd6594710504fd25b.tar.bz2
openbsd-08cb6e4d4d31afbeec6bc3bdd6594710504fd25b.zip
Switch ASN.1 INT32 back to LONG.
-rw-r--r--src/lib/libcrypto/cms/cms_asn1.c28
-rw-r--r--src/lib/libcrypto/cms/cms_lcl.h28
2 files changed, 28 insertions, 28 deletions
diff --git a/src/lib/libcrypto/cms/cms_asn1.c b/src/lib/libcrypto/cms/cms_asn1.c
index d8b55b31a6..ab884dcf6e 100644
--- a/src/lib/libcrypto/cms/cms_asn1.c
+++ b/src/lib/libcrypto/cms/cms_asn1.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: cms_asn1.c,v 1.16 2019/08/11 10:24:15 jsing Exp $ */ 1/* $OpenBSD: cms_asn1.c,v 1.17 2019/08/11 10:26:04 jsing Exp $ */
2/* 2/*
3 * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 3 * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
4 * project. 4 * project.
@@ -242,7 +242,7 @@ static const ASN1_TEMPLATE CMS_SignerInfo_seq_tt[] = {
242 .tag = 0, 242 .tag = 0,
243 .offset = offsetof(CMS_SignerInfo, version), 243 .offset = offsetof(CMS_SignerInfo, version),
244 .field_name = "version", 244 .field_name = "version",
245 .item = &INT32_it, 245 .item = &LONG_it,
246 }, 246 },
247 { 247 {
248 .flags = 0, 248 .flags = 0,
@@ -358,7 +358,7 @@ static const ASN1_TEMPLATE CMS_SignedData_seq_tt[] = {
358 .tag = 0, 358 .tag = 0,
359 .offset = offsetof(CMS_SignedData, version), 359 .offset = offsetof(CMS_SignedData, version),
360 .field_name = "version", 360 .field_name = "version",
361 .item = &INT32_it, 361 .item = &LONG_it,
362 }, 362 },
363 { 363 {
364 .flags = ASN1_TFLG_SET_OF, 364 .flags = ASN1_TFLG_SET_OF,
@@ -474,7 +474,7 @@ static const ASN1_TEMPLATE CMS_KeyTransRecipientInfo_seq_tt[] = {
474 .tag = 0, 474 .tag = 0,
475 .offset = offsetof(CMS_KeyTransRecipientInfo, version), 475 .offset = offsetof(CMS_KeyTransRecipientInfo, version),
476 .field_name = "version", 476 .field_name = "version",
477 .item = &INT32_it, 477 .item = &LONG_it,
478 }, 478 },
479 { 479 {
480 .flags = 0, 480 .flags = 0,
@@ -734,7 +734,7 @@ static const ASN1_TEMPLATE CMS_KeyAgreeRecipientInfo_seq_tt[] = {
734 .tag = 0, 734 .tag = 0,
735 .offset = offsetof(CMS_KeyAgreeRecipientInfo, version), 735 .offset = offsetof(CMS_KeyAgreeRecipientInfo, version),
736 .field_name = "version", 736 .field_name = "version",
737 .item = &INT32_it, 737 .item = &LONG_it,
738 }, 738 },
739 { 739 {
740 .flags = ASN1_TFLG_EXPLICIT, 740 .flags = ASN1_TFLG_EXPLICIT,
@@ -816,7 +816,7 @@ static const ASN1_TEMPLATE CMS_KEKRecipientInfo_seq_tt[] = {
816 .tag = 0, 816 .tag = 0,
817 .offset = offsetof(CMS_KEKRecipientInfo, version), 817 .offset = offsetof(CMS_KEKRecipientInfo, version),
818 .field_name = "version", 818 .field_name = "version",
819 .item = &INT32_it, 819 .item = &LONG_it,
820 }, 820 },
821 { 821 {
822 .flags = 0, 822 .flags = 0,
@@ -857,7 +857,7 @@ static const ASN1_TEMPLATE CMS_PasswordRecipientInfo_seq_tt[] = {
857 .tag = 0, 857 .tag = 0,
858 .offset = offsetof(CMS_PasswordRecipientInfo, version), 858 .offset = offsetof(CMS_PasswordRecipientInfo, version),
859 .field_name = "version", 859 .field_name = "version",
860 .item = &INT32_it, 860 .item = &LONG_it,
861 }, 861 },
862 { 862 {
863 .flags = ASN1_TFLG_IMPLICIT | ASN1_TFLG_OPTIONAL, 863 .flags = ASN1_TFLG_IMPLICIT | ASN1_TFLG_OPTIONAL,
@@ -1003,7 +1003,7 @@ static const ASN1_TEMPLATE CMS_EnvelopedData_seq_tt[] = {
1003 .tag = 0, 1003 .tag = 0,
1004 .offset = offsetof(CMS_EnvelopedData, version), 1004 .offset = offsetof(CMS_EnvelopedData, version),
1005 .field_name = "version", 1005 .field_name = "version",
1006 .item = &INT32_it, 1006 .item = &LONG_it,
1007 }, 1007 },
1008 { 1008 {
1009 .flags = ASN1_TFLG_IMPLICIT | ASN1_TFLG_OPTIONAL, 1009 .flags = ASN1_TFLG_IMPLICIT | ASN1_TFLG_OPTIONAL,
@@ -1051,7 +1051,7 @@ static const ASN1_TEMPLATE CMS_DigestedData_seq_tt[] = {
1051 .tag = 0, 1051 .tag = 0,
1052 .offset = offsetof(CMS_DigestedData, version), 1052 .offset = offsetof(CMS_DigestedData, version),
1053 .field_name = "version", 1053 .field_name = "version",
1054 .item = &INT32_it, 1054 .item = &LONG_it,
1055 }, 1055 },
1056 { 1056 {
1057 .flags = 0, 1057 .flags = 0,
@@ -1092,7 +1092,7 @@ static const ASN1_TEMPLATE CMS_EncryptedData_seq_tt[] = {
1092 .tag = 0, 1092 .tag = 0,
1093 .offset = offsetof(CMS_EncryptedData, version), 1093 .offset = offsetof(CMS_EncryptedData, version),
1094 .field_name = "version", 1094 .field_name = "version",
1095 .item = &INT32_it, 1095 .item = &LONG_it,
1096 }, 1096 },
1097 { 1097 {
1098 .flags = 0, 1098 .flags = 0,
@@ -1126,7 +1126,7 @@ static const ASN1_TEMPLATE CMS_AuthenticatedData_seq_tt[] = {
1126 .tag = 0, 1126 .tag = 0,
1127 .offset = offsetof(CMS_AuthenticatedData, version), 1127 .offset = offsetof(CMS_AuthenticatedData, version),
1128 .field_name = "version", 1128 .field_name = "version",
1129 .item = &INT32_it, 1129 .item = &LONG_it,
1130 }, 1130 },
1131 { 1131 {
1132 .flags = ASN1_TFLG_IMPLICIT | ASN1_TFLG_OPTIONAL, 1132 .flags = ASN1_TFLG_IMPLICIT | ASN1_TFLG_OPTIONAL,
@@ -1202,7 +1202,7 @@ static const ASN1_TEMPLATE CMS_CompressedData_seq_tt[] = {
1202 .tag = 0, 1202 .tag = 0,
1203 .offset = offsetof(CMS_CompressedData, version), 1203 .offset = offsetof(CMS_CompressedData, version),
1204 .field_name = "version", 1204 .field_name = "version",
1205 .item = &INT32_it, 1205 .item = &LONG_it,
1206 }, 1206 },
1207 { 1207 {
1208 .flags = 0, 1208 .flags = 0,
@@ -1453,7 +1453,7 @@ static const ASN1_TEMPLATE CMS_ReceiptsFrom_ch_tt[] = {
1453 .tag = 0, 1453 .tag = 0,
1454 .offset = offsetof(CMS_ReceiptsFrom, d.allOrFirstTier), 1454 .offset = offsetof(CMS_ReceiptsFrom, d.allOrFirstTier),
1455 .field_name = "d.allOrFirstTier", 1455 .field_name = "d.allOrFirstTier",
1456 .item = &INT32_it, 1456 .item = &LONG_it,
1457 }, 1457 },
1458 { 1458 {
1459 .flags = ASN1_TFLG_IMPLICIT | ASN1_TFLG_SEQUENCE_OF, 1459 .flags = ASN1_TFLG_IMPLICIT | ASN1_TFLG_SEQUENCE_OF,
@@ -1514,7 +1514,7 @@ static const ASN1_TEMPLATE CMS_Receipt_seq_tt[] = {
1514 .tag = 0, 1514 .tag = 0,
1515 .offset = offsetof(CMS_Receipt, version), 1515 .offset = offsetof(CMS_Receipt, version),
1516 .field_name = "version", 1516 .field_name = "version",
1517 .item = &INT32_it, 1517 .item = &LONG_it,
1518 }, 1518 },
1519 { 1519 {
1520 .flags = 0, 1520 .flags = 0,
diff --git a/src/lib/libcrypto/cms/cms_lcl.h b/src/lib/libcrypto/cms/cms_lcl.h
index b46290af3e..a8ccaf4488 100644
--- a/src/lib/libcrypto/cms/cms_lcl.h
+++ b/src/lib/libcrypto/cms/cms_lcl.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: cms_lcl.h,v 1.10 2019/08/11 10:15:30 jsing Exp $ */ 1/* $OpenBSD: cms_lcl.h,v 1.11 2019/08/11 10:26:04 jsing Exp $ */
2/* 2/*
3 * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 3 * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
4 * project. 4 * project.
@@ -108,7 +108,7 @@ struct CMS_ContentInfo_st {
108DECLARE_STACK_OF(CMS_CertificateChoices) 108DECLARE_STACK_OF(CMS_CertificateChoices)
109 109
110struct CMS_SignedData_st { 110struct CMS_SignedData_st {
111 int32_t version; 111 long version;
112 STACK_OF(X509_ALGOR) *digestAlgorithms; 112 STACK_OF(X509_ALGOR) *digestAlgorithms;
113 CMS_EncapsulatedContentInfo *encapContentInfo; 113 CMS_EncapsulatedContentInfo *encapContentInfo;
114 STACK_OF(CMS_CertificateChoices) *certificates; 114 STACK_OF(CMS_CertificateChoices) *certificates;
@@ -124,7 +124,7 @@ struct CMS_EncapsulatedContentInfo_st {
124}; 124};
125 125
126struct CMS_SignerInfo_st { 126struct CMS_SignerInfo_st {
127 int32_t version; 127 long version;
128 CMS_SignerIdentifier *sid; 128 CMS_SignerIdentifier *sid;
129 X509_ALGOR *digestAlgorithm; 129 X509_ALGOR *digestAlgorithm;
130 STACK_OF(X509_ATTRIBUTE) *signedAttrs; 130 STACK_OF(X509_ATTRIBUTE) *signedAttrs;
@@ -148,7 +148,7 @@ struct CMS_SignerIdentifier_st {
148}; 148};
149 149
150struct CMS_EnvelopedData_st { 150struct CMS_EnvelopedData_st {
151 int32_t version; 151 long version;
152 CMS_OriginatorInfo *originatorInfo; 152 CMS_OriginatorInfo *originatorInfo;
153 STACK_OF(CMS_RecipientInfo) *recipientInfos; 153 STACK_OF(CMS_RecipientInfo) *recipientInfos;
154 CMS_EncryptedContentInfo *encryptedContentInfo; 154 CMS_EncryptedContentInfo *encryptedContentInfo;
@@ -186,7 +186,7 @@ struct CMS_RecipientInfo_st {
186typedef CMS_SignerIdentifier CMS_RecipientIdentifier; 186typedef CMS_SignerIdentifier CMS_RecipientIdentifier;
187 187
188struct CMS_KeyTransRecipientInfo_st { 188struct CMS_KeyTransRecipientInfo_st {
189 int32_t version; 189 long version;
190 CMS_RecipientIdentifier *rid; 190 CMS_RecipientIdentifier *rid;
191 X509_ALGOR *keyEncryptionAlgorithm; 191 X509_ALGOR *keyEncryptionAlgorithm;
192 ASN1_OCTET_STRING *encryptedKey; 192 ASN1_OCTET_STRING *encryptedKey;
@@ -198,7 +198,7 @@ struct CMS_KeyTransRecipientInfo_st {
198}; 198};
199 199
200struct CMS_KeyAgreeRecipientInfo_st { 200struct CMS_KeyAgreeRecipientInfo_st {
201 int32_t version; 201 long version;
202 CMS_OriginatorIdentifierOrKey *originator; 202 CMS_OriginatorIdentifierOrKey *originator;
203 ASN1_OCTET_STRING *ukm; 203 ASN1_OCTET_STRING *ukm;
204 X509_ALGOR *keyEncryptionAlgorithm; 204 X509_ALGOR *keyEncryptionAlgorithm;
@@ -245,7 +245,7 @@ struct CMS_RecipientKeyIdentifier_st {
245}; 245};
246 246
247struct CMS_KEKRecipientInfo_st { 247struct CMS_KEKRecipientInfo_st {
248 int32_t version; 248 long version;
249 CMS_KEKIdentifier *kekid; 249 CMS_KEKIdentifier *kekid;
250 X509_ALGOR *keyEncryptionAlgorithm; 250 X509_ALGOR *keyEncryptionAlgorithm;
251 ASN1_OCTET_STRING *encryptedKey; 251 ASN1_OCTET_STRING *encryptedKey;
@@ -261,7 +261,7 @@ struct CMS_KEKIdentifier_st {
261}; 261};
262 262
263struct CMS_PasswordRecipientInfo_st { 263struct CMS_PasswordRecipientInfo_st {
264 int32_t version; 264 long version;
265 X509_ALGOR *keyDerivationAlgorithm; 265 X509_ALGOR *keyDerivationAlgorithm;
266 X509_ALGOR *keyEncryptionAlgorithm; 266 X509_ALGOR *keyEncryptionAlgorithm;
267 ASN1_OCTET_STRING *encryptedKey; 267 ASN1_OCTET_STRING *encryptedKey;
@@ -276,20 +276,20 @@ struct CMS_OtherRecipientInfo_st {
276}; 276};
277 277
278struct CMS_DigestedData_st { 278struct CMS_DigestedData_st {
279 int32_t version; 279 long version;
280 X509_ALGOR *digestAlgorithm; 280 X509_ALGOR *digestAlgorithm;
281 CMS_EncapsulatedContentInfo *encapContentInfo; 281 CMS_EncapsulatedContentInfo *encapContentInfo;
282 ASN1_OCTET_STRING *digest; 282 ASN1_OCTET_STRING *digest;
283}; 283};
284 284
285struct CMS_EncryptedData_st { 285struct CMS_EncryptedData_st {
286 int32_t version; 286 long version;
287 CMS_EncryptedContentInfo *encryptedContentInfo; 287 CMS_EncryptedContentInfo *encryptedContentInfo;
288 STACK_OF(X509_ATTRIBUTE) *unprotectedAttrs; 288 STACK_OF(X509_ATTRIBUTE) *unprotectedAttrs;
289}; 289};
290 290
291struct CMS_AuthenticatedData_st { 291struct CMS_AuthenticatedData_st {
292 int32_t version; 292 long version;
293 CMS_OriginatorInfo *originatorInfo; 293 CMS_OriginatorInfo *originatorInfo;
294 STACK_OF(CMS_RecipientInfo) *recipientInfos; 294 STACK_OF(CMS_RecipientInfo) *recipientInfos;
295 X509_ALGOR *macAlgorithm; 295 X509_ALGOR *macAlgorithm;
@@ -301,7 +301,7 @@ struct CMS_AuthenticatedData_st {
301}; 301};
302 302
303struct CMS_CompressedData_st { 303struct CMS_CompressedData_st {
304 int32_t version; 304 long version;
305 X509_ALGOR *compressionAlgorithm; 305 X509_ALGOR *compressionAlgorithm;
306 STACK_OF(CMS_RecipientInfo) *recipientInfos; 306 STACK_OF(CMS_RecipientInfo) *recipientInfos;
307 CMS_EncapsulatedContentInfo *encapContentInfo; 307 CMS_EncapsulatedContentInfo *encapContentInfo;
@@ -373,14 +373,14 @@ struct CMS_ReceiptRequest_st {
373struct CMS_ReceiptsFrom_st { 373struct CMS_ReceiptsFrom_st {
374 int type; 374 int type;
375 union { 375 union {
376 int32_t allOrFirstTier; 376 long allOrFirstTier;
377 STACK_OF(GENERAL_NAMES) *receiptList; 377 STACK_OF(GENERAL_NAMES) *receiptList;
378 } d; 378 } d;
379}; 379};
380#endif 380#endif
381 381
382struct CMS_Receipt_st { 382struct CMS_Receipt_st {
383 int32_t version; 383 long version;
384 ASN1_OBJECT *contentType; 384 ASN1_OBJECT *contentType;
385 ASN1_OCTET_STRING *signedContentIdentifier; 385 ASN1_OCTET_STRING *signedContentIdentifier;
386 ASN1_OCTET_STRING *originatorSignatureValue; 386 ASN1_OCTET_STRING *originatorSignatureValue;