Lines Matching refs:p12
20 static int newpass_p12(PKCS12 *p12, const char *oldpass, const char *newpass);
34 int PKCS12_newpass(PKCS12 *p12, const char *oldpass, const char *newpass) in PKCS12_newpass() argument
38 if (p12 == NULL) { in PKCS12_newpass()
44 if (p12->mac != NULL) { in PKCS12_newpass()
45 if (!PKCS12_verify_mac(p12, oldpass, -1)) { in PKCS12_newpass()
50 if (!newpass_p12(p12, oldpass, newpass)) { in PKCS12_newpass()
60 static int newpass_p12(PKCS12 *p12, const char *oldpass, const char *newpass) in newpass_p12() argument
71 if ((asafes = PKCS12_unpack_authsafes(p12)) == NULL) in newpass_p12()
110 p12_data_tmp = p12->authsafes->d.data; in newpass_p12()
111 if ((p12->authsafes->d.data = ASN1_OCTET_STRING_new()) == NULL) in newpass_p12()
113 if (!PKCS12_pack_authsafes(p12, newsafes)) in newpass_p12()
116 if (p12->mac != NULL) { in newpass_p12()
117 if (!PKCS12_gen_mac(p12, newpass, -1, mac, &maclen)) in newpass_p12()
119 X509_SIG_getm(p12->mac->dinfo, NULL, &macoct); in newpass_p12()
131 ASN1_OCTET_STRING_free(p12->authsafes->d.data); in newpass_p12()
132 p12->authsafes->d.data = p12_data_tmp; in newpass_p12()