Lines Matching defs:p7
137 PKCS7 *p7;
138 if (!(p7 = PKCS7_new())) {
142 p7->type = OBJ_nid2obj(NID_pkcs7_data);
143 if (!(p7->d.data = M_ASN1_OCTET_STRING_new())) {
148 if (!ASN1_item_pack(sk, ASN1_ITEM_rptr(PKCS12_SAFEBAGS), &p7->d.data)) {
152 return p7;
156 STACK_OF(PKCS12_SAFEBAG) *PKCS12_unpack_p7data(PKCS7 *p7)
158 if(!PKCS7_type_is_data(p7))
163 return ASN1_item_unpack(p7->d.data, ASN1_ITEM_rptr(PKCS12_SAFEBAGS));
172 PKCS7 *p7;
175 if (!(p7 = PKCS7_new())) {
179 if(!PKCS7_set_type(p7, NID_pkcs7_encrypted)) {
196 X509_ALGOR_free(p7->d.encrypted->enc_data->algorithm);
197 p7->d.encrypted->enc_data->algorithm = pbe;
198 M_ASN1_OCTET_STRING_free(p7->d.encrypted->enc_data->enc_data);
199 if (!(p7->d.encrypted->enc_data->enc_data =
206 return p7;
209 STACK_OF(PKCS12_SAFEBAG) *PKCS12_unpack_p7encdata(PKCS7 *p7, const char *pass, int passlen)
211 if(!PKCS7_type_is_encrypted(p7)) return NULL;
212 return PKCS12_item_decrypt_d2i(p7->d.encrypted->enc_data->algorithm,
215 p7->d.encrypted->enc_data->enc_data, 1);