| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/cms/cms_asn1.c |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||
|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||
| 2 | - | |||||||
| 3 | static const ASN1_TEMPLATE CMS_IssuerAndSerialNumber_seq_tt[] = { | - | ||||||
| 4 | { (0), (0), | - | ||||||
| 5 | __builtin_offsetof ( | - | ||||||
| 6 | CMS_IssuerAndSerialNumber | - | ||||||
| 7 | , | - | ||||||
| 8 | issuer | - | ||||||
| 9 | ) | - | ||||||
| 10 | , "issuer", (&(X509_NAME_it)) }, | - | ||||||
| 11 | { (0), (0), | - | ||||||
| 12 | __builtin_offsetof ( | - | ||||||
| 13 | CMS_IssuerAndSerialNumber | - | ||||||
| 14 | , | - | ||||||
| 15 | serialNumber | - | ||||||
| 16 | ) | - | ||||||
| 17 | , "serialNumber", (&(ASN1_INTEGER_it)) } | - | ||||||
| 18 | } ; const ASN1_ITEM CMS_IssuerAndSerialNumber_it = { 0x1, 16, CMS_IssuerAndSerialNumber_seq_tt, sizeof(CMS_IssuerAndSerialNumber_seq_tt) / sizeof(ASN1_TEMPLATE), | - | ||||||
| 19 | ((void *)0) | - | ||||||
| 20 | , sizeof(CMS_IssuerAndSerialNumber), "CMS_IssuerAndSerialNumber" }; | - | ||||||
| 21 | - | |||||||
| 22 | static const ASN1_TEMPLATE CMS_OtherCertificateFormat_seq_tt[] = { | - | ||||||
| 23 | { (0), (0), | - | ||||||
| 24 | __builtin_offsetof ( | - | ||||||
| 25 | CMS_OtherCertificateFormat | - | ||||||
| 26 | , | - | ||||||
| 27 | otherCertFormat | - | ||||||
| 28 | ) | - | ||||||
| 29 | , "otherCertFormat", (&(ASN1_OBJECT_it)) }, | - | ||||||
| 30 | { ((0x1)), (0), | - | ||||||
| 31 | __builtin_offsetof ( | - | ||||||
| 32 | CMS_OtherCertificateFormat | - | ||||||
| 33 | , | - | ||||||
| 34 | otherCert | - | ||||||
| 35 | ) | - | ||||||
| 36 | , "otherCert", (&(ASN1_ANY_it)) } | - | ||||||
| 37 | } ; static const ASN1_ITEM CMS_OtherCertificateFormat_it = { 0x1, 16, CMS_OtherCertificateFormat_seq_tt, sizeof(CMS_OtherCertificateFormat_seq_tt) / sizeof(ASN1_TEMPLATE), | - | ||||||
| 38 | ((void *)0) | - | ||||||
| 39 | , sizeof(CMS_OtherCertificateFormat), "CMS_OtherCertificateFormat" }; | - | ||||||
| 40 | - | |||||||
| 41 | static const ASN1_TEMPLATE CMS_CertificateChoices_ch_tt[] = { | - | ||||||
| 42 | { (0), (0), | - | ||||||
| 43 | __builtin_offsetof ( | - | ||||||
| 44 | CMS_CertificateChoices | - | ||||||
| 45 | , | - | ||||||
| 46 | d.certificate | - | ||||||
| 47 | ) | - | ||||||
| 48 | , "d.certificate", (&(X509_it)) }, | - | ||||||
| 49 | { (((0x1 << 3)|(0x2<<6)) | (0)), (0), | - | ||||||
| 50 | __builtin_offsetof ( | - | ||||||
| 51 | CMS_CertificateChoices | - | ||||||
| 52 | , | - | ||||||
| 53 | d.extendedCertificate | - | ||||||
| 54 | ) | - | ||||||
| 55 | , "d.extendedCertificate", (&(ASN1_SEQUENCE_it)) }, | - | ||||||
| 56 | { (((0x1 << 3)|(0x2<<6)) | (0)), (1), | - | ||||||
| 57 | __builtin_offsetof ( | - | ||||||
| 58 | CMS_CertificateChoices | - | ||||||
| 59 | , | - | ||||||
| 60 | d.v1AttrCert | - | ||||||
| 61 | ) | - | ||||||
| 62 | , "d.v1AttrCert", (&(ASN1_SEQUENCE_it)) }, | - | ||||||
| 63 | { (((0x1 << 3)|(0x2<<6)) | (0)), (2), | - | ||||||
| 64 | __builtin_offsetof ( | - | ||||||
| 65 | CMS_CertificateChoices | - | ||||||
| 66 | , | - | ||||||
| 67 | d.v2AttrCert | - | ||||||
| 68 | ) | - | ||||||
| 69 | , "d.v2AttrCert", (&(ASN1_SEQUENCE_it)) }, | - | ||||||
| 70 | { (((0x1 << 3)|(0x2<<6)) | (0)), (3), | - | ||||||
| 71 | __builtin_offsetof ( | - | ||||||
| 72 | CMS_CertificateChoices | - | ||||||
| 73 | , | - | ||||||
| 74 | d.other | - | ||||||
| 75 | ) | - | ||||||
| 76 | , "d.other", (&(CMS_OtherCertificateFormat_it)) } | - | ||||||
| 77 | } ; const ASN1_ITEM CMS_CertificateChoices_it = { 0x2, | - | ||||||
| 78 | __builtin_offsetof ( | - | ||||||
| 79 | CMS_CertificateChoices | - | ||||||
| 80 | , | - | ||||||
| 81 | type | - | ||||||
| 82 | ) | - | ||||||
| 83 | , CMS_CertificateChoices_ch_tt, sizeof(CMS_CertificateChoices_ch_tt) / sizeof(ASN1_TEMPLATE), | - | ||||||
| 84 | ((void *)0) | - | ||||||
| 85 | , sizeof(CMS_CertificateChoices), "CMS_CertificateChoices" }; | - | ||||||
| 86 | - | |||||||
| 87 | static const ASN1_TEMPLATE CMS_SignerIdentifier_ch_tt[] = { | - | ||||||
| 88 | { (0), (0), | - | ||||||
| 89 | __builtin_offsetof ( | - | ||||||
| 90 | CMS_SignerIdentifier | - | ||||||
| 91 | , | - | ||||||
| 92 | d.issuerAndSerialNumber | - | ||||||
| 93 | ) | - | ||||||
| 94 | , "d.issuerAndSerialNumber", (&(CMS_IssuerAndSerialNumber_it)) }, | - | ||||||
| 95 | { (((0x1 << 3)|(0x2<<6)) | (0)), (0), | - | ||||||
| 96 | __builtin_offsetof ( | - | ||||||
| 97 | CMS_SignerIdentifier | - | ||||||
| 98 | , | - | ||||||
| 99 | d.subjectKeyIdentifier | - | ||||||
| 100 | ) | - | ||||||
| 101 | , "d.subjectKeyIdentifier", (&(ASN1_OCTET_STRING_it)) } | - | ||||||
| 102 | } ; static const ASN1_ITEM CMS_SignerIdentifier_it = { 0x2, | - | ||||||
| 103 | __builtin_offsetof ( | - | ||||||
| 104 | CMS_SignerIdentifier | - | ||||||
| 105 | , | - | ||||||
| 106 | type | - | ||||||
| 107 | ) | - | ||||||
| 108 | , CMS_SignerIdentifier_ch_tt, sizeof(CMS_SignerIdentifier_ch_tt) / sizeof(ASN1_TEMPLATE), | - | ||||||
| 109 | ((void *)0) | - | ||||||
| 110 | , sizeof(CMS_SignerIdentifier), "CMS_SignerIdentifier" }; | - | ||||||
| 111 | - | |||||||
| 112 | static const ASN1_TEMPLATE CMS_EncapsulatedContentInfo_seq_tt[] = { | - | ||||||
| 113 | { (0), (0), | - | ||||||
| 114 | __builtin_offsetof ( | - | ||||||
| 115 | CMS_EncapsulatedContentInfo | - | ||||||
| 116 | , | - | ||||||
| 117 | eContentType | - | ||||||
| 118 | ) | - | ||||||
| 119 | , "eContentType", (&(ASN1_OBJECT_it)) }, | - | ||||||
| 120 | { (((0x2 << 3)|(0x2<<6)) | ((0x1)|(0x1<<11))), (0), | - | ||||||
| 121 | __builtin_offsetof ( | - | ||||||
| 122 | CMS_EncapsulatedContentInfo | - | ||||||
| 123 | , | - | ||||||
| 124 | eContent | - | ||||||
| 125 | ) | - | ||||||
| 126 | , "eContent", (&(ASN1_OCTET_STRING_NDEF_it)) } | - | ||||||
| 127 | } ; static const ASN1_ITEM CMS_EncapsulatedContentInfo_it = { 0x6, 16, CMS_EncapsulatedContentInfo_seq_tt, sizeof(CMS_EncapsulatedContentInfo_seq_tt) / sizeof(ASN1_TEMPLATE), | - | ||||||
| 128 | ((void *)0) | - | ||||||
| 129 | , sizeof(CMS_EncapsulatedContentInfo), "CMS_EncapsulatedContentInfo" }; | - | ||||||
| 130 | - | |||||||
| 131 | - | |||||||
| 132 | static int cms_si_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, | - | ||||||
| 133 | void *exarg) | - | ||||||
| 134 | { | - | ||||||
| 135 | if (operation == 3
| 1669-15598 | ||||||
| 136 | CMS_SignerInfo *si = (CMS_SignerInfo *)*pval; | - | ||||||
| 137 | EVP_PKEY_free(si->pkey); | - | ||||||
| 138 | X509_free(si->signer); | - | ||||||
| 139 | EVP_MD_CTX_free(si->mctx); | - | ||||||
| 140 | } executed 1669 times by 1 test: end of blockExecuted by:
| 1669 | ||||||
| 141 | return executed 17267 times by 1 test: 1;return 1;Executed by:
executed 17267 times by 1 test: return 1;Executed by:
| 17267 | ||||||
| 142 | } | - | ||||||
| 143 | - | |||||||
| 144 | static const ASN1_AUX CMS_SignerInfo_aux = { | - | ||||||
| 145 | ((void *)0) | - | ||||||
| 146 | , 0, 0, 0, cms_si_cb, 0}; static const ASN1_TEMPLATE CMS_SignerInfo_seq_tt[] = { | - | ||||||
| 147 | { ((0x1 << 12)), (0), | - | ||||||
| 148 | __builtin_offsetof ( | - | ||||||
| 149 | CMS_SignerInfo | - | ||||||
| 150 | , | - | ||||||
| 151 | version | - | ||||||
| 152 | ) | - | ||||||
| 153 | , "version", (&(INT32_it)) }, | - | ||||||
| 154 | { (0), (0), | - | ||||||
| 155 | __builtin_offsetof ( | - | ||||||
| 156 | CMS_SignerInfo | - | ||||||
| 157 | , | - | ||||||
| 158 | sid | - | ||||||
| 159 | ) | - | ||||||
| 160 | , "sid", (&(CMS_SignerIdentifier_it)) }, | - | ||||||
| 161 | { (0), (0), | - | ||||||
| 162 | __builtin_offsetof ( | - | ||||||
| 163 | CMS_SignerInfo | - | ||||||
| 164 | , | - | ||||||
| 165 | digestAlgorithm | - | ||||||
| 166 | ) | - | ||||||
| 167 | , "digestAlgorithm", (&(X509_ALGOR_it)) }, | - | ||||||
| 168 | { (((0x1 << 3)|(0x2<<6)) | ((0x1 << 1)|(0x1))), (0), | - | ||||||
| 169 | __builtin_offsetof ( | - | ||||||
| 170 | CMS_SignerInfo | - | ||||||
| 171 | , | - | ||||||
| 172 | signedAttrs | - | ||||||
| 173 | ) | - | ||||||
| 174 | , "signedAttrs", (&(X509_ATTRIBUTE_it)) }, | - | ||||||
| 175 | { (0), (0), | - | ||||||
| 176 | __builtin_offsetof ( | - | ||||||
| 177 | CMS_SignerInfo | - | ||||||
| 178 | , | - | ||||||
| 179 | signatureAlgorithm | - | ||||||
| 180 | ) | - | ||||||
| 181 | , "signatureAlgorithm", (&(X509_ALGOR_it)) }, | - | ||||||
| 182 | { (0), (0), | - | ||||||
| 183 | __builtin_offsetof ( | - | ||||||
| 184 | CMS_SignerInfo | - | ||||||
| 185 | , | - | ||||||
| 186 | signature | - | ||||||
| 187 | ) | - | ||||||
| 188 | , "signature", (&(ASN1_OCTET_STRING_it)) }, | - | ||||||
| 189 | { (((0x1 << 3)|(0x2<<6)) | ((0x1 << 1)|(0x1))), (1), | - | ||||||
| 190 | __builtin_offsetof ( | - | ||||||
| 191 | CMS_SignerInfo | - | ||||||
| 192 | , | - | ||||||
| 193 | unsignedAttrs | - | ||||||
| 194 | ) | - | ||||||
| 195 | , "unsignedAttrs", (&(X509_ATTRIBUTE_it)) } | - | ||||||
| 196 | } ; const ASN1_ITEM CMS_SignerInfo_it = { 0x1, 16, CMS_SignerInfo_seq_tt, sizeof(CMS_SignerInfo_seq_tt) / sizeof(ASN1_TEMPLATE), &CMS_SignerInfo_aux, sizeof(CMS_SignerInfo), "CMS_SignerInfo" }; | - | ||||||
| 197 | - | |||||||
| 198 | static const ASN1_TEMPLATE CMS_OtherRevocationInfoFormat_seq_tt[] = { | - | ||||||
| 199 | { (0), (0), | - | ||||||
| 200 | __builtin_offsetof ( | - | ||||||
| 201 | CMS_OtherRevocationInfoFormat | - | ||||||
| 202 | , | - | ||||||
| 203 | otherRevInfoFormat | - | ||||||
| 204 | ) | - | ||||||
| 205 | , "otherRevInfoFormat", (&(ASN1_OBJECT_it)) }, | - | ||||||
| 206 | { ((0x1)), (0), | - | ||||||
| 207 | __builtin_offsetof ( | - | ||||||
| 208 | CMS_OtherRevocationInfoFormat | - | ||||||
| 209 | , | - | ||||||
| 210 | otherRevInfo | - | ||||||
| 211 | ) | - | ||||||
| 212 | , "otherRevInfo", (&(ASN1_ANY_it)) } | - | ||||||
| 213 | } ; static const ASN1_ITEM CMS_OtherRevocationInfoFormat_it = { 0x1, 16, CMS_OtherRevocationInfoFormat_seq_tt, sizeof(CMS_OtherRevocationInfoFormat_seq_tt) / sizeof(ASN1_TEMPLATE), | - | ||||||
| 214 | ((void *)0) | - | ||||||
| 215 | , sizeof(CMS_OtherRevocationInfoFormat), "CMS_OtherRevocationInfoFormat" }; | - | ||||||
| 216 | - | |||||||
| 217 | static const ASN1_TEMPLATE CMS_RevocationInfoChoice_ch_tt[] = { | - | ||||||
| 218 | { (0), (0), | - | ||||||
| 219 | __builtin_offsetof ( | - | ||||||
| 220 | CMS_RevocationInfoChoice | - | ||||||
| 221 | , | - | ||||||
| 222 | d.crl | - | ||||||
| 223 | ) | - | ||||||
| 224 | , "d.crl", (&(X509_CRL_it)) }, | - | ||||||
| 225 | { (((0x1 << 3)|(0x2<<6)) | (0)), (1), | - | ||||||
| 226 | __builtin_offsetof ( | - | ||||||
| 227 | CMS_RevocationInfoChoice | - | ||||||
| 228 | , | - | ||||||
| 229 | d.other | - | ||||||
| 230 | ) | - | ||||||
| 231 | , "d.other", (&(CMS_OtherRevocationInfoFormat_it)) } | - | ||||||
| 232 | } ; const ASN1_ITEM CMS_RevocationInfoChoice_it = { 0x2, | - | ||||||
| 233 | __builtin_offsetof ( | - | ||||||
| 234 | CMS_RevocationInfoChoice | - | ||||||
| 235 | , | - | ||||||
| 236 | type | - | ||||||
| 237 | ) | - | ||||||
| 238 | , CMS_RevocationInfoChoice_ch_tt, sizeof(CMS_RevocationInfoChoice_ch_tt) / sizeof(ASN1_TEMPLATE), | - | ||||||
| 239 | ((void *)0) | - | ||||||
| 240 | , sizeof(CMS_RevocationInfoChoice), "CMS_RevocationInfoChoice" }; | - | ||||||
| 241 | - | |||||||
| 242 | static const ASN1_TEMPLATE CMS_SignedData_seq_tt[] = { | - | ||||||
| 243 | { ((0x1 << 12)), (0), | - | ||||||
| 244 | __builtin_offsetof ( | - | ||||||
| 245 | CMS_SignedData | - | ||||||
| 246 | , | - | ||||||
| 247 | version | - | ||||||
| 248 | ) | - | ||||||
| 249 | , "version", (&(INT32_it)) }, | - | ||||||
| 250 | { ((0x1 << 1)), (0), | - | ||||||
| 251 | __builtin_offsetof ( | - | ||||||
| 252 | CMS_SignedData | - | ||||||
| 253 | , | - | ||||||
| 254 | digestAlgorithms | - | ||||||
| 255 | ) | - | ||||||
| 256 | , "digestAlgorithms", (&(X509_ALGOR_it)) }, | - | ||||||
| 257 | { (0), (0), | - | ||||||
| 258 | __builtin_offsetof ( | - | ||||||
| 259 | CMS_SignedData | - | ||||||
| 260 | , | - | ||||||
| 261 | encapContentInfo | - | ||||||
| 262 | ) | - | ||||||
| 263 | , "encapContentInfo", (&(CMS_EncapsulatedContentInfo_it)) }, | - | ||||||
| 264 | { (((0x1 << 3)|(0x2<<6)) | ((0x1 << 1)|(0x1))), (0), | - | ||||||
| 265 | __builtin_offsetof ( | - | ||||||
| 266 | CMS_SignedData | - | ||||||
| 267 | , | - | ||||||
| 268 | certificates | - | ||||||
| 269 | ) | - | ||||||
| 270 | , "certificates", (&(CMS_CertificateChoices_it)) }, | - | ||||||
| 271 | { (((0x1 << 3)|(0x2<<6)) | ((0x1 << 1)|(0x1))), (1), | - | ||||||
| 272 | __builtin_offsetof ( | - | ||||||
| 273 | CMS_SignedData | - | ||||||
| 274 | , | - | ||||||
| 275 | crls | - | ||||||
| 276 | ) | - | ||||||
| 277 | , "crls", (&(CMS_RevocationInfoChoice_it)) }, | - | ||||||
| 278 | { ((0x1 << 1)), (0), | - | ||||||
| 279 | __builtin_offsetof ( | - | ||||||
| 280 | CMS_SignedData | - | ||||||
| 281 | , | - | ||||||
| 282 | signerInfos | - | ||||||
| 283 | ) | - | ||||||
| 284 | , "signerInfos", (&(CMS_SignerInfo_it)) } | - | ||||||
| 285 | } ; const ASN1_ITEM CMS_SignedData_it = { 0x6, 16, CMS_SignedData_seq_tt, sizeof(CMS_SignedData_seq_tt) / sizeof(ASN1_TEMPLATE), | - | ||||||
| 286 | ((void *)0) | - | ||||||
| 287 | , sizeof(CMS_SignedData), "CMS_SignedData" }; | - | ||||||
| 288 | - | |||||||
| 289 | static const ASN1_TEMPLATE CMS_OriginatorInfo_seq_tt[] = { | - | ||||||
| 290 | { (((0x1 << 3)|(0x2<<6)) | ((0x1 << 1)|(0x1))), (0), | - | ||||||
| 291 | __builtin_offsetof ( | - | ||||||
| 292 | CMS_OriginatorInfo | - | ||||||
| 293 | , | - | ||||||
| 294 | certificates | - | ||||||
| 295 | ) | - | ||||||
| 296 | , "certificates", (&(CMS_CertificateChoices_it)) }, | - | ||||||
| 297 | { (((0x1 << 3)|(0x2<<6)) | ((0x1 << 1)|(0x1))), (1), | - | ||||||
| 298 | __builtin_offsetof ( | - | ||||||
| 299 | CMS_OriginatorInfo | - | ||||||
| 300 | , | - | ||||||
| 301 | crls | - | ||||||
| 302 | ) | - | ||||||
| 303 | , "crls", (&(CMS_RevocationInfoChoice_it)) } | - | ||||||
| 304 | } ; static const ASN1_ITEM CMS_OriginatorInfo_it = { 0x1, 16, CMS_OriginatorInfo_seq_tt, sizeof(CMS_OriginatorInfo_seq_tt) / sizeof(ASN1_TEMPLATE), | - | ||||||
| 305 | ((void *)0) | - | ||||||
| 306 | , sizeof(CMS_OriginatorInfo), "CMS_OriginatorInfo" }; | - | ||||||
| 307 | - | |||||||
| 308 | static const ASN1_TEMPLATE CMS_EncryptedContentInfo_seq_tt[] = { | - | ||||||
| 309 | { (0), (0), | - | ||||||
| 310 | __builtin_offsetof ( | - | ||||||
| 311 | CMS_EncryptedContentInfo | - | ||||||
| 312 | , | - | ||||||
| 313 | contentType | - | ||||||
| 314 | ) | - | ||||||
| 315 | , "contentType", (&(ASN1_OBJECT_it)) }, | - | ||||||
| 316 | { (0), (0), | - | ||||||
| 317 | __builtin_offsetof ( | - | ||||||
| 318 | CMS_EncryptedContentInfo | - | ||||||
| 319 | , | - | ||||||
| 320 | contentEncryptionAlgorithm | - | ||||||
| 321 | ) | - | ||||||
| 322 | , "contentEncryptionAlgorithm", (&(X509_ALGOR_it)) }, | - | ||||||
| 323 | { (((0x1 << 3)|(0x2<<6)) | ((0x1))), (0), | - | ||||||
| 324 | __builtin_offsetof ( | - | ||||||
| 325 | CMS_EncryptedContentInfo | - | ||||||
| 326 | , | - | ||||||
| 327 | encryptedContent | - | ||||||
| 328 | ) | - | ||||||
| 329 | , "encryptedContent", (&(ASN1_OCTET_STRING_NDEF_it)) } | - | ||||||
| 330 | } ; static const ASN1_ITEM CMS_EncryptedContentInfo_it = { 0x6, 16, CMS_EncryptedContentInfo_seq_tt, sizeof(CMS_EncryptedContentInfo_seq_tt) / sizeof(ASN1_TEMPLATE), | - | ||||||
| 331 | ((void *)0) | - | ||||||
| 332 | , sizeof(CMS_EncryptedContentInfo), "CMS_EncryptedContentInfo" }; | - | ||||||
| 333 | - | |||||||
| 334 | static const ASN1_TEMPLATE CMS_KeyTransRecipientInfo_seq_tt[] = { | - | ||||||
| 335 | { ((0x1 << 12)), (0), | - | ||||||
| 336 | __builtin_offsetof ( | - | ||||||
| 337 | CMS_KeyTransRecipientInfo | - | ||||||
| 338 | , | - | ||||||
| 339 | version | - | ||||||
| 340 | ) | - | ||||||
| 341 | , "version", (&(INT32_it)) }, | - | ||||||
| 342 | { (0), (0), | - | ||||||
| 343 | __builtin_offsetof ( | - | ||||||
| 344 | CMS_KeyTransRecipientInfo | - | ||||||
| 345 | , | - | ||||||
| 346 | rid | - | ||||||
| 347 | ) | - | ||||||
| 348 | , "rid", (&(CMS_SignerIdentifier_it)) }, | - | ||||||
| 349 | { (0), (0), | - | ||||||
| 350 | __builtin_offsetof ( | - | ||||||
| 351 | CMS_KeyTransRecipientInfo | - | ||||||
| 352 | , | - | ||||||
| 353 | keyEncryptionAlgorithm | - | ||||||
| 354 | ) | - | ||||||
| 355 | , "keyEncryptionAlgorithm", (&(X509_ALGOR_it)) }, | - | ||||||
| 356 | { (0), (0), | - | ||||||
| 357 | __builtin_offsetof ( | - | ||||||
| 358 | CMS_KeyTransRecipientInfo | - | ||||||
| 359 | , | - | ||||||
| 360 | encryptedKey | - | ||||||
| 361 | ) | - | ||||||
| 362 | , "encryptedKey", (&(ASN1_OCTET_STRING_it)) } | - | ||||||
| 363 | } ; const ASN1_ITEM CMS_KeyTransRecipientInfo_it = { 0x1, 16, CMS_KeyTransRecipientInfo_seq_tt, sizeof(CMS_KeyTransRecipientInfo_seq_tt) / sizeof(ASN1_TEMPLATE), | - | ||||||
| 364 | ((void *)0) | - | ||||||
| 365 | , sizeof(CMS_KeyTransRecipientInfo), "CMS_KeyTransRecipientInfo" }; | - | ||||||
| 366 | - | |||||||
| 367 | static const ASN1_TEMPLATE CMS_OtherKeyAttribute_seq_tt[] = { | - | ||||||
| 368 | { (0), (0), | - | ||||||
| 369 | __builtin_offsetof ( | - | ||||||
| 370 | CMS_OtherKeyAttribute | - | ||||||
| 371 | , | - | ||||||
| 372 | keyAttrId | - | ||||||
| 373 | ) | - | ||||||
| 374 | , "keyAttrId", (&(ASN1_OBJECT_it)) }, | - | ||||||
| 375 | { ((0x1)), (0), | - | ||||||
| 376 | __builtin_offsetof ( | - | ||||||
| 377 | CMS_OtherKeyAttribute | - | ||||||
| 378 | , | - | ||||||
| 379 | keyAttr | - | ||||||
| 380 | ) | - | ||||||
| 381 | , "keyAttr", (&(ASN1_ANY_it)) } | - | ||||||
| 382 | } ; const ASN1_ITEM CMS_OtherKeyAttribute_it = { 0x1, 16, CMS_OtherKeyAttribute_seq_tt, sizeof(CMS_OtherKeyAttribute_seq_tt) / sizeof(ASN1_TEMPLATE), | - | ||||||
| 383 | ((void *)0) | - | ||||||
| 384 | , sizeof(CMS_OtherKeyAttribute), "CMS_OtherKeyAttribute" }; | - | ||||||
| 385 | - | |||||||
| 386 | static const ASN1_TEMPLATE CMS_RecipientKeyIdentifier_seq_tt[] = { | - | ||||||
| 387 | { (0), (0), | - | ||||||
| 388 | __builtin_offsetof ( | - | ||||||
| 389 | CMS_RecipientKeyIdentifier | - | ||||||
| 390 | , | - | ||||||
| 391 | subjectKeyIdentifier | - | ||||||
| 392 | ) | - | ||||||
| 393 | , "subjectKeyIdentifier", (&(ASN1_OCTET_STRING_it)) }, | - | ||||||
| 394 | { ((0x1)), (0), | - | ||||||
| 395 | __builtin_offsetof ( | - | ||||||
| 396 | CMS_RecipientKeyIdentifier | - | ||||||
| 397 | , | - | ||||||
| 398 | date | - | ||||||
| 399 | ) | - | ||||||
| 400 | , "date", (&(ASN1_GENERALIZEDTIME_it)) }, | - | ||||||
| 401 | { ((0x1)), (0), | - | ||||||
| 402 | __builtin_offsetof ( | - | ||||||
| 403 | CMS_RecipientKeyIdentifier | - | ||||||
| 404 | , | - | ||||||
| 405 | other | - | ||||||
| 406 | ) | - | ||||||
| 407 | , "other", (&(CMS_OtherKeyAttribute_it)) } | - | ||||||
| 408 | } ; const ASN1_ITEM CMS_RecipientKeyIdentifier_it = { 0x1, 16, CMS_RecipientKeyIdentifier_seq_tt, sizeof(CMS_RecipientKeyIdentifier_seq_tt) / sizeof(ASN1_TEMPLATE), | - | ||||||
| 409 | ((void *)0) | - | ||||||
| 410 | , sizeof(CMS_RecipientKeyIdentifier), "CMS_RecipientKeyIdentifier" }; | - | ||||||
| 411 | - | |||||||
| 412 | static const ASN1_TEMPLATE CMS_KeyAgreeRecipientIdentifier_ch_tt[] = { | - | ||||||
| 413 | { (0), (0), | - | ||||||
| 414 | __builtin_offsetof ( | - | ||||||
| 415 | CMS_KeyAgreeRecipientIdentifier | - | ||||||
| 416 | , | - | ||||||
| 417 | d.issuerAndSerialNumber | - | ||||||
| 418 | ) | - | ||||||
| 419 | , "d.issuerAndSerialNumber", (&(CMS_IssuerAndSerialNumber_it)) }, | - | ||||||
| 420 | { (((0x1 << 3)|(0x2<<6)) | (0)), (0), | - | ||||||
| 421 | __builtin_offsetof ( | - | ||||||
| 422 | CMS_KeyAgreeRecipientIdentifier | - | ||||||
| 423 | , | - | ||||||
| 424 | d.rKeyId | - | ||||||
| 425 | ) | - | ||||||
| 426 | , "d.rKeyId", (&(CMS_RecipientKeyIdentifier_it)) } | - | ||||||
| 427 | } ; static const ASN1_ITEM CMS_KeyAgreeRecipientIdentifier_it = { 0x2, | - | ||||||
| 428 | __builtin_offsetof ( | - | ||||||
| 429 | CMS_KeyAgreeRecipientIdentifier | - | ||||||
| 430 | , | - | ||||||
| 431 | type | - | ||||||
| 432 | ) | - | ||||||
| 433 | , CMS_KeyAgreeRecipientIdentifier_ch_tt, sizeof(CMS_KeyAgreeRecipientIdentifier_ch_tt) / sizeof(ASN1_TEMPLATE), | - | ||||||
| 434 | ((void *)0) | - | ||||||
| 435 | , sizeof(CMS_KeyAgreeRecipientIdentifier), "CMS_KeyAgreeRecipientIdentifier" }; | - | ||||||
| 436 | - | |||||||
| 437 | static int cms_rek_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, | - | ||||||
| 438 | void *exarg) | - | ||||||
| 439 | { | - | ||||||
| 440 | CMS_RecipientEncryptedKey *rek = (CMS_RecipientEncryptedKey *)*pval; | - | ||||||
| 441 | if (operation == 3
| 1044-5310 | ||||||
| 442 | EVP_PKEY_free(rek->pkey); | - | ||||||
| 443 | } executed 1044 times by 1 test: end of blockExecuted by:
| 1044 | ||||||
| 444 | return executed 6354 times by 1 test: 1;return 1;Executed by:
executed 6354 times by 1 test: return 1;Executed by:
| 6354 | ||||||
| 445 | } | - | ||||||
| 446 | - | |||||||
| 447 | static const ASN1_AUX CMS_RecipientEncryptedKey_aux = { | - | ||||||
| 448 | ((void *)0) | - | ||||||
| 449 | , 0, 0, 0, cms_rek_cb, 0}; static const ASN1_TEMPLATE CMS_RecipientEncryptedKey_seq_tt[] = { | - | ||||||
| 450 | { (0), (0), | - | ||||||
| 451 | __builtin_offsetof ( | - | ||||||
| 452 | CMS_RecipientEncryptedKey | - | ||||||
| 453 | , | - | ||||||
| 454 | rid | - | ||||||
| 455 | ) | - | ||||||
| 456 | , "rid", (&(CMS_KeyAgreeRecipientIdentifier_it)) }, | - | ||||||
| 457 | { (0), (0), | - | ||||||
| 458 | __builtin_offsetof ( | - | ||||||
| 459 | CMS_RecipientEncryptedKey | - | ||||||
| 460 | , | - | ||||||
| 461 | encryptedKey | - | ||||||
| 462 | ) | - | ||||||
| 463 | , "encryptedKey", (&(ASN1_OCTET_STRING_it)) } | - | ||||||
| 464 | } ; const ASN1_ITEM CMS_RecipientEncryptedKey_it = { 0x1, 16, CMS_RecipientEncryptedKey_seq_tt, sizeof(CMS_RecipientEncryptedKey_seq_tt) / sizeof(ASN1_TEMPLATE), &CMS_RecipientEncryptedKey_aux, sizeof(CMS_RecipientEncryptedKey), "CMS_RecipientEncryptedKey" }; | - | ||||||
| 465 | - | |||||||
| 466 | static const ASN1_TEMPLATE CMS_OriginatorPublicKey_seq_tt[] = { | - | ||||||
| 467 | { (0), (0), | - | ||||||
| 468 | __builtin_offsetof ( | - | ||||||
| 469 | CMS_OriginatorPublicKey | - | ||||||
| 470 | , | - | ||||||
| 471 | algorithm | - | ||||||
| 472 | ) | - | ||||||
| 473 | , "algorithm", (&(X509_ALGOR_it)) }, | - | ||||||
| 474 | { (0), (0), | - | ||||||
| 475 | __builtin_offsetof ( | - | ||||||
| 476 | CMS_OriginatorPublicKey | - | ||||||
| 477 | , | - | ||||||
| 478 | publicKey | - | ||||||
| 479 | ) | - | ||||||
| 480 | , "publicKey", (&(ASN1_BIT_STRING_it)) } | - | ||||||
| 481 | } ; const ASN1_ITEM CMS_OriginatorPublicKey_it = { 0x1, 16, CMS_OriginatorPublicKey_seq_tt, sizeof(CMS_OriginatorPublicKey_seq_tt) / sizeof(ASN1_TEMPLATE), | - | ||||||
| 482 | ((void *)0) | - | ||||||
| 483 | , sizeof(CMS_OriginatorPublicKey), "CMS_OriginatorPublicKey" }; | - | ||||||
| 484 | - | |||||||
| 485 | static const ASN1_TEMPLATE CMS_OriginatorIdentifierOrKey_ch_tt[] = { | - | ||||||
| 486 | { (0), (0), | - | ||||||
| 487 | __builtin_offsetof ( | - | ||||||
| 488 | CMS_OriginatorIdentifierOrKey | - | ||||||
| 489 | , | - | ||||||
| 490 | d.issuerAndSerialNumber | - | ||||||
| 491 | ) | - | ||||||
| 492 | , "d.issuerAndSerialNumber", (&(CMS_IssuerAndSerialNumber_it)) }, | - | ||||||
| 493 | { (((0x1 << 3)|(0x2<<6)) | (0)), (0), | - | ||||||
| 494 | __builtin_offsetof ( | - | ||||||
| 495 | CMS_OriginatorIdentifierOrKey | - | ||||||
| 496 | , | - | ||||||
| 497 | d.subjectKeyIdentifier | - | ||||||
| 498 | ) | - | ||||||
| 499 | , "d.subjectKeyIdentifier", (&(ASN1_OCTET_STRING_it)) }, | - | ||||||
| 500 | { (((0x1 << 3)|(0x2<<6)) | (0)), (1), | - | ||||||
| 501 | __builtin_offsetof ( | - | ||||||
| 502 | CMS_OriginatorIdentifierOrKey | - | ||||||
| 503 | , | - | ||||||
| 504 | d.originatorKey | - | ||||||
| 505 | ) | - | ||||||
| 506 | , "d.originatorKey", (&(CMS_OriginatorPublicKey_it)) } | - | ||||||
| 507 | } ; static const ASN1_ITEM CMS_OriginatorIdentifierOrKey_it = { 0x2, | - | ||||||
| 508 | __builtin_offsetof ( | - | ||||||
| 509 | CMS_OriginatorIdentifierOrKey | - | ||||||
| 510 | , | - | ||||||
| 511 | type | - | ||||||
| 512 | ) | - | ||||||
| 513 | , CMS_OriginatorIdentifierOrKey_ch_tt, sizeof(CMS_OriginatorIdentifierOrKey_ch_tt) / sizeof(ASN1_TEMPLATE), | - | ||||||
| 514 | ((void *)0) | - | ||||||
| 515 | , sizeof(CMS_OriginatorIdentifierOrKey), "CMS_OriginatorIdentifierOrKey" }; | - | ||||||
| 516 | - | |||||||
| 517 | static int cms_kari_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, | - | ||||||
| 518 | void *exarg) | - | ||||||
| 519 | { | - | ||||||
| 520 | CMS_KeyAgreeRecipientInfo *kari = (CMS_KeyAgreeRecipientInfo *)*pval; | - | ||||||
| 521 | if (operation == 1
| 2185-21724 | ||||||
| 522 | kari->ctx = EVP_CIPHER_CTX_new(); | - | ||||||
| 523 | if (kari->ctx ==
| 0-2185 | ||||||
| 524 | ((void *)0)
| 0-2185 | ||||||
| 525 | ) | - | ||||||
| 526 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||
| 527 | EVP_CIPHER_CTX_set_flags(kari->ctx, 0x1); | - | ||||||
| 528 | kari->pctx = | - | ||||||
| 529 | ((void *)0) | - | ||||||
| 530 | ; | - | ||||||
| 531 | } executed 2185 times by 1 test: else if (operation == 3end of blockExecuted by:
| 2185-19539 | ||||||
| 532 | EVP_PKEY_CTX_free(kari->pctx); | - | ||||||
| 533 | EVP_CIPHER_CTX_free(kari->ctx); | - | ||||||
| 534 | } executed 2185 times by 1 test: end of blockExecuted by:
| 2185 | ||||||
| 535 | return executed 23909 times by 1 test: 1;return 1;Executed by:
executed 23909 times by 1 test: return 1;Executed by:
| 23909 | ||||||
| 536 | } | - | ||||||
| 537 | - | |||||||
| 538 | static const ASN1_AUX CMS_KeyAgreeRecipientInfo_aux = { | - | ||||||
| 539 | ((void *)0) | - | ||||||
| 540 | , 0, 0, 0, cms_kari_cb, 0}; static const ASN1_TEMPLATE CMS_KeyAgreeRecipientInfo_seq_tt[] = { | - | ||||||
| 541 | { ((0x1 << 12)), (0), | - | ||||||
| 542 | __builtin_offsetof ( | - | ||||||
| 543 | CMS_KeyAgreeRecipientInfo | - | ||||||
| 544 | , | - | ||||||
| 545 | version | - | ||||||
| 546 | ) | - | ||||||
| 547 | , "version", (&(INT32_it)) }, | - | ||||||
| 548 | { (((0x2 << 3)|(0x2<<6)) | (0)), (0), | - | ||||||
| 549 | __builtin_offsetof ( | - | ||||||
| 550 | CMS_KeyAgreeRecipientInfo | - | ||||||
| 551 | , | - | ||||||
| 552 | originator | - | ||||||
| 553 | ) | - | ||||||
| 554 | , "originator", (&(CMS_OriginatorIdentifierOrKey_it)) }, | - | ||||||
| 555 | { (((0x2 << 3)|(0x2<<6)) | ((0x1))), (1), | - | ||||||
| 556 | __builtin_offsetof ( | - | ||||||
| 557 | CMS_KeyAgreeRecipientInfo | - | ||||||
| 558 | , | - | ||||||
| 559 | ukm | - | ||||||
| 560 | ) | - | ||||||
| 561 | , "ukm", (&(ASN1_OCTET_STRING_it)) }, | - | ||||||
| 562 | { (0), (0), | - | ||||||
| 563 | __builtin_offsetof ( | - | ||||||
| 564 | CMS_KeyAgreeRecipientInfo | - | ||||||
| 565 | , | - | ||||||
| 566 | keyEncryptionAlgorithm | - | ||||||
| 567 | ) | - | ||||||
| 568 | , "keyEncryptionAlgorithm", (&(X509_ALGOR_it)) }, | - | ||||||
| 569 | { ((0x2 << 1)), (0), | - | ||||||
| 570 | __builtin_offsetof ( | - | ||||||
| 571 | CMS_KeyAgreeRecipientInfo | - | ||||||
| 572 | , | - | ||||||
| 573 | recipientEncryptedKeys | - | ||||||
| 574 | ) | - | ||||||
| 575 | , "recipientEncryptedKeys", (&(CMS_RecipientEncryptedKey_it)) } | - | ||||||
| 576 | } ; const ASN1_ITEM CMS_KeyAgreeRecipientInfo_it = { 0x1, 16, CMS_KeyAgreeRecipientInfo_seq_tt, sizeof(CMS_KeyAgreeRecipientInfo_seq_tt) / sizeof(ASN1_TEMPLATE), &CMS_KeyAgreeRecipientInfo_aux, sizeof(CMS_KeyAgreeRecipientInfo), "CMS_KeyAgreeRecipientInfo" }; | - | ||||||
| 577 | - | |||||||
| 578 | static const ASN1_TEMPLATE CMS_KEKIdentifier_seq_tt[] = { | - | ||||||
| 579 | { (0), (0), | - | ||||||
| 580 | __builtin_offsetof ( | - | ||||||
| 581 | CMS_KEKIdentifier | - | ||||||
| 582 | , | - | ||||||
| 583 | keyIdentifier | - | ||||||
| 584 | ) | - | ||||||
| 585 | , "keyIdentifier", (&(ASN1_OCTET_STRING_it)) }, | - | ||||||
| 586 | { ((0x1)), (0), | - | ||||||
| 587 | __builtin_offsetof ( | - | ||||||
| 588 | CMS_KEKIdentifier | - | ||||||
| 589 | , | - | ||||||
| 590 | date | - | ||||||
| 591 | ) | - | ||||||
| 592 | , "date", (&(ASN1_GENERALIZEDTIME_it)) }, | - | ||||||
| 593 | { ((0x1)), (0), | - | ||||||
| 594 | __builtin_offsetof ( | - | ||||||
| 595 | CMS_KEKIdentifier | - | ||||||
| 596 | , | - | ||||||
| 597 | other | - | ||||||
| 598 | ) | - | ||||||
| 599 | , "other", (&(CMS_OtherKeyAttribute_it)) } | - | ||||||
| 600 | } ; static const ASN1_ITEM CMS_KEKIdentifier_it = { 0x1, 16, CMS_KEKIdentifier_seq_tt, sizeof(CMS_KEKIdentifier_seq_tt) / sizeof(ASN1_TEMPLATE), | - | ||||||
| 601 | ((void *)0) | - | ||||||
| 602 | , sizeof(CMS_KEKIdentifier), "CMS_KEKIdentifier" }; | - | ||||||
| 603 | - | |||||||
| 604 | static const ASN1_TEMPLATE CMS_KEKRecipientInfo_seq_tt[] = { | - | ||||||
| 605 | { ((0x1 << 12)), (0), | - | ||||||
| 606 | __builtin_offsetof ( | - | ||||||
| 607 | CMS_KEKRecipientInfo | - | ||||||
| 608 | , | - | ||||||
| 609 | version | - | ||||||
| 610 | ) | - | ||||||
| 611 | , "version", (&(INT32_it)) }, | - | ||||||
| 612 | { (0), (0), | - | ||||||
| 613 | __builtin_offsetof ( | - | ||||||
| 614 | CMS_KEKRecipientInfo | - | ||||||
| 615 | , | - | ||||||
| 616 | kekid | - | ||||||
| 617 | ) | - | ||||||
| 618 | , "kekid", (&(CMS_KEKIdentifier_it)) }, | - | ||||||
| 619 | { (0), (0), | - | ||||||
| 620 | __builtin_offsetof ( | - | ||||||
| 621 | CMS_KEKRecipientInfo | - | ||||||
| 622 | , | - | ||||||
| 623 | keyEncryptionAlgorithm | - | ||||||
| 624 | ) | - | ||||||
| 625 | , "keyEncryptionAlgorithm", (&(X509_ALGOR_it)) }, | - | ||||||
| 626 | { (0), (0), | - | ||||||
| 627 | __builtin_offsetof ( | - | ||||||
| 628 | CMS_KEKRecipientInfo | - | ||||||
| 629 | , | - | ||||||
| 630 | encryptedKey | - | ||||||
| 631 | ) | - | ||||||
| 632 | , "encryptedKey", (&(ASN1_OCTET_STRING_it)) } | - | ||||||
| 633 | } ; const ASN1_ITEM CMS_KEKRecipientInfo_it = { 0x1, 16, CMS_KEKRecipientInfo_seq_tt, sizeof(CMS_KEKRecipientInfo_seq_tt) / sizeof(ASN1_TEMPLATE), | - | ||||||
| 634 | ((void *)0) | - | ||||||
| 635 | , sizeof(CMS_KEKRecipientInfo), "CMS_KEKRecipientInfo" }; | - | ||||||
| 636 | - | |||||||
| 637 | static const ASN1_TEMPLATE CMS_PasswordRecipientInfo_seq_tt[] = { | - | ||||||
| 638 | { ((0x1 << 12)), (0), | - | ||||||
| 639 | __builtin_offsetof ( | - | ||||||
| 640 | CMS_PasswordRecipientInfo | - | ||||||
| 641 | , | - | ||||||
| 642 | version | - | ||||||
| 643 | ) | - | ||||||
| 644 | , "version", (&(INT32_it)) }, | - | ||||||
| 645 | { (((0x1 << 3)|(0x2<<6)) | ((0x1))), (0), | - | ||||||
| 646 | __builtin_offsetof ( | - | ||||||
| 647 | CMS_PasswordRecipientInfo | - | ||||||
| 648 | , | - | ||||||
| 649 | keyDerivationAlgorithm | - | ||||||
| 650 | ) | - | ||||||
| 651 | , "keyDerivationAlgorithm", (&(X509_ALGOR_it)) }, | - | ||||||
| 652 | { (0), (0), | - | ||||||
| 653 | __builtin_offsetof ( | - | ||||||
| 654 | CMS_PasswordRecipientInfo | - | ||||||
| 655 | , | - | ||||||
| 656 | keyEncryptionAlgorithm | - | ||||||
| 657 | ) | - | ||||||
| 658 | , "keyEncryptionAlgorithm", (&(X509_ALGOR_it)) }, | - | ||||||
| 659 | { (0), (0), | - | ||||||
| 660 | __builtin_offsetof ( | - | ||||||
| 661 | CMS_PasswordRecipientInfo | - | ||||||
| 662 | , | - | ||||||
| 663 | encryptedKey | - | ||||||
| 664 | ) | - | ||||||
| 665 | , "encryptedKey", (&(ASN1_OCTET_STRING_it)) } | - | ||||||
| 666 | } ; const ASN1_ITEM CMS_PasswordRecipientInfo_it = { 0x1, 16, CMS_PasswordRecipientInfo_seq_tt, sizeof(CMS_PasswordRecipientInfo_seq_tt) / sizeof(ASN1_TEMPLATE), | - | ||||||
| 667 | ((void *)0) | - | ||||||
| 668 | , sizeof(CMS_PasswordRecipientInfo), "CMS_PasswordRecipientInfo" }; | - | ||||||
| 669 | - | |||||||
| 670 | static const ASN1_TEMPLATE CMS_OtherRecipientInfo_seq_tt[] = { | - | ||||||
| 671 | { (0), (0), | - | ||||||
| 672 | __builtin_offsetof ( | - | ||||||
| 673 | CMS_OtherRecipientInfo | - | ||||||
| 674 | , | - | ||||||
| 675 | oriType | - | ||||||
| 676 | ) | - | ||||||
| 677 | , "oriType", (&(ASN1_OBJECT_it)) }, | - | ||||||
| 678 | { ((0x1)), (0), | - | ||||||
| 679 | __builtin_offsetof ( | - | ||||||
| 680 | CMS_OtherRecipientInfo | - | ||||||
| 681 | , | - | ||||||
| 682 | oriValue | - | ||||||
| 683 | ) | - | ||||||
| 684 | , "oriValue", (&(ASN1_ANY_it)) } | - | ||||||
| 685 | } ; static const ASN1_ITEM CMS_OtherRecipientInfo_it = { 0x1, 16, CMS_OtherRecipientInfo_seq_tt, sizeof(CMS_OtherRecipientInfo_seq_tt) / sizeof(ASN1_TEMPLATE), | - | ||||||
| 686 | ((void *)0) | - | ||||||
| 687 | , sizeof(CMS_OtherRecipientInfo), "CMS_OtherRecipientInfo" }; | - | ||||||
| 688 | - | |||||||
| 689 | - | |||||||
| 690 | static int cms_ri_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, | - | ||||||
| 691 | void *exarg) | - | ||||||
| 692 | { | - | ||||||
| 693 | if (operation == 2
| 10183-80416 | ||||||
| 694 | CMS_RecipientInfo *ri = (CMS_RecipientInfo *)*pval; | - | ||||||
| 695 | if (ri->type == 0
| 809-9374 | ||||||
| 696 | CMS_KeyTransRecipientInfo *ktri = ri->d.ktri; | - | ||||||
| 697 | EVP_PKEY_free(ktri->pkey); | - | ||||||
| 698 | X509_free(ktri->recip); | - | ||||||
| 699 | EVP_PKEY_CTX_free(ktri->pctx); | - | ||||||
| 700 | } executed 809 times by 1 test: else if (ri->type == 2end of blockExecuted by:
| 638-8736 | ||||||
| 701 | CMS_KEKRecipientInfo *kekri = ri->d.kekri; | - | ||||||
| 702 | CRYPTO_clear_free(kekri->key, kekri->keylen, __FILE__, 210); | - | ||||||
| 703 | } executed 638 times by 1 test: else if (ri->type == 3end of blockExecuted by:
| 638-4663 | ||||||
| 704 | CMS_PasswordRecipientInfo *pwri = ri->d.pwri; | - | ||||||
| 705 | CRYPTO_clear_free(pwri->pass, pwri->passlen, __FILE__, 213); | - | ||||||
| 706 | } executed 4073 times by 1 test: end of blockExecuted by:
| 4073 | ||||||
| 707 | } executed 10183 times by 1 test: end of blockExecuted by:
| 10183 | ||||||
| 708 | return executed 90599 times by 1 test: 1;return 1;Executed by:
executed 90599 times by 1 test: return 1;Executed by:
| 90599 | ||||||
| 709 | } | - | ||||||
| 710 | - | |||||||
| 711 | static const ASN1_AUX CMS_RecipientInfo_aux = { | - | ||||||
| 712 | ((void *)0) | - | ||||||
| 713 | , 0, 0, 0, cms_ri_cb, 0}; static const ASN1_TEMPLATE CMS_RecipientInfo_ch_tt[] = { | - | ||||||
| 714 | { (0), (0), | - | ||||||
| 715 | __builtin_offsetof ( | - | ||||||
| 716 | CMS_RecipientInfo | - | ||||||
| 717 | , | - | ||||||
| 718 | d.ktri | - | ||||||
| 719 | ) | - | ||||||
| 720 | , "d.ktri", (&(CMS_KeyTransRecipientInfo_it)) }, | - | ||||||
| 721 | { (((0x1 << 3)|(0x2<<6)) | (0)), (1), | - | ||||||
| 722 | __builtin_offsetof ( | - | ||||||
| 723 | CMS_RecipientInfo | - | ||||||
| 724 | , | - | ||||||
| 725 | d.kari | - | ||||||
| 726 | ) | - | ||||||
| 727 | , "d.kari", (&(CMS_KeyAgreeRecipientInfo_it)) }, | - | ||||||
| 728 | { (((0x1 << 3)|(0x2<<6)) | (0)), (2), | - | ||||||
| 729 | __builtin_offsetof ( | - | ||||||
| 730 | CMS_RecipientInfo | - | ||||||
| 731 | , | - | ||||||
| 732 | d.kekri | - | ||||||
| 733 | ) | - | ||||||
| 734 | , "d.kekri", (&(CMS_KEKRecipientInfo_it)) }, | - | ||||||
| 735 | { (((0x1 << 3)|(0x2<<6)) | (0)), (3), | - | ||||||
| 736 | __builtin_offsetof ( | - | ||||||
| 737 | CMS_RecipientInfo | - | ||||||
| 738 | , | - | ||||||
| 739 | d.pwri | - | ||||||
| 740 | ) | - | ||||||
| 741 | , "d.pwri", (&(CMS_PasswordRecipientInfo_it)) }, | - | ||||||
| 742 | { (((0x1 << 3)|(0x2<<6)) | (0)), (4), | - | ||||||
| 743 | __builtin_offsetof ( | - | ||||||
| 744 | CMS_RecipientInfo | - | ||||||
| 745 | , | - | ||||||
| 746 | d.ori | - | ||||||
| 747 | ) | - | ||||||
| 748 | , "d.ori", (&(CMS_OtherRecipientInfo_it)) } | - | ||||||
| 749 | } ; const ASN1_ITEM CMS_RecipientInfo_it = { 0x2, | - | ||||||
| 750 | __builtin_offsetof ( | - | ||||||
| 751 | CMS_RecipientInfo | - | ||||||
| 752 | , | - | ||||||
| 753 | type | - | ||||||
| 754 | ) | - | ||||||
| 755 | , CMS_RecipientInfo_ch_tt, sizeof(CMS_RecipientInfo_ch_tt) / sizeof(ASN1_TEMPLATE), &CMS_RecipientInfo_aux, sizeof(CMS_RecipientInfo), "CMS_RecipientInfo" }; | - | ||||||
| 756 | - | |||||||
| 757 | static const ASN1_TEMPLATE CMS_EnvelopedData_seq_tt[] = { | - | ||||||
| 758 | { ((0x1 << 12)), (0), | - | ||||||
| 759 | __builtin_offsetof ( | - | ||||||
| 760 | CMS_EnvelopedData | - | ||||||
| 761 | , | - | ||||||
| 762 | version | - | ||||||
| 763 | ) | - | ||||||
| 764 | , "version", (&(INT32_it)) }, | - | ||||||
| 765 | { (((0x1 << 3)|(0x2<<6)) | ((0x1))), (0), | - | ||||||
| 766 | __builtin_offsetof ( | - | ||||||
| 767 | CMS_EnvelopedData | - | ||||||
| 768 | , | - | ||||||
| 769 | originatorInfo | - | ||||||
| 770 | ) | - | ||||||
| 771 | , "originatorInfo", (&(CMS_OriginatorInfo_it)) }, | - | ||||||
| 772 | { ((0x1 << 1)), (0), | - | ||||||
| 773 | __builtin_offsetof ( | - | ||||||
| 774 | CMS_EnvelopedData | - | ||||||
| 775 | , | - | ||||||
| 776 | recipientInfos | - | ||||||
| 777 | ) | - | ||||||
| 778 | , "recipientInfos", (&(CMS_RecipientInfo_it)) }, | - | ||||||
| 779 | { (0), (0), | - | ||||||
| 780 | __builtin_offsetof ( | - | ||||||
| 781 | CMS_EnvelopedData | - | ||||||
| 782 | , | - | ||||||
| 783 | encryptedContentInfo | - | ||||||
| 784 | ) | - | ||||||
| 785 | , "encryptedContentInfo", (&(CMS_EncryptedContentInfo_it)) }, | - | ||||||
| 786 | { (((0x1 << 3)|(0x2<<6)) | ((0x1 << 1)|(0x1))), (1), | - | ||||||
| 787 | __builtin_offsetof ( | - | ||||||
| 788 | CMS_EnvelopedData | - | ||||||
| 789 | , | - | ||||||
| 790 | unprotectedAttrs | - | ||||||
| 791 | ) | - | ||||||
| 792 | , "unprotectedAttrs", (&(X509_ATTRIBUTE_it)) } | - | ||||||
| 793 | } ; const ASN1_ITEM CMS_EnvelopedData_it = { 0x6, 16, CMS_EnvelopedData_seq_tt, sizeof(CMS_EnvelopedData_seq_tt) / sizeof(ASN1_TEMPLATE), | - | ||||||
| 794 | ((void *)0) | - | ||||||
| 795 | , sizeof(CMS_EnvelopedData), "CMS_EnvelopedData" }; | - | ||||||
| 796 | - | |||||||
| 797 | static const ASN1_TEMPLATE CMS_DigestedData_seq_tt[] = { | - | ||||||
| 798 | { ((0x1 << 12)), (0), | - | ||||||
| 799 | __builtin_offsetof ( | - | ||||||
| 800 | CMS_DigestedData | - | ||||||
| 801 | , | - | ||||||
| 802 | version | - | ||||||
| 803 | ) | - | ||||||
| 804 | , "version", (&(INT32_it)) }, | - | ||||||
| 805 | { (0), (0), | - | ||||||
| 806 | __builtin_offsetof ( | - | ||||||
| 807 | CMS_DigestedData | - | ||||||
| 808 | , | - | ||||||
| 809 | digestAlgorithm | - | ||||||
| 810 | ) | - | ||||||
| 811 | , "digestAlgorithm", (&(X509_ALGOR_it)) }, | - | ||||||
| 812 | { (0), (0), | - | ||||||
| 813 | __builtin_offsetof ( | - | ||||||
| 814 | CMS_DigestedData | - | ||||||
| 815 | , | - | ||||||
| 816 | encapContentInfo | - | ||||||
| 817 | ) | - | ||||||
| 818 | , "encapContentInfo", (&(CMS_EncapsulatedContentInfo_it)) }, | - | ||||||
| 819 | { (0), (0), | - | ||||||
| 820 | __builtin_offsetof ( | - | ||||||
| 821 | CMS_DigestedData | - | ||||||
| 822 | , | - | ||||||
| 823 | digest | - | ||||||
| 824 | ) | - | ||||||
| 825 | , "digest", (&(ASN1_OCTET_STRING_it)) } | - | ||||||
| 826 | } ; const ASN1_ITEM CMS_DigestedData_it = { 0x6, 16, CMS_DigestedData_seq_tt, sizeof(CMS_DigestedData_seq_tt) / sizeof(ASN1_TEMPLATE), | - | ||||||
| 827 | ((void *)0) | - | ||||||
| 828 | , sizeof(CMS_DigestedData), "CMS_DigestedData" }; | - | ||||||
| 829 | - | |||||||
| 830 | static const ASN1_TEMPLATE CMS_EncryptedData_seq_tt[] = { | - | ||||||
| 831 | { ((0x1 << 12)), (0), | - | ||||||
| 832 | __builtin_offsetof ( | - | ||||||
| 833 | CMS_EncryptedData | - | ||||||
| 834 | , | - | ||||||
| 835 | version | - | ||||||
| 836 | ) | - | ||||||
| 837 | , "version", (&(INT32_it)) }, | - | ||||||
| 838 | { (0), (0), | - | ||||||
| 839 | __builtin_offsetof ( | - | ||||||
| 840 | CMS_EncryptedData | - | ||||||
| 841 | , | - | ||||||
| 842 | encryptedContentInfo | - | ||||||
| 843 | ) | - | ||||||
| 844 | , "encryptedContentInfo", (&(CMS_EncryptedContentInfo_it)) }, | - | ||||||
| 845 | { (((0x1 << 3)|(0x2<<6)) | ((0x1 << 1)|(0x1))), (1), | - | ||||||
| 846 | __builtin_offsetof ( | - | ||||||
| 847 | CMS_EncryptedData | - | ||||||
| 848 | , | - | ||||||
| 849 | unprotectedAttrs | - | ||||||
| 850 | ) | - | ||||||
| 851 | , "unprotectedAttrs", (&(X509_ATTRIBUTE_it)) } | - | ||||||
| 852 | } ; const ASN1_ITEM CMS_EncryptedData_it = { 0x6, 16, CMS_EncryptedData_seq_tt, sizeof(CMS_EncryptedData_seq_tt) / sizeof(ASN1_TEMPLATE), | - | ||||||
| 853 | ((void *)0) | - | ||||||
| 854 | , sizeof(CMS_EncryptedData), "CMS_EncryptedData" }; | - | ||||||
| 855 | - | |||||||
| 856 | static const ASN1_TEMPLATE CMS_AuthenticatedData_seq_tt[] = { | - | ||||||
| 857 | { ((0x1 << 12)), (0), | - | ||||||
| 858 | __builtin_offsetof ( | - | ||||||
| 859 | CMS_AuthenticatedData | - | ||||||
| 860 | , | - | ||||||
| 861 | version | - | ||||||
| 862 | ) | - | ||||||
| 863 | , "version", (&(INT32_it)) }, | - | ||||||
| 864 | { (((0x1 << 3)|(0x2<<6)) | ((0x1))), (0), | - | ||||||
| 865 | __builtin_offsetof ( | - | ||||||
| 866 | CMS_AuthenticatedData | - | ||||||
| 867 | , | - | ||||||
| 868 | originatorInfo | - | ||||||
| 869 | ) | - | ||||||
| 870 | , "originatorInfo", (&(CMS_OriginatorInfo_it)) }, | - | ||||||
| 871 | { ((0x1 << 1)), (0), | - | ||||||
| 872 | __builtin_offsetof ( | - | ||||||
| 873 | CMS_AuthenticatedData | - | ||||||
| 874 | , | - | ||||||
| 875 | recipientInfos | - | ||||||
| 876 | ) | - | ||||||
| 877 | , "recipientInfos", (&(CMS_RecipientInfo_it)) }, | - | ||||||
| 878 | { (0), (0), | - | ||||||
| 879 | __builtin_offsetof ( | - | ||||||
| 880 | CMS_AuthenticatedData | - | ||||||
| 881 | , | - | ||||||
| 882 | macAlgorithm | - | ||||||
| 883 | ) | - | ||||||
| 884 | , "macAlgorithm", (&(X509_ALGOR_it)) }, | - | ||||||
| 885 | { (((0x1 << 3)|(0x2<<6)) | (0)), (1), | - | ||||||
| 886 | __builtin_offsetof ( | - | ||||||
| 887 | CMS_AuthenticatedData | - | ||||||
| 888 | , | - | ||||||
| 889 | digestAlgorithm | - | ||||||
| 890 | ) | - | ||||||
| 891 | , "digestAlgorithm", (&(X509_ALGOR_it)) }, | - | ||||||
| 892 | { (0), (0), | - | ||||||
| 893 | __builtin_offsetof ( | - | ||||||
| 894 | CMS_AuthenticatedData | - | ||||||
| 895 | , | - | ||||||
| 896 | encapContentInfo | - | ||||||
| 897 | ) | - | ||||||
| 898 | , "encapContentInfo", (&(CMS_EncapsulatedContentInfo_it)) }, | - | ||||||
| 899 | { (((0x1 << 3)|(0x2<<6)) | ((0x1 << 1)|(0x1))), (2), | - | ||||||
| 900 | __builtin_offsetof ( | - | ||||||
| 901 | CMS_AuthenticatedData | - | ||||||
| 902 | , | - | ||||||
| 903 | authAttrs | - | ||||||
| 904 | ) | - | ||||||
| 905 | , "authAttrs", (&(X509_ALGOR_it)) }, | - | ||||||
| 906 | { (0), (0), | - | ||||||
| 907 | __builtin_offsetof ( | - | ||||||
| 908 | CMS_AuthenticatedData | - | ||||||
| 909 | , | - | ||||||
| 910 | mac | - | ||||||
| 911 | ) | - | ||||||
| 912 | , "mac", (&(ASN1_OCTET_STRING_it)) }, | - | ||||||
| 913 | { (((0x1 << 3)|(0x2<<6)) | ((0x1 << 1)|(0x1))), (3), | - | ||||||
| 914 | __builtin_offsetof ( | - | ||||||
| 915 | CMS_AuthenticatedData | - | ||||||
| 916 | , | - | ||||||
| 917 | unauthAttrs | - | ||||||
| 918 | ) | - | ||||||
| 919 | , "unauthAttrs", (&(X509_ALGOR_it)) } | - | ||||||
| 920 | } ; static const ASN1_ITEM CMS_AuthenticatedData_it = { 0x6, 16, CMS_AuthenticatedData_seq_tt, sizeof(CMS_AuthenticatedData_seq_tt) / sizeof(ASN1_TEMPLATE), | - | ||||||
| 921 | ((void *)0) | - | ||||||
| 922 | , sizeof(CMS_AuthenticatedData), "CMS_AuthenticatedData" }; | - | ||||||
| 923 | - | |||||||
| 924 | static const ASN1_TEMPLATE CMS_CompressedData_seq_tt[] = { | - | ||||||
| 925 | { ((0x1 << 12)), (0), | - | ||||||
| 926 | __builtin_offsetof ( | - | ||||||
| 927 | CMS_CompressedData | - | ||||||
| 928 | , | - | ||||||
| 929 | version | - | ||||||
| 930 | ) | - | ||||||
| 931 | , "version", (&(INT32_it)) }, | - | ||||||
| 932 | { (0), (0), | - | ||||||
| 933 | __builtin_offsetof ( | - | ||||||
| 934 | CMS_CompressedData | - | ||||||
| 935 | , | - | ||||||
| 936 | compressionAlgorithm | - | ||||||
| 937 | ) | - | ||||||
| 938 | , "compressionAlgorithm", (&(X509_ALGOR_it)) }, | - | ||||||
| 939 | { (0), (0), | - | ||||||
| 940 | __builtin_offsetof ( | - | ||||||
| 941 | CMS_CompressedData | - | ||||||
| 942 | , | - | ||||||
| 943 | encapContentInfo | - | ||||||
| 944 | ) | - | ||||||
| 945 | , "encapContentInfo", (&(CMS_EncapsulatedContentInfo_it)) }, | - | ||||||
| 946 | } ; const ASN1_ITEM CMS_CompressedData_it = { 0x6, 16, CMS_CompressedData_seq_tt, sizeof(CMS_CompressedData_seq_tt) / sizeof(ASN1_TEMPLATE), | - | ||||||
| 947 | ((void *)0) | - | ||||||
| 948 | , sizeof(CMS_CompressedData), "CMS_CompressedData" }; | - | ||||||
| 949 | - | |||||||
| 950 | - | |||||||
| 951 | - | |||||||
| 952 | static const ASN1_TEMPLATE cms_default_tt = { (((0x2 << 3)|(0x2<<6)) | (0)), (0), | - | ||||||
| 953 | __builtin_offsetof ( | - | ||||||
| 954 | CMS_ContentInfo | - | ||||||
| 955 | , | - | ||||||
| 956 | d.other | - | ||||||
| 957 | ) | - | ||||||
| 958 | , "d.other", (&(ASN1_ANY_it)) }; | - | ||||||
| 959 | - | |||||||
| 960 | static const ASN1_ADB_TABLE CMS_ContentInfo_adbtbl[] = { | - | ||||||
| 961 | {21, { (((0x2 << 3)|(0x2<<6)) | ((0x1<<11))), (0), | - | ||||||
| 962 | __builtin_offsetof ( | - | ||||||
| 963 | CMS_ContentInfo | - | ||||||
| 964 | , | - | ||||||
| 965 | d.data | - | ||||||
| 966 | ) | - | ||||||
| 967 | , "d.data", (&(ASN1_OCTET_STRING_NDEF_it)) }}, | - | ||||||
| 968 | {22, { (((0x2 << 3)|(0x2<<6)) | ((0x1<<11))), (0), | - | ||||||
| 969 | __builtin_offsetof ( | - | ||||||
| 970 | CMS_ContentInfo | - | ||||||
| 971 | , | - | ||||||
| 972 | d.signedData | - | ||||||
| 973 | ) | - | ||||||
| 974 | , "d.signedData", (&(CMS_SignedData_it)) }}, | - | ||||||
| 975 | {23, { (((0x2 << 3)|(0x2<<6)) | ((0x1<<11))), (0), | - | ||||||
| 976 | __builtin_offsetof ( | - | ||||||
| 977 | CMS_ContentInfo | - | ||||||
| 978 | , | - | ||||||
| 979 | d.envelopedData | - | ||||||
| 980 | ) | - | ||||||
| 981 | , "d.envelopedData", (&(CMS_EnvelopedData_it)) }}, | - | ||||||
| 982 | {25, { (((0x2 << 3)|(0x2<<6)) | ((0x1<<11))), (0), | - | ||||||
| 983 | __builtin_offsetof ( | - | ||||||
| 984 | CMS_ContentInfo | - | ||||||
| 985 | , | - | ||||||
| 986 | d.digestedData | - | ||||||
| 987 | ) | - | ||||||
| 988 | , "d.digestedData", (&(CMS_DigestedData_it)) }}, | - | ||||||
| 989 | {26, { (((0x2 << 3)|(0x2<<6)) | ((0x1<<11))), (0), | - | ||||||
| 990 | __builtin_offsetof ( | - | ||||||
| 991 | CMS_ContentInfo | - | ||||||
| 992 | , | - | ||||||
| 993 | d.encryptedData | - | ||||||
| 994 | ) | - | ||||||
| 995 | , "d.encryptedData", (&(CMS_EncryptedData_it)) }}, | - | ||||||
| 996 | {205, { (((0x2 << 3)|(0x2<<6)) | ((0x1<<11))), (0), | - | ||||||
| 997 | __builtin_offsetof ( | - | ||||||
| 998 | CMS_ContentInfo | - | ||||||
| 999 | , | - | ||||||
| 1000 | d.authenticatedData | - | ||||||
| 1001 | ) | - | ||||||
| 1002 | , "d.authenticatedData", (&(CMS_AuthenticatedData_it)) }}, | - | ||||||
| 1003 | {786, { (((0x2 << 3)|(0x2<<6)) | ((0x1<<11))), (0), | - | ||||||
| 1004 | __builtin_offsetof ( | - | ||||||
| 1005 | CMS_ContentInfo | - | ||||||
| 1006 | , | - | ||||||
| 1007 | d.compressedData | - | ||||||
| 1008 | ) | - | ||||||
| 1009 | , "d.compressedData", (&(CMS_CompressedData_it)) }}, | - | ||||||
| 1010 | } ; static const ASN1_ADB CMS_ContentInfo_adb = { 0, | - | ||||||
| 1011 | __builtin_offsetof ( | - | ||||||
| 1012 | CMS_ContentInfo | - | ||||||
| 1013 | , | - | ||||||
| 1014 | contentType | - | ||||||
| 1015 | ) | - | ||||||
| 1016 | , 0, CMS_ContentInfo_adbtbl, sizeof(CMS_ContentInfo_adbtbl) / sizeof(ASN1_ADB_TABLE), &cms_default_tt, | - | ||||||
| 1017 | ((void *)0) | - | ||||||
| 1018 | }; | - | ||||||
| 1019 | - | |||||||
| 1020 | - | |||||||
| 1021 | static int cms_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, | - | ||||||
| 1022 | void *exarg) | - | ||||||
| 1023 | { | - | ||||||
| 1024 | ASN1_STREAM_ARG *sarg = exarg; | - | ||||||
| 1025 | CMS_ContentInfo *cms = | - | ||||||
| 1026 | ((void *)0) | - | ||||||
| 1027 | ; | - | ||||||
| 1028 | if (pval
| 0-24507 | ||||||
| 1029 | cms = (CMS_ContentInfo *)*pval; executed 24507 times by 1 test: cms = (CMS_ContentInfo *)*pval;Executed by:
| 24507 | ||||||
| 1030 | else | - | ||||||
| 1031 | return never executed: 1;return 1;never executed: return 1; | 0 | ||||||
| 1032 | switch (operation) { | - | ||||||
| 1033 | - | |||||||
| 1034 | case executed 36 times by 1 test: 10:case 10:Executed by:
executed 36 times by 1 test: case 10:Executed by:
| 36 | ||||||
| 1035 | if (CMS_stream(&sarg->boundary, cms) <= 0
| 0-36 | ||||||
| 1036 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||
| 1037 | - | |||||||
| 1038 | case executed 4 times by 1 test: 12:case 12:Executed by:
executed 4 times by 1 test: case 12:Executed by:
code before this statement executed 36 times by 1 test: case 12:Executed by:
| 4-36 | ||||||
| 1039 | sarg->ndef_bio = CMS_dataInit(cms, sarg->out); | - | ||||||
| 1040 | if (!sarg->ndef_bio
| 0-40 | ||||||
| 1041 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||
| 1042 | break; executed 40 times by 1 test: break;Executed by:
| 40 | ||||||
| 1043 | - | |||||||
| 1044 | case executed 36 times by 1 test: 11:case 11:Executed by:
executed 36 times by 1 test: case 11:Executed by:
| 36 | ||||||
| 1045 | case executed 4 times by 1 test: 13:case 13:Executed by:
executed 4 times by 1 test: case 13:Executed by:
| 4 | ||||||
| 1046 | if (CMS_dataFinal(cms, sarg->ndef_bio) <= 0
| 0-40 | ||||||
| 1047 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||
| 1048 | break; executed 40 times by 1 test: break;Executed by:
| 40 | ||||||
| 1049 | - | |||||||
| 1050 | } | - | ||||||
| 1051 | return executed 24507 times by 1 test: 1;return 1;Executed by:
executed 24507 times by 1 test: return 1;Executed by:
| 24507 | ||||||
| 1052 | } | - | ||||||
| 1053 | - | |||||||
| 1054 | static const ASN1_AUX CMS_ContentInfo_aux = { | - | ||||||
| 1055 | ((void *)0) | - | ||||||
| 1056 | , 0, 0, 0, cms_cb, 0}; static const ASN1_TEMPLATE CMS_ContentInfo_seq_tt[] = { | - | ||||||
| 1057 | { (0), (0), | - | ||||||
| 1058 | __builtin_offsetof ( | - | ||||||
| 1059 | CMS_ContentInfo | - | ||||||
| 1060 | , | - | ||||||
| 1061 | contentType | - | ||||||
| 1062 | ) | - | ||||||
| 1063 | , "contentType", (&(ASN1_OBJECT_it)) }, | - | ||||||
| 1064 | { (0x1<<8), -1, 0, "CMS_ContentInfo", (const ASN1_ITEM *)&(CMS_ContentInfo_adb) } | - | ||||||
| 1065 | } ; const ASN1_ITEM CMS_ContentInfo_it = { 0x6, 16, CMS_ContentInfo_seq_tt, sizeof(CMS_ContentInfo_seq_tt) / sizeof(ASN1_TEMPLATE), &CMS_ContentInfo_aux, sizeof(CMS_ContentInfo), "CMS_ContentInfo" }; | - | ||||||
| 1066 | static const ASN1_TEMPLATE CMS_Attributes_Sign_item_tt = | - | ||||||
| 1067 | { ((0x3 << 1)), (0), 0, "CMS_ATTRIBUTES", (&(X509_ATTRIBUTE_it)) } | - | ||||||
| 1068 | ; const ASN1_ITEM CMS_Attributes_Sign_it = { 0x0, -1, &CMS_Attributes_Sign_item_tt, 0, | - | ||||||
| 1069 | ((void *)0) | - | ||||||
| 1070 | , 0, "CMS_Attributes_Sign" }; | - | ||||||
| 1071 | - | |||||||
| 1072 | - | |||||||
| 1073 | - | |||||||
| 1074 | - | |||||||
| 1075 | - | |||||||
| 1076 | - | |||||||
| 1077 | static const ASN1_TEMPLATE CMS_Attributes_Verify_item_tt = | - | ||||||
| 1078 | { ((0x2 << 1) | (0x1 << 3) | (0x0<<6)), (17), 0, "CMS_ATTRIBUTES", (&(X509_ATTRIBUTE_it)) } | - | ||||||
| 1079 | - | |||||||
| 1080 | ; const ASN1_ITEM CMS_Attributes_Verify_it = { 0x0, -1, &CMS_Attributes_Verify_item_tt, 0, | - | ||||||
| 1081 | ((void *)0) | - | ||||||
| 1082 | , 0, "CMS_Attributes_Verify" }; | - | ||||||
| 1083 | - | |||||||
| 1084 | - | |||||||
| 1085 | - | |||||||
| 1086 | static const ASN1_TEMPLATE CMS_ReceiptsFrom_ch_tt[] = { | - | ||||||
| 1087 | { (((0x1 << 3)|(0x2<<6)) | ((0x1 << 12))), (0), | - | ||||||
| 1088 | __builtin_offsetof ( | - | ||||||
| 1089 | CMS_ReceiptsFrom | - | ||||||
| 1090 | , | - | ||||||
| 1091 | d.allOrFirstTier | - | ||||||
| 1092 | ) | - | ||||||
| 1093 | , "d.allOrFirstTier", (&(INT32_it)) }, | - | ||||||
| 1094 | { (((0x1 << 3)|(0x2<<6)) | ((0x2 << 1))), (1), | - | ||||||
| 1095 | __builtin_offsetof ( | - | ||||||
| 1096 | CMS_ReceiptsFrom | - | ||||||
| 1097 | , | - | ||||||
| 1098 | d.receiptList | - | ||||||
| 1099 | ) | - | ||||||
| 1100 | , "d.receiptList", (&(GENERAL_NAMES_it)) } | - | ||||||
| 1101 | } ; static const ASN1_ITEM CMS_ReceiptsFrom_it = { 0x2, | - | ||||||
| 1102 | __builtin_offsetof ( | - | ||||||
| 1103 | CMS_ReceiptsFrom | - | ||||||
| 1104 | , | - | ||||||
| 1105 | type | - | ||||||
| 1106 | ) | - | ||||||
| 1107 | , CMS_ReceiptsFrom_ch_tt, sizeof(CMS_ReceiptsFrom_ch_tt) / sizeof(ASN1_TEMPLATE), | - | ||||||
| 1108 | ((void *)0) | - | ||||||
| 1109 | , sizeof(CMS_ReceiptsFrom), "CMS_ReceiptsFrom" }; | - | ||||||
| 1110 | - | |||||||
| 1111 | static const ASN1_TEMPLATE CMS_ReceiptRequest_seq_tt[] = { | - | ||||||
| 1112 | { (0), (0), | - | ||||||
| 1113 | __builtin_offsetof ( | - | ||||||
| 1114 | CMS_ReceiptRequest | - | ||||||
| 1115 | , | - | ||||||
| 1116 | signedContentIdentifier | - | ||||||
| 1117 | ) | - | ||||||
| 1118 | , "signedContentIdentifier", (&(ASN1_OCTET_STRING_it)) }, | - | ||||||
| 1119 | { (0), (0), | - | ||||||
| 1120 | __builtin_offsetof ( | - | ||||||
| 1121 | CMS_ReceiptRequest | - | ||||||
| 1122 | , | - | ||||||
| 1123 | receiptsFrom | - | ||||||
| 1124 | ) | - | ||||||
| 1125 | , "receiptsFrom", (&(CMS_ReceiptsFrom_it)) }, | - | ||||||
| 1126 | { ((0x2 << 1)), (0), | - | ||||||
| 1127 | __builtin_offsetof ( | - | ||||||
| 1128 | CMS_ReceiptRequest | - | ||||||
| 1129 | , | - | ||||||
| 1130 | receiptsTo | - | ||||||
| 1131 | ) | - | ||||||
| 1132 | , "receiptsTo", (&(GENERAL_NAMES_it)) } | - | ||||||
| 1133 | } ; const ASN1_ITEM CMS_ReceiptRequest_it = { 0x1, 16, CMS_ReceiptRequest_seq_tt, sizeof(CMS_ReceiptRequest_seq_tt) / sizeof(ASN1_TEMPLATE), | - | ||||||
| 1134 | ((void *)0) | - | ||||||
| 1135 | , sizeof(CMS_ReceiptRequest), "CMS_ReceiptRequest" }; | - | ||||||
| 1136 | - | |||||||
| 1137 | static const ASN1_TEMPLATE CMS_Receipt_seq_tt[] = { | - | ||||||
| 1138 | { ((0x1 << 12)), (0), | - | ||||||
| 1139 | __builtin_offsetof ( | - | ||||||
| 1140 | CMS_Receipt | - | ||||||
| 1141 | , | - | ||||||
| 1142 | version | - | ||||||
| 1143 | ) | - | ||||||
| 1144 | , "version", (&(INT32_it)) }, | - | ||||||
| 1145 | { (0), (0), | - | ||||||
| 1146 | __builtin_offsetof ( | - | ||||||
| 1147 | CMS_Receipt | - | ||||||
| 1148 | , | - | ||||||
| 1149 | contentType | - | ||||||
| 1150 | ) | - | ||||||
| 1151 | , "contentType", (&(ASN1_OBJECT_it)) }, | - | ||||||
| 1152 | { (0), (0), | - | ||||||
| 1153 | __builtin_offsetof ( | - | ||||||
| 1154 | CMS_Receipt | - | ||||||
| 1155 | , | - | ||||||
| 1156 | signedContentIdentifier | - | ||||||
| 1157 | ) | - | ||||||
| 1158 | , "signedContentIdentifier", (&(ASN1_OCTET_STRING_it)) }, | - | ||||||
| 1159 | { (0), (0), | - | ||||||
| 1160 | __builtin_offsetof ( | - | ||||||
| 1161 | CMS_Receipt | - | ||||||
| 1162 | , | - | ||||||
| 1163 | originatorSignatureValue | - | ||||||
| 1164 | ) | - | ||||||
| 1165 | , "originatorSignatureValue", (&(ASN1_OCTET_STRING_it)) } | - | ||||||
| 1166 | } ; const ASN1_ITEM CMS_Receipt_it = { 0x1, 16, CMS_Receipt_seq_tt, sizeof(CMS_Receipt_seq_tt) / sizeof(ASN1_TEMPLATE), | - | ||||||
| 1167 | ((void *)0) | - | ||||||
| 1168 | , sizeof(CMS_Receipt), "CMS_Receipt" }; | - | ||||||
| 1169 | - | |||||||
| 1170 | - | |||||||
| 1171 | - | |||||||
| 1172 | - | |||||||
| 1173 | - | |||||||
| 1174 | - | |||||||
| 1175 | typedef struct { | - | ||||||
| 1176 | X509_ALGOR *keyInfo; | - | ||||||
| 1177 | ASN1_OCTET_STRING *entityUInfo; | - | ||||||
| 1178 | ASN1_OCTET_STRING *suppPubInfo; | - | ||||||
| 1179 | } CMS_SharedInfo; | - | ||||||
| 1180 | - | |||||||
| 1181 | static const ASN1_TEMPLATE CMS_SharedInfo_seq_tt[] = { | - | ||||||
| 1182 | { (0), (0), | - | ||||||
| 1183 | __builtin_offsetof ( | - | ||||||
| 1184 | CMS_SharedInfo | - | ||||||
| 1185 | , | - | ||||||
| 1186 | keyInfo | - | ||||||
| 1187 | ) | - | ||||||
| 1188 | , "keyInfo", (&(X509_ALGOR_it)) }, | - | ||||||
| 1189 | { (((0x2 << 3)|(0x2<<6)) | ((0x1))), (0), | - | ||||||
| 1190 | __builtin_offsetof ( | - | ||||||
| 1191 | CMS_SharedInfo | - | ||||||
| 1192 | , | - | ||||||
| 1193 | entityUInfo | - | ||||||
| 1194 | ) | - | ||||||
| 1195 | , "entityUInfo", (&(ASN1_OCTET_STRING_it)) }, | - | ||||||
| 1196 | { (((0x2 << 3)|(0x2<<6)) | ((0x1))), (2), | - | ||||||
| 1197 | __builtin_offsetof ( | - | ||||||
| 1198 | CMS_SharedInfo | - | ||||||
| 1199 | , | - | ||||||
| 1200 | suppPubInfo | - | ||||||
| 1201 | ) | - | ||||||
| 1202 | , "suppPubInfo", (&(ASN1_OCTET_STRING_it)) }, | - | ||||||
| 1203 | } ; static const ASN1_ITEM CMS_SharedInfo_it = { 0x1, 16, CMS_SharedInfo_seq_tt, sizeof(CMS_SharedInfo_seq_tt) / sizeof(ASN1_TEMPLATE), | - | ||||||
| 1204 | ((void *)0) | - | ||||||
| 1205 | , sizeof(CMS_SharedInfo), "CMS_SharedInfo" }; | - | ||||||
| 1206 | - | |||||||
| 1207 | int CMS_SharedInfo_encode(unsigned char **pder, X509_ALGOR *kekalg, | - | ||||||
| 1208 | ASN1_OCTET_STRING *ukm, int keylen) | - | ||||||
| 1209 | { | - | ||||||
| 1210 | union { | - | ||||||
| 1211 | CMS_SharedInfo *pecsi; | - | ||||||
| 1212 | ASN1_VALUE *a; | - | ||||||
| 1213 | } intsi = { | - | ||||||
| 1214 | - | |||||||
| 1215 | ((void *)0) | - | ||||||
| 1216 | - | |||||||
| 1217 | }; | - | ||||||
| 1218 | - | |||||||
| 1219 | ASN1_OCTET_STRING oklen; | - | ||||||
| 1220 | unsigned char kl[4]; | - | ||||||
| 1221 | CMS_SharedInfo ecsi; | - | ||||||
| 1222 | - | |||||||
| 1223 | keylen <<= 3; | - | ||||||
| 1224 | kl[0] = (keylen >> 24) & 0xff; | - | ||||||
| 1225 | kl[1] = (keylen >> 16) & 0xff; | - | ||||||
| 1226 | kl[2] = (keylen >> 8) & 0xff; | - | ||||||
| 1227 | kl[3] = keylen & 0xff; | - | ||||||
| 1228 | oklen.length = 4; | - | ||||||
| 1229 | oklen.data = kl; | - | ||||||
| 1230 | oklen.type = 4; | - | ||||||
| 1231 | oklen.flags = 0; | - | ||||||
| 1232 | ecsi.keyInfo = kekalg; | - | ||||||
| 1233 | ecsi.entityUInfo = ukm; | - | ||||||
| 1234 | ecsi.suppPubInfo = &oklen; | - | ||||||
| 1235 | intsi.pecsi = &ecsi; | - | ||||||
| 1236 | return executed 13 times by 1 test: ASN1_item_i2d(intsi.a, pder, (&(CMS_SharedInfo_it)));return ASN1_item_i2d(intsi.a, pder, (&(CMS_SharedInfo_it)));Executed by:
executed 13 times by 1 test: return ASN1_item_i2d(intsi.a, pder, (&(CMS_SharedInfo_it)));Executed by:
| 13 | ||||||
| 1237 | } | - | ||||||
| Switch to Source code | Preprocessed file |