1e1051a39Sopenharmony_ci/*- 2e1051a39Sopenharmony_ci * Copyright 2007-2021 The OpenSSL Project Authors. All Rights Reserved. 3e1051a39Sopenharmony_ci * Copyright Nokia 2007-2019 4e1051a39Sopenharmony_ci * Copyright Siemens AG 2015-2019 5e1051a39Sopenharmony_ci * 6e1051a39Sopenharmony_ci * Licensed under the Apache License 2.0 (the "License"). You may not use 7e1051a39Sopenharmony_ci * this file except in compliance with the License. You can obtain a copy 8e1051a39Sopenharmony_ci * in the file LICENSE in the source distribution or at 9e1051a39Sopenharmony_ci * https://www.openssl.org/source/license.html 10e1051a39Sopenharmony_ci * 11e1051a39Sopenharmony_ci * CRMF implementation by Martin Peylo, Miikka Viljanen, and David von Oheimb. 12e1051a39Sopenharmony_ci */ 13e1051a39Sopenharmony_ci 14e1051a39Sopenharmony_ci#include <openssl/asn1t.h> 15e1051a39Sopenharmony_ci 16e1051a39Sopenharmony_ci#include "crmf_local.h" 17e1051a39Sopenharmony_ci 18e1051a39Sopenharmony_ci/* explicit #includes not strictly needed since implied by the above: */ 19e1051a39Sopenharmony_ci#include <openssl/crmf.h> 20e1051a39Sopenharmony_ci 21e1051a39Sopenharmony_ciASN1_SEQUENCE(OSSL_CRMF_PRIVATEKEYINFO) = { 22e1051a39Sopenharmony_ci ASN1_SIMPLE(OSSL_CRMF_PRIVATEKEYINFO, version, ASN1_INTEGER), 23e1051a39Sopenharmony_ci ASN1_SIMPLE(OSSL_CRMF_PRIVATEKEYINFO, privateKeyAlgorithm, X509_ALGOR), 24e1051a39Sopenharmony_ci ASN1_SIMPLE(OSSL_CRMF_PRIVATEKEYINFO, privateKey, ASN1_OCTET_STRING), 25e1051a39Sopenharmony_ci ASN1_IMP_SET_OF_OPT(OSSL_CRMF_PRIVATEKEYINFO, attributes, X509_ATTRIBUTE, 0) 26e1051a39Sopenharmony_ci} ASN1_SEQUENCE_END(OSSL_CRMF_PRIVATEKEYINFO) 27e1051a39Sopenharmony_ciIMPLEMENT_ASN1_FUNCTIONS(OSSL_CRMF_PRIVATEKEYINFO) 28e1051a39Sopenharmony_ci 29e1051a39Sopenharmony_ci 30e1051a39Sopenharmony_ciASN1_CHOICE(OSSL_CRMF_ENCKEYWITHID_IDENTIFIER) = { 31e1051a39Sopenharmony_ci ASN1_SIMPLE(OSSL_CRMF_ENCKEYWITHID_IDENTIFIER, value.string, ASN1_UTF8STRING), 32e1051a39Sopenharmony_ci ASN1_SIMPLE(OSSL_CRMF_ENCKEYWITHID_IDENTIFIER, value.generalName, GENERAL_NAME) 33e1051a39Sopenharmony_ci} ASN1_CHOICE_END(OSSL_CRMF_ENCKEYWITHID_IDENTIFIER) 34e1051a39Sopenharmony_ciIMPLEMENT_ASN1_FUNCTIONS(OSSL_CRMF_ENCKEYWITHID_IDENTIFIER) 35e1051a39Sopenharmony_ci 36e1051a39Sopenharmony_ci 37e1051a39Sopenharmony_ciASN1_SEQUENCE(OSSL_CRMF_ENCKEYWITHID) = { 38e1051a39Sopenharmony_ci ASN1_SIMPLE(OSSL_CRMF_ENCKEYWITHID, privateKey, OSSL_CRMF_PRIVATEKEYINFO), 39e1051a39Sopenharmony_ci ASN1_OPT(OSSL_CRMF_ENCKEYWITHID, identifier, 40e1051a39Sopenharmony_ci OSSL_CRMF_ENCKEYWITHID_IDENTIFIER) 41e1051a39Sopenharmony_ci} ASN1_SEQUENCE_END(OSSL_CRMF_ENCKEYWITHID) 42e1051a39Sopenharmony_ciIMPLEMENT_ASN1_FUNCTIONS(OSSL_CRMF_ENCKEYWITHID) 43e1051a39Sopenharmony_ci 44e1051a39Sopenharmony_ci 45e1051a39Sopenharmony_ciASN1_SEQUENCE(OSSL_CRMF_CERTID) = { 46e1051a39Sopenharmony_ci ASN1_SIMPLE(OSSL_CRMF_CERTID, issuer, GENERAL_NAME), 47e1051a39Sopenharmony_ci ASN1_SIMPLE(OSSL_CRMF_CERTID, serialNumber, ASN1_INTEGER) 48e1051a39Sopenharmony_ci} ASN1_SEQUENCE_END(OSSL_CRMF_CERTID) 49e1051a39Sopenharmony_ciIMPLEMENT_ASN1_FUNCTIONS(OSSL_CRMF_CERTID) 50e1051a39Sopenharmony_ciIMPLEMENT_ASN1_DUP_FUNCTION(OSSL_CRMF_CERTID) 51e1051a39Sopenharmony_ci 52e1051a39Sopenharmony_ci 53e1051a39Sopenharmony_ciASN1_SEQUENCE(OSSL_CRMF_ENCRYPTEDVALUE) = { 54e1051a39Sopenharmony_ci ASN1_IMP_OPT(OSSL_CRMF_ENCRYPTEDVALUE, intendedAlg, X509_ALGOR, 0), 55e1051a39Sopenharmony_ci ASN1_IMP_OPT(OSSL_CRMF_ENCRYPTEDVALUE, symmAlg, X509_ALGOR, 1), 56e1051a39Sopenharmony_ci ASN1_IMP_OPT(OSSL_CRMF_ENCRYPTEDVALUE, encSymmKey, ASN1_BIT_STRING, 2), 57e1051a39Sopenharmony_ci ASN1_IMP_OPT(OSSL_CRMF_ENCRYPTEDVALUE, keyAlg, X509_ALGOR, 3), 58e1051a39Sopenharmony_ci ASN1_IMP_OPT(OSSL_CRMF_ENCRYPTEDVALUE, valueHint, ASN1_OCTET_STRING, 4), 59e1051a39Sopenharmony_ci ASN1_SIMPLE(OSSL_CRMF_ENCRYPTEDVALUE, encValue, ASN1_BIT_STRING) 60e1051a39Sopenharmony_ci} ASN1_SEQUENCE_END(OSSL_CRMF_ENCRYPTEDVALUE) 61e1051a39Sopenharmony_ciIMPLEMENT_ASN1_FUNCTIONS(OSSL_CRMF_ENCRYPTEDVALUE) 62e1051a39Sopenharmony_ci 63e1051a39Sopenharmony_ciASN1_SEQUENCE(OSSL_CRMF_SINGLEPUBINFO) = { 64e1051a39Sopenharmony_ci ASN1_SIMPLE(OSSL_CRMF_SINGLEPUBINFO, pubMethod, ASN1_INTEGER), 65e1051a39Sopenharmony_ci ASN1_SIMPLE(OSSL_CRMF_SINGLEPUBINFO, pubLocation, GENERAL_NAME) 66e1051a39Sopenharmony_ci} ASN1_SEQUENCE_END(OSSL_CRMF_SINGLEPUBINFO) 67e1051a39Sopenharmony_ciIMPLEMENT_ASN1_FUNCTIONS(OSSL_CRMF_SINGLEPUBINFO) 68e1051a39Sopenharmony_ci 69e1051a39Sopenharmony_ci 70e1051a39Sopenharmony_ciASN1_SEQUENCE(OSSL_CRMF_PKIPUBLICATIONINFO) = { 71e1051a39Sopenharmony_ci ASN1_SIMPLE(OSSL_CRMF_PKIPUBLICATIONINFO, action, ASN1_INTEGER), 72e1051a39Sopenharmony_ci ASN1_SEQUENCE_OF_OPT(OSSL_CRMF_PKIPUBLICATIONINFO, pubInfos, 73e1051a39Sopenharmony_ci OSSL_CRMF_SINGLEPUBINFO) 74e1051a39Sopenharmony_ci} ASN1_SEQUENCE_END(OSSL_CRMF_PKIPUBLICATIONINFO) 75e1051a39Sopenharmony_ciIMPLEMENT_ASN1_FUNCTIONS(OSSL_CRMF_PKIPUBLICATIONINFO) 76e1051a39Sopenharmony_ciIMPLEMENT_ASN1_DUP_FUNCTION(OSSL_CRMF_PKIPUBLICATIONINFO) 77e1051a39Sopenharmony_ci 78e1051a39Sopenharmony_ci 79e1051a39Sopenharmony_ciASN1_SEQUENCE(OSSL_CRMF_PKMACVALUE) = { 80e1051a39Sopenharmony_ci ASN1_SIMPLE(OSSL_CRMF_PKMACVALUE, algId, X509_ALGOR), 81e1051a39Sopenharmony_ci ASN1_SIMPLE(OSSL_CRMF_PKMACVALUE, value, ASN1_BIT_STRING) 82e1051a39Sopenharmony_ci} ASN1_SEQUENCE_END(OSSL_CRMF_PKMACVALUE) 83e1051a39Sopenharmony_ciIMPLEMENT_ASN1_FUNCTIONS(OSSL_CRMF_PKMACVALUE) 84e1051a39Sopenharmony_ci 85e1051a39Sopenharmony_ci 86e1051a39Sopenharmony_ciASN1_CHOICE(OSSL_CRMF_POPOPRIVKEY) = { 87e1051a39Sopenharmony_ci ASN1_IMP(OSSL_CRMF_POPOPRIVKEY, value.thisMessage, ASN1_BIT_STRING, 0), 88e1051a39Sopenharmony_ci ASN1_IMP(OSSL_CRMF_POPOPRIVKEY, value.subsequentMessage, ASN1_INTEGER, 1), 89e1051a39Sopenharmony_ci ASN1_IMP(OSSL_CRMF_POPOPRIVKEY, value.dhMAC, ASN1_BIT_STRING, 2), 90e1051a39Sopenharmony_ci ASN1_IMP(OSSL_CRMF_POPOPRIVKEY, value.agreeMAC, OSSL_CRMF_PKMACVALUE, 3), 91e1051a39Sopenharmony_ci ASN1_IMP(OSSL_CRMF_POPOPRIVKEY, value.encryptedKey, ASN1_NULL, 4), 92e1051a39Sopenharmony_ci} ASN1_CHOICE_END(OSSL_CRMF_POPOPRIVKEY) 93e1051a39Sopenharmony_ciIMPLEMENT_ASN1_FUNCTIONS(OSSL_CRMF_POPOPRIVKEY) 94e1051a39Sopenharmony_ci 95e1051a39Sopenharmony_ci 96e1051a39Sopenharmony_ciASN1_SEQUENCE(OSSL_CRMF_PBMPARAMETER) = { 97e1051a39Sopenharmony_ci ASN1_SIMPLE(OSSL_CRMF_PBMPARAMETER, salt, ASN1_OCTET_STRING), 98e1051a39Sopenharmony_ci ASN1_SIMPLE(OSSL_CRMF_PBMPARAMETER, owf, X509_ALGOR), 99e1051a39Sopenharmony_ci ASN1_SIMPLE(OSSL_CRMF_PBMPARAMETER, iterationCount, ASN1_INTEGER), 100e1051a39Sopenharmony_ci ASN1_SIMPLE(OSSL_CRMF_PBMPARAMETER, mac, X509_ALGOR) 101e1051a39Sopenharmony_ci} ASN1_SEQUENCE_END(OSSL_CRMF_PBMPARAMETER) 102e1051a39Sopenharmony_ciIMPLEMENT_ASN1_FUNCTIONS(OSSL_CRMF_PBMPARAMETER) 103e1051a39Sopenharmony_ci 104e1051a39Sopenharmony_ci 105e1051a39Sopenharmony_ciASN1_CHOICE(OSSL_CRMF_POPOSIGNINGKEYINPUT_AUTHINFO) = { 106e1051a39Sopenharmony_ci ASN1_EXP(OSSL_CRMF_POPOSIGNINGKEYINPUT_AUTHINFO, value.sender, 107e1051a39Sopenharmony_ci GENERAL_NAME, 0), 108e1051a39Sopenharmony_ci ASN1_SIMPLE(OSSL_CRMF_POPOSIGNINGKEYINPUT_AUTHINFO, value.publicKeyMAC, 109e1051a39Sopenharmony_ci OSSL_CRMF_PKMACVALUE) 110e1051a39Sopenharmony_ci} ASN1_CHOICE_END(OSSL_CRMF_POPOSIGNINGKEYINPUT_AUTHINFO) 111e1051a39Sopenharmony_ciIMPLEMENT_ASN1_FUNCTIONS(OSSL_CRMF_POPOSIGNINGKEYINPUT_AUTHINFO) 112e1051a39Sopenharmony_ci 113e1051a39Sopenharmony_ci 114e1051a39Sopenharmony_ciASN1_SEQUENCE(OSSL_CRMF_POPOSIGNINGKEYINPUT) = { 115e1051a39Sopenharmony_ci ASN1_SIMPLE(OSSL_CRMF_POPOSIGNINGKEYINPUT, authInfo, 116e1051a39Sopenharmony_ci OSSL_CRMF_POPOSIGNINGKEYINPUT_AUTHINFO), 117e1051a39Sopenharmony_ci ASN1_SIMPLE(OSSL_CRMF_POPOSIGNINGKEYINPUT, publicKey, X509_PUBKEY) 118e1051a39Sopenharmony_ci} ASN1_SEQUENCE_END(OSSL_CRMF_POPOSIGNINGKEYINPUT) 119e1051a39Sopenharmony_ciIMPLEMENT_ASN1_FUNCTIONS(OSSL_CRMF_POPOSIGNINGKEYINPUT) 120e1051a39Sopenharmony_ci 121e1051a39Sopenharmony_ci 122e1051a39Sopenharmony_ciASN1_SEQUENCE(OSSL_CRMF_POPOSIGNINGKEY) = { 123e1051a39Sopenharmony_ci ASN1_IMP_OPT(OSSL_CRMF_POPOSIGNINGKEY, poposkInput, 124e1051a39Sopenharmony_ci OSSL_CRMF_POPOSIGNINGKEYINPUT, 0), 125e1051a39Sopenharmony_ci ASN1_SIMPLE(OSSL_CRMF_POPOSIGNINGKEY, algorithmIdentifier, X509_ALGOR), 126e1051a39Sopenharmony_ci ASN1_SIMPLE(OSSL_CRMF_POPOSIGNINGKEY, signature, ASN1_BIT_STRING) 127e1051a39Sopenharmony_ci} ASN1_SEQUENCE_END(OSSL_CRMF_POPOSIGNINGKEY) 128e1051a39Sopenharmony_ciIMPLEMENT_ASN1_FUNCTIONS(OSSL_CRMF_POPOSIGNINGKEY) 129e1051a39Sopenharmony_ci 130e1051a39Sopenharmony_ci 131e1051a39Sopenharmony_ciASN1_CHOICE(OSSL_CRMF_POPO) = { 132e1051a39Sopenharmony_ci ASN1_IMP(OSSL_CRMF_POPO, value.raVerified, ASN1_NULL, 0), 133e1051a39Sopenharmony_ci ASN1_IMP(OSSL_CRMF_POPO, value.signature, OSSL_CRMF_POPOSIGNINGKEY, 1), 134e1051a39Sopenharmony_ci ASN1_EXP(OSSL_CRMF_POPO, value.keyEncipherment, OSSL_CRMF_POPOPRIVKEY, 2), 135e1051a39Sopenharmony_ci ASN1_EXP(OSSL_CRMF_POPO, value.keyAgreement, OSSL_CRMF_POPOPRIVKEY, 3) 136e1051a39Sopenharmony_ci} ASN1_CHOICE_END(OSSL_CRMF_POPO) 137e1051a39Sopenharmony_ciIMPLEMENT_ASN1_FUNCTIONS(OSSL_CRMF_POPO) 138e1051a39Sopenharmony_ci 139e1051a39Sopenharmony_ci 140e1051a39Sopenharmony_ciASN1_ADB_TEMPLATE(attributetypeandvalue_default) = 141e1051a39Sopenharmony_ci ASN1_OPT(OSSL_CRMF_ATTRIBUTETYPEANDVALUE, value.other, ASN1_ANY); 142e1051a39Sopenharmony_ciASN1_ADB(OSSL_CRMF_ATTRIBUTETYPEANDVALUE) = { 143e1051a39Sopenharmony_ci ADB_ENTRY(NID_id_regCtrl_regToken, 144e1051a39Sopenharmony_ci ASN1_SIMPLE(OSSL_CRMF_ATTRIBUTETYPEANDVALUE, 145e1051a39Sopenharmony_ci value.regToken, ASN1_UTF8STRING)), 146e1051a39Sopenharmony_ci ADB_ENTRY(NID_id_regCtrl_authenticator, 147e1051a39Sopenharmony_ci ASN1_SIMPLE(OSSL_CRMF_ATTRIBUTETYPEANDVALUE, 148e1051a39Sopenharmony_ci value.authenticator, ASN1_UTF8STRING)), 149e1051a39Sopenharmony_ci ADB_ENTRY(NID_id_regCtrl_pkiPublicationInfo, 150e1051a39Sopenharmony_ci ASN1_SIMPLE(OSSL_CRMF_ATTRIBUTETYPEANDVALUE, 151e1051a39Sopenharmony_ci value.pkiPublicationInfo, 152e1051a39Sopenharmony_ci OSSL_CRMF_PKIPUBLICATIONINFO)), 153e1051a39Sopenharmony_ci ADB_ENTRY(NID_id_regCtrl_oldCertID, 154e1051a39Sopenharmony_ci ASN1_SIMPLE(OSSL_CRMF_ATTRIBUTETYPEANDVALUE, 155e1051a39Sopenharmony_ci value.oldCertID, OSSL_CRMF_CERTID)), 156e1051a39Sopenharmony_ci ADB_ENTRY(NID_id_regCtrl_protocolEncrKey, 157e1051a39Sopenharmony_ci ASN1_SIMPLE(OSSL_CRMF_ATTRIBUTETYPEANDVALUE, 158e1051a39Sopenharmony_ci value.protocolEncrKey, X509_PUBKEY)), 159e1051a39Sopenharmony_ci ADB_ENTRY(NID_id_regInfo_utf8Pairs, 160e1051a39Sopenharmony_ci ASN1_SIMPLE(OSSL_CRMF_ATTRIBUTETYPEANDVALUE, 161e1051a39Sopenharmony_ci value.utf8Pairs, ASN1_UTF8STRING)), 162e1051a39Sopenharmony_ci ADB_ENTRY(NID_id_regInfo_certReq, 163e1051a39Sopenharmony_ci ASN1_SIMPLE(OSSL_CRMF_ATTRIBUTETYPEANDVALUE, 164e1051a39Sopenharmony_ci value.certReq, OSSL_CRMF_CERTREQUEST)), 165e1051a39Sopenharmony_ci} ASN1_ADB_END(OSSL_CRMF_ATTRIBUTETYPEANDVALUE, 0, type, 0, 166e1051a39Sopenharmony_ci &attributetypeandvalue_default_tt, NULL); 167e1051a39Sopenharmony_ci 168e1051a39Sopenharmony_ci 169e1051a39Sopenharmony_ciASN1_SEQUENCE(OSSL_CRMF_ATTRIBUTETYPEANDVALUE) = { 170e1051a39Sopenharmony_ci ASN1_SIMPLE(OSSL_CRMF_ATTRIBUTETYPEANDVALUE, type, ASN1_OBJECT), 171e1051a39Sopenharmony_ci ASN1_ADB_OBJECT(OSSL_CRMF_ATTRIBUTETYPEANDVALUE) 172e1051a39Sopenharmony_ci} ASN1_SEQUENCE_END(OSSL_CRMF_ATTRIBUTETYPEANDVALUE) 173e1051a39Sopenharmony_ci 174e1051a39Sopenharmony_ciIMPLEMENT_ASN1_FUNCTIONS(OSSL_CRMF_ATTRIBUTETYPEANDVALUE) 175e1051a39Sopenharmony_ciIMPLEMENT_ASN1_DUP_FUNCTION(OSSL_CRMF_ATTRIBUTETYPEANDVALUE) 176e1051a39Sopenharmony_ci 177e1051a39Sopenharmony_ci 178e1051a39Sopenharmony_ciASN1_SEQUENCE(OSSL_CRMF_OPTIONALVALIDITY) = { 179e1051a39Sopenharmony_ci ASN1_EXP_OPT(OSSL_CRMF_OPTIONALVALIDITY, notBefore, ASN1_TIME, 0), 180e1051a39Sopenharmony_ci ASN1_EXP_OPT(OSSL_CRMF_OPTIONALVALIDITY, notAfter, ASN1_TIME, 1) 181e1051a39Sopenharmony_ci} ASN1_SEQUENCE_END(OSSL_CRMF_OPTIONALVALIDITY) 182e1051a39Sopenharmony_ciIMPLEMENT_ASN1_FUNCTIONS(OSSL_CRMF_OPTIONALVALIDITY) 183e1051a39Sopenharmony_ci 184e1051a39Sopenharmony_ci 185e1051a39Sopenharmony_ciASN1_SEQUENCE(OSSL_CRMF_CERTTEMPLATE) = { 186e1051a39Sopenharmony_ci ASN1_IMP_OPT(OSSL_CRMF_CERTTEMPLATE, version, ASN1_INTEGER, 0), 187e1051a39Sopenharmony_ci /* 188e1051a39Sopenharmony_ci * serialNumber MUST be omitted. This field is assigned by the CA 189e1051a39Sopenharmony_ci * during certificate creation. 190e1051a39Sopenharmony_ci */ 191e1051a39Sopenharmony_ci ASN1_IMP_OPT(OSSL_CRMF_CERTTEMPLATE, serialNumber, ASN1_INTEGER, 1), 192e1051a39Sopenharmony_ci /* 193e1051a39Sopenharmony_ci * signingAlg MUST be omitted. This field is assigned by the CA 194e1051a39Sopenharmony_ci * during certificate creation. 195e1051a39Sopenharmony_ci */ 196e1051a39Sopenharmony_ci ASN1_IMP_OPT(OSSL_CRMF_CERTTEMPLATE, signingAlg, X509_ALGOR, 2), 197e1051a39Sopenharmony_ci ASN1_EXP_OPT(OSSL_CRMF_CERTTEMPLATE, issuer, X509_NAME, 3), 198e1051a39Sopenharmony_ci ASN1_IMP_OPT(OSSL_CRMF_CERTTEMPLATE, validity, 199e1051a39Sopenharmony_ci OSSL_CRMF_OPTIONALVALIDITY, 4), 200e1051a39Sopenharmony_ci ASN1_EXP_OPT(OSSL_CRMF_CERTTEMPLATE, subject, X509_NAME, 5), 201e1051a39Sopenharmony_ci ASN1_IMP_OPT(OSSL_CRMF_CERTTEMPLATE, publicKey, X509_PUBKEY, 6), 202e1051a39Sopenharmony_ci /* issuerUID is deprecated in version 2 */ 203e1051a39Sopenharmony_ci ASN1_IMP_OPT(OSSL_CRMF_CERTTEMPLATE, issuerUID, ASN1_BIT_STRING, 7), 204e1051a39Sopenharmony_ci /* subjectUID is deprecated in version 2 */ 205e1051a39Sopenharmony_ci ASN1_IMP_OPT(OSSL_CRMF_CERTTEMPLATE, subjectUID, ASN1_BIT_STRING, 8), 206e1051a39Sopenharmony_ci ASN1_IMP_SEQUENCE_OF_OPT(OSSL_CRMF_CERTTEMPLATE, extensions, 207e1051a39Sopenharmony_ci X509_EXTENSION, 9), 208e1051a39Sopenharmony_ci} ASN1_SEQUENCE_END(OSSL_CRMF_CERTTEMPLATE) 209e1051a39Sopenharmony_ciIMPLEMENT_ASN1_FUNCTIONS(OSSL_CRMF_CERTTEMPLATE) 210e1051a39Sopenharmony_ci 211e1051a39Sopenharmony_ci 212e1051a39Sopenharmony_ciASN1_SEQUENCE(OSSL_CRMF_CERTREQUEST) = { 213e1051a39Sopenharmony_ci ASN1_SIMPLE(OSSL_CRMF_CERTREQUEST, certReqId, ASN1_INTEGER), 214e1051a39Sopenharmony_ci ASN1_SIMPLE(OSSL_CRMF_CERTREQUEST, certTemplate, OSSL_CRMF_CERTTEMPLATE), 215e1051a39Sopenharmony_ci ASN1_SEQUENCE_OF_OPT(OSSL_CRMF_CERTREQUEST, controls, 216e1051a39Sopenharmony_ci OSSL_CRMF_ATTRIBUTETYPEANDVALUE) 217e1051a39Sopenharmony_ci} ASN1_SEQUENCE_END(OSSL_CRMF_CERTREQUEST) 218e1051a39Sopenharmony_ciIMPLEMENT_ASN1_FUNCTIONS(OSSL_CRMF_CERTREQUEST) 219e1051a39Sopenharmony_ciIMPLEMENT_ASN1_DUP_FUNCTION(OSSL_CRMF_CERTREQUEST) 220e1051a39Sopenharmony_ci 221e1051a39Sopenharmony_ci 222e1051a39Sopenharmony_ciASN1_SEQUENCE(OSSL_CRMF_MSG) = { 223e1051a39Sopenharmony_ci ASN1_SIMPLE(OSSL_CRMF_MSG, certReq, OSSL_CRMF_CERTREQUEST), 224e1051a39Sopenharmony_ci ASN1_OPT(OSSL_CRMF_MSG, popo, OSSL_CRMF_POPO), 225e1051a39Sopenharmony_ci ASN1_SEQUENCE_OF_OPT(OSSL_CRMF_MSG, regInfo, 226e1051a39Sopenharmony_ci OSSL_CRMF_ATTRIBUTETYPEANDVALUE) 227e1051a39Sopenharmony_ci} ASN1_SEQUENCE_END(OSSL_CRMF_MSG) 228e1051a39Sopenharmony_ciIMPLEMENT_ASN1_FUNCTIONS(OSSL_CRMF_MSG) 229e1051a39Sopenharmony_ciIMPLEMENT_ASN1_DUP_FUNCTION(OSSL_CRMF_MSG) 230e1051a39Sopenharmony_ci 231e1051a39Sopenharmony_ciASN1_ITEM_TEMPLATE(OSSL_CRMF_MSGS) = 232e1051a39Sopenharmony_ci ASN1_EX_TEMPLATE_TYPE(ASN1_TFLG_SEQUENCE_OF, 0, 233e1051a39Sopenharmony_ci OSSL_CRMF_MSGS, OSSL_CRMF_MSG) 234e1051a39Sopenharmony_ciASN1_ITEM_TEMPLATE_END(OSSL_CRMF_MSGS) 235e1051a39Sopenharmony_ciIMPLEMENT_ASN1_FUNCTIONS(OSSL_CRMF_MSGS) 236