/openssl/crypto/pkcs12/ |
H A D | p12_mutl.c | 33 return p12->mac ? 1 : 0; in PKCS12_mac_present() 42 if (p12->mac) { in PKCS12_get0_mac() 45 *psalt = p12->mac->salt; in PKCS12_get0_mac() 47 *piter = p12->mac->iter; in PKCS12_get0_mac() 187 salt = p12->mac->salt->data; in pkcs12_gen_mac() 189 if (p12->mac->iter == NULL) in pkcs12_gen_mac() 222 keylen = PBMAC1_PBKDF2_HMAC(p12->authsafes->ctx.libctx, p12->authsafes->ctx.propq, in pkcs12_gen_mac() 266 p12->authsafes->ctx.libctx, p12->authsafes->ctx.propq)) { in pkcs12_gen_mac() 303 if (p12->mac == NULL) { in PKCS12_verify_mac() 392 p12->mac = NULL; in pkcs12_setup_mac() [all …]
|
H A D | p12_npas.c | 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() 71 if ((asafes = PKCS12_unpack_authsafes(p12)) == NULL) in newpass_p12() 110 p12_data_tmp = p12->authsafes->d.data; in newpass_p12() 113 if (!PKCS12_pack_authsafes(p12, newsafes)) in newpass_p12() 116 if (p12->mac != NULL) { 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() [all …]
|
H A D | p12_utl.c | 221 int i2d_PKCS12_bio(BIO *bp, const PKCS12 *p12) in i2d_PKCS12_bio() argument 223 return ASN1_item_i2d_bio(ASN1_ITEM_rptr(PKCS12), bp, p12); in i2d_PKCS12_bio() 227 int i2d_PKCS12_fp(FILE *fp, const PKCS12 *p12) in i2d_PKCS12_fp() argument 229 return ASN1_item_i2d_fp(ASN1_ITEM_rptr(PKCS12), fp, p12); in i2d_PKCS12_fp() 233 PKCS12 *d2i_PKCS12_bio(BIO *bp, PKCS12 **p12) in d2i_PKCS12_bio() argument 239 if (p12 != NULL) { in d2i_PKCS12_bio() 240 p7ctx = ossl_pkcs12_get0_pkcs7ctx(*p12); in d2i_PKCS12_bio() 250 PKCS12 *d2i_PKCS12_fp(FILE *fp, PKCS12 **p12) in d2i_PKCS12_fp() argument 256 if (p12 != NULL) { in d2i_PKCS12_fp() 257 p7ctx = ossl_pkcs12_get0_pkcs7ctx(*p12); in d2i_PKCS12_fp() [all …]
|
H A D | p12_kiss.c | 17 static int parse_pk12(PKCS12 *p12, const char *pass, int passlen, 35 int PKCS12_parse(PKCS12 *p12, const char *pass, EVP_PKEY **pkey, X509 **cert, in PKCS12_parse() argument 48 if (p12 == NULL) { in PKCS12_parse() 54 if (PKCS12_mac_present(p12)) { in PKCS12_parse() 62 if (PKCS12_verify_mac(p12, NULL, 0)) in PKCS12_parse() 64 else if (PKCS12_verify_mac(p12, "", 0)) in PKCS12_parse() 70 } else if (!PKCS12_verify_mac(p12, pass, -1)) { in PKCS12_parse() 85 if (!parse_pk12(p12, pass, -1, pkey, ocerts)) { in PKCS12_parse() 139 static int parse_pk12(PKCS12 *p12, const char *pass, int passlen, in parse_pk12() argument 147 if ((asafes = PKCS12_unpack_authsafes(p12)) == NULL) in parse_pk12()
|
H A D | p12_asn.c | 32 void PKCS12_free(PKCS12 *p12) in PKCS12_free() argument 34 if (p12 != NULL && p12->authsafes != NULL) { in PKCS12_free() 35 OPENSSL_free(p12->authsafes->ctx.propq); in PKCS12_free() 36 p12->authsafes->ctx.propq = NULL; in PKCS12_free() 38 ASN1_item_free((ASN1_VALUE *)p12, ASN1_ITEM_rptr(PKCS12)); in PKCS12_free()
|
H A D | p12_init.c | 59 const PKCS7_CTX *ossl_pkcs12_get0_pkcs7ctx(const PKCS12 *p12) in ossl_pkcs12_get0_pkcs7ctx() argument 61 if (p12 == NULL || p12->authsafes == NULL) in ossl_pkcs12_get0_pkcs7ctx() 63 return &p12->authsafes->ctx; in ossl_pkcs12_get0_pkcs7ctx()
|
H A D | p12_crt.c | 41 PKCS12 *p12 = NULL; in PKCS12_create_ex2() local 151 p12 = PKCS12_add_safes_ex(safes, 0, ctx, propq); in PKCS12_create_ex2() 153 if (p12 == NULL) in PKCS12_create_ex2() 164 return p12; in PKCS12_create_ex2() 167 PKCS12_free(p12); in PKCS12_create_ex2() 394 PKCS12 *p12; in PKCS12_add_safes_ex() local 398 p12 = PKCS12_init_ex(nid_p7, ctx, propq); in PKCS12_add_safes_ex() 399 if (p12 == NULL) in PKCS12_add_safes_ex() 402 if (!PKCS12_pack_authsafes(p12, safes)) { in PKCS12_add_safes_ex() 403 PKCS12_free(p12); in PKCS12_add_safes_ex() [all …]
|
H A D | p12_add.c | 187 int PKCS12_pack_authsafes(PKCS12 *p12, STACK_OF(PKCS7) *safes) in PKCS12_pack_authsafes() argument 190 &p12->authsafes->d.data)) in PKCS12_pack_authsafes() 195 STACK_OF(PKCS7) *PKCS12_unpack_authsafes(const PKCS12 *p12) in STACK_OF() 202 if (!PKCS7_type_is_data(p12->authsafes)) { in STACK_OF() 207 if (p12->authsafes->d.data == NULL) { in STACK_OF() 212 p7ctx = &p12->authsafes->ctx; in STACK_OF() 213 p7s = ASN1_item_unpack_ex(p12->authsafes->d.data, in STACK_OF() 220 if (!ossl_pkcs7_ctx_propagate(p12->authsafes, p7)) in STACK_OF()
|
H A D | p12_local.h | 45 const PKCS7_CTX *ossl_pkcs12_get0_pkcs7ctx(const PKCS12 *p12);
|
/openssl/test/ |
H A D | pkcs12_api_test.c | 35 PKCS12 *p12 = NULL; in PKCS12_load() local 42 if (!TEST_ptr(p12)) in PKCS12_load() 45 if (!TEST_true(p12 == d2i_PKCS12_bio(bio, &p12))) in PKCS12_load() 50 return p12; in PKCS12_load() 54 PKCS12_free(p12); in PKCS12_load() 106 PKCS12 *p12 = NULL; in pkcs12_parse_test() local 130 PKCS12_free(p12); in pkcs12_parse_test() 145 PKCS12 *p12 = NULL; in pkcs12_create_ex2_setup() local 153 return p12; in pkcs12_create_ex2_setup() 155 PKCS12_free(p12); in pkcs12_create_ex2_setup() [all …]
|
H A D | pkcs12_format_test.c | 805 PKCS12 *p12 = NULL; in pkcs12_create_test() local 868 p12 = PKCS12_create(NULL, NULL, pkey, NULL, NULL, in pkcs12_create_test() 871 if (!TEST_ptr(p12)) in pkcs12_create_test() 878 PKCS12_free(p12); in pkcs12_create_test() 891 PKCS12 *p12 = NULL; in pkcs12_recreate_test() local 904 p12 = PKCS12_create("pass", NULL, pkey, cert, NULL, NID_aes_256_cbc, in pkcs12_recreate_test() 906 if (!TEST_ptr(p12)) in pkcs12_recreate_test() 914 if (!TEST_int_eq(i2d_PKCS12_bio(bio, p12), 1)) in pkcs12_recreate_test() 938 PKCS12_free(p12); in pkcs12_recreate_test()
|
/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() 669 PKCS12 *p12; in start_check_pkcs12() local 689 PKCS12 *p12; in start_check_pkcs12_with_mac() local 709 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 | 107 1,profile, -section,, -cmd,cr,, -cert,signer.crt, -key,signer.p12, -keypass,pass:12345,BLANK,, -pro… 108 0,profile wrong value, -section,, -cmd,cr,, -cert,signer.crt, -key,signer.p12, -keypass,pass:12345,… 109 0,profile missing argument, -section,, -cmd,cr,, -cert,signer.crt, -key,signer.p12, -keypass,pass:1… 110 0,profile extra argument, -section,, -cmd,cr,, -cert,signer.crt, -key,signer.p12, -keypass,pass:123… 112 1,geninfo int, -section,, -cmd,cr,, -cert,signer.crt,, -key,signer.p12,, -ke… 113 1,geninfo str, -section,, -cmd,cr,, -cert,signer.crt,, -key,signer.p12,, -ke… 114 1,geninfo empty str, -section,, -cmd,cr,, -cert,signer.crt,, -key,signer.p12,, -ke… 116 0,geninfo missing argument, -section,, -cmd,cr,, -cert,signer.crt,, -key,signer.p12,, -ke… 118 0,geninfo invalid OID number string, -section,, -cmd,cr,, -cert,signer.crt,, -key,signer.p12,, -ke… 119 1,geninfo unknown OID number string, -section,, -cmd,cr,, -cert,signer.crt,, -key,signer.p12,, -ke… [all …]
|
/openssl/test/recipes/95-test_external_oqsprovider_data/ |
H A D | oqsprovider-pkcs12gen.sh | 47 …SL_APP pkcs12 -export -in tmp/$1_srv.crt -inkey tmp/$1_srv.key -passout pass: -out tmp/$1_srv_1.p12 49 if [ $? -ne 0 ] || [ ! -f tmp/$1_srv_1.p12 ]; then 58 …r oqsprovider -export -in tmp/$1_srv.crt -inkey tmp/$1_srv.key -passout pass: -out tmp/$1_srv_2.p12 60 if [ $? -ne 0 ] || [ ! -f tmp/$1_srv_2.p12 ]; then 65 if [ $(cat tmp/$1_srv_1.p12 | $OPENSSL_APP sha256) -neq $(cat tmp/$1_srv_2.p12 | $OPENSSL_APP sha25…
|
/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 | 13 int PKCS12_gen_mac(PKCS12 *p12, const char *pass, int passlen, 15 int PKCS12_verify_mac(PKCS12 *p12, const char *pass, int passlen); 16 int PKCS12_set_mac(PKCS12 *p12, const char *pass, int passlen, 19 int PKCS12_set_pbmac1_pbkdf2(PKCS12 *p12, const char *pass, int passlen, 23 int PKCS12_setup_mac(PKCS12 *p12, int iter, unsigned char *salt, 30 const PKCS12 *p12);
|
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 | 42 int dump_certs_keys_p12(BIO *out, const PKCS12 *p12, 188 PKCS12 *p12 = NULL; in pkcs12_main() local 699 if (p12 == NULL) { in pkcs12_main() 733 i2d_PKCS12_bio(out, p12); in pkcs12_main() 755 if (p12 == NULL) { in pkcs12_main() 759 if ((p12 = d2i_PKCS12_bio(in, &p12)) == NULL) { in pkcs12_main() 782 if ((options & INFO) && PKCS12_mac_present(p12)) { in pkcs12_main() 852 } else if (!PKCS12_verify_mac(p12, mpass, -1)) { in pkcs12_main() 873 if (!PKCS12_verify_mac(p12, badpass, -1)) { in pkcs12_main() 899 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); 181 int PKCS12_pack_authsafes(PKCS12 *p12, STACK_OF(PKCS7) *safes); 182 STACK_OF(PKCS7) *PKCS12_unpack_authsafes(const PKCS12 *p12); 266 int PKCS12_gen_mac(PKCS12 *p12, const char *pass, int passlen, 269 int PKCS12_set_mac(PKCS12 *p12, const char *pass, int passlen, 275 int PKCS12_setup_mac(PKCS12 *p12, int iter, unsigned char *salt, 330 int i2d_PKCS12_bio(BIO *bp, const PKCS12 *p12); 332 int i2d_PKCS12_fp(FILE *fp, const PKCS12 *p12); 334 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_mac_present(p12) in try_pkcs12() 557 || PKCS12_verify_mac(p12, NULL, 0)) { in try_pkcs12() 559 } else if (PKCS12_verify_mac(p12, "", 0)) { in try_pkcs12() 583 if (!PKCS12_verify_mac(p12, pass, tpass_len)) { in try_pkcs12() 592 if (PKCS12_parse(p12, pass, &pkey, &cert, &chain)) { in try_pkcs12() 644 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/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()
|