Lines Matching refs:mac
38 static void generate_p12(PKCS12_BUILDER *pb, const PKCS12_ENC *mac);
41 static PKCS12 *from_bio_p12(BIO *bio, const PKCS12_ENC *mac);
42 static PKCS12 *read_p12(const char *infile, const PKCS12_ENC *mac);
43 static int check_p12_mac(PKCS12 *p12, const PKCS12_ENC *mac);
137 void end_pkcs12_with_mac(PKCS12_BUILDER *pb, const PKCS12_ENC *mac)
141 generate_p12(pb, mac);
146 static void generate_p12(PKCS12_BUILDER *pb, const PKCS12_ENC *mac)
169 if (mac != NULL) {
171 md = (EVP_MD *)EVP_get_digestbynid(mac->nid);
173 md = EVP_MD_fetch(test_ctx, OBJ_nid2sn(mac->nid), test_propq);
175 if (!TEST_true(PKCS12_set_mac(p12, mac->pass, strlen(mac->pass),
176 NULL, 0, mac->iter, md))) {
209 static PKCS12 *from_bio_p12(BIO *bio, const PKCS12_ENC *mac)
223 if (mac == NULL) {
227 if (!check_p12_mac(p12, mac))
238 static PKCS12 *read_p12(const char *infile, const PKCS12_ENC *mac)
249 if (mac == NULL) {
253 if (!check_p12_mac(p12, mac))
262 static int check_p12_mac(PKCS12 *p12, const PKCS12_ENC *mac)
265 && TEST_true(PKCS12_verify_mac(p12, mac->pass, strlen(mac->pass)));
680 void start_check_pkcs12_with_mac(PKCS12_BUILDER *pb, const PKCS12_ENC *mac)
687 p12 = from_bio_p12(pb->p12bio, mac);
720 void start_check_pkcs12_file_with_mac(PKCS12_BUILDER *pb, const PKCS12_ENC *mac)
727 p12 = read_p12(pb->filename, mac);