/openssl/crypto/pkcs12/ |
H A D | p12_mutl.c | 26 return p12->mac ? 1 : 0; in PKCS12_mac_present() 33 const PKCS12 *p12) in PKCS12_get0_mac() argument 35 if (p12->mac) { in PKCS12_get0_mac() 38 *psalt = p12->mac->salt; in PKCS12_get0_mac() 40 *piter = p12->mac->iter; in PKCS12_get0_mac() 101 salt = p12->mac->salt->data; in pkcs12_gen_mac() 103 if (p12->mac->iter == NULL) in pkcs12_gen_mac() 181 if (p12->mac == NULL) { in PKCS12_verify_mac() 237 PKCS12_MAC_DATA_free(p12->mac); in PKCS12_setup_mac() 238 p12->mac = NULL; in PKCS12_setup_mac() [all …]
|
H A D | p12_npas.c | 36 if (p12 == NULL) { in PKCS12_newpass() 43 if (!PKCS12_verify_mac(p12, oldpass, -1)) { in PKCS12_newpass() 48 if (!newpass_p12(p12, oldpass, newpass)) { in PKCS12_newpass() 69 if ((asafes = PKCS12_unpack_authsafes(p12)) == NULL) in newpass_p12() 104 p12_data_tmp = p12->authsafes->d.data; in newpass_p12() 105 if ((p12->authsafes->d.data = ASN1_OCTET_STRING_new()) == NULL) in newpass_p12() 107 if (!PKCS12_pack_authsafes(p12, newsafes)) in newpass_p12() 110 if (!PKCS12_gen_mac(p12, newpass, -1, mac, &maclen)) in newpass_p12() 112 X509_SIG_getm(p12->mac->dinfo, NULL, &macoct); in newpass_p12() 123 ASN1_OCTET_STRING_free(p12->authsafes->d.data); in newpass_p12() [all …]
|
H A D | p12_kiss.c | 17 static int parse_pk12(PKCS12 *p12, const char *pass, int passlen, 33 int PKCS12_parse(PKCS12 *p12, const char *pass, EVP_PKEY **pkey, X509 **cert, in PKCS12_parse() argument 46 if (p12 == NULL) { in PKCS12_parse() 52 if (PKCS12_mac_present(p12)) { in PKCS12_parse() 60 if (PKCS12_verify_mac(p12, NULL, 0)) in PKCS12_parse() 62 else if (PKCS12_verify_mac(p12, "", 0)) in PKCS12_parse() 68 } else if (!PKCS12_verify_mac(p12, pass, -1)) { in PKCS12_parse() 83 if (!parse_pk12(p12, pass, -1, pkey, ocerts)) { in PKCS12_parse() 137 static int parse_pk12(PKCS12 *p12, const char *pass, int passlen, in parse_pk12() argument 145 if ((asafes = PKCS12_unpack_authsafes(p12)) == NULL) in parse_pk12()
|
H A D | p12_crt.c | 32 PKCS12 *p12 = NULL; in PKCS12_create_ex() local 107 p12 = PKCS12_add_safes_ex(safes, 0, ctx, propq); in PKCS12_create_ex() 109 if (p12 == NULL) in PKCS12_create_ex() 120 return p12; in PKCS12_create_ex() 123 PKCS12_free(p12); in PKCS12_create_ex() 313 PKCS12 *p12; in PKCS12_add_safes_ex() local 317 p12 = PKCS12_init_ex(nid_p7, ctx, propq); in PKCS12_add_safes_ex() 318 if (p12 == NULL) in PKCS12_add_safes_ex() 321 if (!PKCS12_pack_authsafes(p12, safes)) { in PKCS12_add_safes_ex() 322 PKCS12_free(p12); in PKCS12_add_safes_ex() [all …]
|
H A D | p12_utl.c | 227 int i2d_PKCS12_bio(BIO *bp, const PKCS12 *p12) in i2d_PKCS12_bio() argument 229 return ASN1_item_i2d_bio(ASN1_ITEM_rptr(PKCS12), bp, p12); in i2d_PKCS12_bio() 233 int i2d_PKCS12_fp(FILE *fp, const PKCS12 *p12) in i2d_PKCS12_fp() argument 235 return ASN1_item_i2d_fp(ASN1_ITEM_rptr(PKCS12), fp, p12); in i2d_PKCS12_fp() 239 PKCS12 *d2i_PKCS12_bio(BIO *bp, PKCS12 **p12) in d2i_PKCS12_bio() argument 241 return ASN1_item_d2i_bio(ASN1_ITEM_rptr(PKCS12), bp, p12); in d2i_PKCS12_bio() 245 PKCS12 *d2i_PKCS12_fp(FILE *fp, PKCS12 **p12) in d2i_PKCS12_fp() argument 247 return ASN1_item_d2i_fp(ASN1_ITEM_rptr(PKCS12), fp, p12); in d2i_PKCS12_fp()
|
H A D | p12_add.c | 173 int PKCS12_pack_authsafes(PKCS12 *p12, STACK_OF(PKCS7) *safes) in PKCS12_pack_authsafes() argument 176 &p12->authsafes->d.data)) in PKCS12_pack_authsafes() 181 STACK_OF(PKCS7) *PKCS12_unpack_authsafes(const PKCS12 *p12) in STACK_OF() 187 if (!PKCS7_type_is_data(p12->authsafes)) { in STACK_OF() 191 p7s = ASN1_item_unpack(p12->authsafes->d.data, in STACK_OF() 196 if (!ossl_pkcs7_ctx_propagate(p12->authsafes, p7)) in STACK_OF()
|
/openssl/test/helpers/ |
H A D | pkcs12.c | 148 PKCS12 *p12; in generate_p12() local 189 PKCS12_free(p12); in generate_p12() 219 p12 = d2i_PKCS12_bio(bio, &p12); in from_bio_p12() 230 return p12; in from_bio_p12() 232 PKCS12_free(p12); in from_bio_p12() 256 return p12; in read_p12() 258 PKCS12_free(p12); in read_p12() 662 PKCS12 *p12; in start_check_pkcs12() local 682 PKCS12 *p12; in start_check_pkcs12_with_mac() local 702 PKCS12 *p12; in start_check_pkcs12_file() local [all …]
|
/openssl/test/recipes/80-test_cmp_http_data/ |
H A D | test_credentials.csv | 13 0,cert missing arg, -section,,BLANK,,BLANK,, -cert,, -key,signer.p12, -keypass,pass:12345,BLANK,,BL… 15 0,keypass missing arg, -section,,BLANK,,BLANK,, -cert,signer.crt, -key,signer.p12, -keypass,,BLANK,… 16 0,keypass empty string, -section,,BLANK,,BLANK,, -cert,signer.crt, -key,signer.p12, -keypass,pass:,… 17 1,keypass no prefix, -section,,BLANK,,BLANK,, -cert,signer.crt, -key,signer.p12, -keypass,12345,BLA… 18 0,keypass prefix wrong, -section,,BLANK,,BLANK,, -cert,signer.crt, -key,signer.p12, -keypass,:12345… 19 0,wrong keypass, -section,,BLANK,,BLANK,, -cert,signer.crt, -key,signer.p12, -keypass,pass:123456,B… 21 0,no cert, -section,,BLANK,,BLANK,,BLANK,, -key,signer.p12, -keypass,pass:12345,BLANK,,BLANK,,BLANK… 23 0,no keypass, -section,,BLANK,,BLANK,, -cert,signer.crt, -key,signer.p12,BLANK,,BLANK,,BLANK,,BLANK… 24 0,wrong cert, -section,,BLANK,,BLANK,, -cert,trusted.crt, -key,signer.p12, -keypass,pass:12345,BLAN… 27 0,empty cert file, -section,,BLANK,,BLANK,, -cert,empty.txt, -key,signer.p12, -keypass,pass:12345,B… [all …]
|
H A D | test_commands.csv | 50 1,geninfo, -section,, -cmd,cr,, -cert,signer.crt, -key,signer.p12, -keypass,pass:12345,BLANK,, -gen… 51 0,geninfo missing argument, -section,, -cmd,cr,, -cert,signer.crt, -key,signer.p12, -keypass,pass:1… 52 0,geninfo bad syntax: leading '.', -section,, -cmd,cr,, -cert,signer.crt, -key,signer.p12, -keypass… 53 0,geninfo bad syntax: missing ':', -section,, -cmd,cr,, -cert,signer.crt, -key,signer.p12, -keypass… 54 0,geninfo bad syntax: double ':', -section,, -cmd,cr,, -cert,signer.crt, -key,signer.p12, -keypass,… 55 0,geninfo bad syntax: missing ':int', -section,, -cmd,cr,, -cert,signer.crt, -key,signer.p12, -keyp…
|
H A D | test_verification.csv | 32 …NK, -unprotected_errors,BLANK, -secret,"""", -cert,signer.crt, -key,signer.p12, -keypass,pass:12345
|
/openssl/test/ |
H A D | pkcs12_api_test.c | 36 PKCS12 *p12 = NULL; in PKCS12_load() local 42 p12 = PKCS12_init(NID_pkcs7_data); in PKCS12_load() 43 if (!TEST_ptr(p12)) in PKCS12_load() 46 if (!TEST_true(p12 == d2i_PKCS12_bio(bio, &p12))) in PKCS12_load() 51 return p12; in PKCS12_load() 55 PKCS12_free(p12); in PKCS12_load() 67 PKCS12 *p12 = NULL; in pkcs12_parse_test() local 73 p12 = PKCS12_load(in_file); in pkcs12_parse_test() 74 if (!TEST_ptr(p12)) in pkcs12_parse_test() 77 if (!TEST_true(PKCS12_parse(p12, in_pass, &key, &cert, &ca))) in pkcs12_parse_test() [all …]
|
H A D | pkcs12_format_test.c | 716 PKCS12 *p12 = NULL; in pkcs12_create_test() local 779 p12 = PKCS12_create(NULL, NULL, pkey, NULL, NULL, in pkcs12_create_test() 782 if (!TEST_ptr(p12)) in pkcs12_create_test() 789 PKCS12_free(p12); in pkcs12_create_test()
|
/openssl/demos/pkcs12/ |
H A D | pkread.c | 18 static char *find_friendly_name(PKCS12 *p12) in find_friendly_name() argument 27 if ((safes = PKCS12_unpack_authsafes(p12)) == NULL) in find_friendly_name() 54 PKCS12 *p12 = NULL; in main() local 67 p12 = d2i_PKCS12_fp(fp, NULL); in main() 69 if (p12 == NULL) { in main() 74 if (!PKCS12_parse(p12, argv[2], &pkey, &cert, &ca)) { in main() 79 name = find_friendly_name(p12); in main() 80 PKCS12_free(p12); in main()
|
H A D | pkwrite.c | 23 PKCS12 *p12; in main() local 38 p12 = PKCS12_create(argv[2], argv[3], pkey, cert, NULL, 0, 0, 0, 0, 0); in main() 39 if (!p12) { in main() 49 i2d_PKCS12_fp(fp, p12); in main() 50 PKCS12_free(p12); in main()
|
/openssl/doc/man3/ |
H A D | PKCS12_newpass.pod | 11 int PKCS12_newpass(PKCS12 *p12, const char *oldpass, const char *newpass); 17 B<p12> is a pointer to a PKCS12 structure. B<oldpass> is the existing password 58 PKCS12 *p12; 68 p12 = d2i_PKCS12_fp(fp, NULL); 70 if (p12 == NULL) { 75 if (PKCS12_newpass(p12, argv[2], argv[3]) == 0) { 78 PKCS12_free(p12); 83 PKCS12_free(p12); 86 i2d_PKCS12_fp(fp, p12); 87 PKCS12_free(p12);
|
H A D | PKCS12_gen_mac.pod | 12 int PKCS12_gen_mac(PKCS12 *p12, const char *pass, int passlen, 14 int PKCS12_verify_mac(PKCS12 *p12, const char *pass, int passlen); 15 int PKCS12_set_mac(PKCS12 *p12, const char *pass, int passlen, 18 int PKCS12_setup_mac(PKCS12 *p12, int iter, unsigned char *salt,
|
H A D | PKCS12_parse.pod | 11 int PKCS12_parse(PKCS12 *p12, const char *pass, EVP_PKEY **pkey, X509 **cert, 18 B<p12> is the B<PKCS12> structure to parse. B<pass> is the passphrase to use.
|
/openssl/apps/ |
H A D | pkcs12.c | 41 int dump_certs_keys_p12(BIO *out, const PKCS12 *p12, 182 PKCS12 *p12 = NULL; in pkcs12_main() local 676 if (p12 == NULL) { in pkcs12_main() 700 i2d_PKCS12_bio(out, p12); in pkcs12_main() 725 if (p12 == NULL) { in pkcs12_main() 729 if ((p12 = d2i_PKCS12_bio(in, &p12)) == NULL) { in pkcs12_main() 752 if ((options & INFO) && PKCS12_mac_present(p12)) { in pkcs12_main() 787 } else if (!PKCS12_verify_mac(p12, mpass, -1)) { in pkcs12_main() 808 if (!PKCS12_verify_mac(p12, badpass, -1)) { in pkcs12_main() 829 PKCS12_free(p12); in pkcs12_main() [all …]
|
/openssl/include/openssl/ |
H A D | pkcs12.h.in | 99 int PKCS12_mac_present(const PKCS12 *p12); 104 const PKCS12 *p12); 179 int PKCS12_pack_authsafes(PKCS12 *p12, STACK_OF(PKCS7) *safes); 180 STACK_OF(PKCS7) *PKCS12_unpack_authsafes(const PKCS12 *p12); 263 int PKCS12_gen_mac(PKCS12 *p12, const char *pass, int passlen, 266 int PKCS12_set_mac(PKCS12 *p12, const char *pass, int passlen, 269 int PKCS12_setup_mac(PKCS12 *p12, int iter, unsigned char *salt, 318 int i2d_PKCS12_bio(BIO *bp, const PKCS12 *p12); 320 int i2d_PKCS12_fp(FILE *fp, const PKCS12 *p12); 322 PKCS12 *d2i_PKCS12_bio(BIO *bp, PKCS12 **p12); [all …]
|
/openssl/crypto/store/ |
H A D | store_result.c | 539 PKCS12 *p12; in try_pkcs12() local 541 p12 = d2i_PKCS12(NULL, (const unsigned char **)&data->octet_data, in try_pkcs12() 544 if (p12 != NULL) { in try_pkcs12() 556 if (PKCS12_verify_mac(p12, "", 0) in try_pkcs12() 557 || PKCS12_verify_mac(p12, NULL, 0)) { in try_pkcs12() 581 if (!PKCS12_verify_mac(p12, pass, tpass_len)) { in try_pkcs12() 590 if (PKCS12_parse(p12, pass, &pkey, &cert, &chain)) { in try_pkcs12() 642 PKCS12_free(p12); in try_pkcs12()
|
/openssl/crypto/poly1305/asm/ |
H A D | poly1305-ia64.S | 152 cmp.eq p12,p0=4,r29 164 .pred.rel "mutex",p8,p9,p10,p11,p12,p13,p14,p15 176 (p12) shrp i0=r15,r14,32 } 177 { .mii; (p12) shrp i1=r16,r15,32 187 .pred.rel "mutex",p8,p9,p10,p11,p12,p13,p14,p15 227 (p12) shrp i0=r15,r14,32 } 233 (p12) shrp i1=r16,r15,32 }
|
/openssl/test/recipes/ |
H A D | 25-test_x509.t | 49 my $p12 = srctop_file("test", "shibboleth.pfx"); 52 ok(run(app(["openssl", "x509", "-text", "-in", $p12, "-out", $out_pem,
|
/openssl/engines/ |
H A D | e_loader_attic.c | 308 PKCS12 *p12; in try_decode_PKCS12() local 314 if ((p12 = d2i_PKCS12(NULL, &blob, len)) != NULL) { in try_decode_PKCS12() 323 if (!PKCS12_mac_present(p12) in try_decode_PKCS12() 324 || PKCS12_verify_mac(p12, "", 0) in try_decode_PKCS12() 325 || PKCS12_verify_mac(p12, NULL, 0)) { in try_decode_PKCS12() 334 if (!PKCS12_verify_mac(p12, pass, strlen(pass))) { in try_decode_PKCS12() 340 if (PKCS12_parse(p12, pass, &pkey, &cert, &chain)) { in try_decode_PKCS12() 390 PKCS12_free(p12); in try_decode_PKCS12()
|
/openssl/doc/man1/ |
H A D | openssl-pkcs12.pod.in | 425 openssl pkcs12 -in file.p12 -out file.pem 429 openssl pkcs12 -in file.p12 -clcerts -out file.pem 433 openssl pkcs12 -in file.p12 -out file.pem -noenc 437 openssl pkcs12 -in file.p12 -info -noout 441 openssl pkcs12 -in file.p12 -info -noout -legacy 445 openssl pkcs12 -export -in file.pem -out file.p12 -name "My PSE" 449 openssl pkcs12 -export -in file.pem -out file.p12 -name "My PSE" \ 455 openssl pkcs12 -export -in cert.pem -inkey key.pem -out file.p12 -legacy
|
/openssl/test/recipes/80-test_cmp_http_data/Mock/ |
H A D | test.cnf | 39 key = signer.p12
|