Lines Matching refs:saltlen
26 unsigned char *salt, int saltlen,
63 const unsigned char *salt, int saltlen, in pkcs12_gen_gost_mac_key() argument
73 if (!PKCS5_PBKDF2_HMAC(pass, passlen, salt, saltlen, iter, in pkcs12_gen_gost_mac_key()
170 int saltlen, iter; in pkcs12_gen_mac() local
188 saltlen = p12->mac->salt->length; in pkcs12_gen_mac()
231 if (!pkcs12_gen_gost_mac_key(pass, passlen, salt, saltlen, iter, in pkcs12_gen_mac()
251 int res = (*pkcs12_key_gen)(pass, passlen, salt, saltlen, PKCS12_MAC_ID, in pkcs12_gen_mac()
264 if (!PKCS12_key_gen_utf8_ex(pass, passlen, salt, saltlen, PKCS12_MAC_ID, in pkcs12_gen_mac()
345 unsigned char *salt, int saltlen, int iter, in PKCS12_set_mac() argument
357 if (PKCS12_setup_mac(p12, iter, salt, saltlen, md_type) == PKCS12_ERROR) { in PKCS12_set_mac()
377 unsigned char *salt, int saltlen, in pkcs12_pbmac1_pbkdf2_key_gen() argument
382 return PKCS5_PBKDF2_HMAC(pass, passlen, salt, saltlen, iter, in pkcs12_pbmac1_pbkdf2_key_gen()
386 static int pkcs12_setup_mac(PKCS12 *p12, int iter, unsigned char *salt, int saltlen, in pkcs12_setup_mac() argument
406 if (saltlen == 0) in pkcs12_setup_mac()
407 saltlen = PKCS12_SALT_LEN; in pkcs12_setup_mac()
408 else if (saltlen < 0) in pkcs12_setup_mac()
410 if ((p12->mac->salt->data = OPENSSL_malloc(saltlen)) == NULL) in pkcs12_setup_mac()
412 p12->mac->salt->length = saltlen; in pkcs12_setup_mac()
415 (size_t)saltlen, 0) <= 0) in pkcs12_setup_mac()
418 memcpy(p12->mac->salt->data, salt, saltlen); in pkcs12_setup_mac()
430 int PKCS12_setup_mac(PKCS12 *p12, int iter, unsigned char *salt, int saltlen, in PKCS12_setup_mac() argument
433 return pkcs12_setup_mac(p12, iter, salt, saltlen, EVP_MD_get_type(md_type)); in PKCS12_setup_mac()
437 unsigned char *salt, int saltlen, int iter, in PKCS12_set_pbmac1_pbkdf2() argument
474 known_salt = OPENSSL_malloc(saltlen); in PKCS12_set_pbmac1_pbkdf2()
478 if (RAND_bytes_ex(NULL, known_salt, saltlen, 0) <= 0) { in PKCS12_set_pbmac1_pbkdf2()
486 alg = PKCS5_pbkdf2_set(iter, salt ? salt : known_salt, saltlen, prf_nid, keylen); in PKCS12_set_pbmac1_pbkdf2()
490 if (pkcs12_setup_mac(p12, iter, salt ? salt : known_salt, saltlen, in PKCS12_set_pbmac1_pbkdf2()