Lines Matching refs:p12
100 static boolean_t get_keystore_passwd(PKG_ERR *err, PKCS12 *p12,
1212 PKCS12 *p12; in wait_restore() local
1232 if ((p12 = in wait_restore()
1247 PKCS12_free(p12); in wait_restore()
1650 PKCS12 *p12 = NULL; in read_keystore() local
1669 if ((p12 = read_keystore_file(err, in read_keystore()
1679 if (!get_keystore_passwd(err, p12, cb, keystore)) { in read_keystore()
1687 if (sunw_PKCS12_contents(p12, keystore->passphrase, in read_keystore()
1696 PKCS12_free(p12); in read_keystore()
1697 p12 = NULL; in read_keystore()
1725 if ((p12 = read_keystore_file(err, in read_keystore()
1736 if (!get_keystore_passwd(err, p12, cb, in read_keystore()
1744 if (check_password(p12, in read_keystore()
1759 if (sunw_PKCS12_contents(p12, keystore->passphrase, in read_keystore()
1769 PKCS12_free(p12); in read_keystore()
1770 p12 = NULL; in read_keystore()
1776 if ((p12 = read_keystore_file(err, in read_keystore()
1787 if (!get_keystore_passwd(err, p12, cb, in read_keystore()
1795 if (check_password(p12, in read_keystore()
1805 if (sunw_PKCS12_contents(p12, keystore->passphrase, in read_keystore()
1815 PKCS12_free(p12); in read_keystore()
1816 p12 = NULL; in read_keystore()
1823 if (p12 != NULL) in read_keystore()
1824 PKCS12_free(p12); in read_keystore()
1845 get_keystore_passwd(PKG_ERR *err, PKCS12 *p12, keystore_passphrase_cb cb, in get_keystore_passwd() argument
1853 if (check_password(p12, "") == B_TRUE) { in get_keystore_passwd()
1855 } else if (check_password(p12, NULL) == B_TRUE) { in get_keystore_passwd()
1866 if (check_password(p12, passbuf) == B_FALSE) { in get_keystore_passwd()
1899 PKCS12 *p12 = NULL; in write_keystore() local
1949 p12 = sunw_PKCS12_create(passbuf, keystore->pkeys, in write_keystore()
1952 if (p12 == NULL) { in write_keystore()
1960 if (!write_keystore_file(err, keystore->capath, p12)) { in write_keystore()
1993 p12 = sunw_PKCS12_create(passbuf, keystore->pkeys, in write_keystore()
1996 if (p12 == NULL) { in write_keystore()
2005 p12)) { in write_keystore()
2013 PKCS12_free(p12); in write_keystore()
2027 p12 = sunw_PKCS12_create(passbuf, NULL, in write_keystore()
2030 if (p12 == NULL) { in write_keystore()
2038 if (!write_keystore_file(err, keystore->clpath, p12)) { in write_keystore()
2046 PKCS12_free(p12); in write_keystore()
2061 p12 = sunw_PKCS12_create(passbuf, NULL, in write_keystore()
2064 if (p12 == NULL) { in write_keystore()
2072 if (!write_keystore_file(err, keystore->capath, p12)) { in write_keystore()
2080 PKCS12_free(p12); in write_keystore()
2081 p12 = NULL; in write_keystore()
2098 if (p12 != NULL) in write_keystore()
2099 PKCS12_free(p12); in write_keystore()
2263 PKCS12 *p12 = NULL; in read_keystore_file() local
2289 if ((p12 = d2i_PKCS12_fp(newfile, NULL)) == NULL) { in read_keystore_file()
2301 return (p12); in read_keystore_file()
2454 check_password(PKCS12 *p12, char *pass) in check_password() argument
2467 if (PKCS12_verify_mac(p12, NULL, 0) == 0 && in check_password()
2468 PKCS12_verify_mac(p12, "", 0) == 0) in check_password()
2470 } else if (PKCS12_verify_mac(p12, pass, -1) == 0) { in check_password()