/openssl/demos/encode/ |
H A D | ec_encode.c | 105 OSSL_ENCODER_CTX *ectx = NULL; in store_key() local 125 ectx = OSSL_ENCODER_CTX_new_for_pkey(pkey, selection, "PEM", NULL, propq); in store_key() 126 if (ectx == NULL) { in store_key() 148 if (OSSL_ENCODER_CTX_set_cipher(ectx, "AES-256-CBC", propq) == 0) { in store_key() 154 if (OSSL_ENCODER_CTX_set_passphrase(ectx, in store_key() 163 if (OSSL_ENCODER_to_fp(ectx, f) == 0) { in store_key() 170 OSSL_ENCODER_CTX_free(ectx); in store_key()
|
H A D | rsa_encode.c | 105 OSSL_ENCODER_CTX *ectx = NULL; in store_key() local 125 ectx = OSSL_ENCODER_CTX_new_for_pkey(pkey, selection, "PEM", NULL, propq); in store_key() 126 if (ectx == NULL) { in store_key() 145 if (OSSL_ENCODER_CTX_set_cipher(ectx, "AES-128-CBC", propq) == 0) { in store_key() 151 if (OSSL_ENCODER_CTX_set_passphrase(ectx, in store_key() 160 if (OSSL_ENCODER_to_fp(ectx, f) == 0) { in store_key() 167 OSSL_ENCODER_CTX_free(ectx); in store_key()
|
/openssl/doc/man3/ |
H A D | OSSL_ENCODER_to_bio.pod | 62 OSSL_ENCODER_CTX *ectx; 67 ectx = OSSL_ENCODER_CTX_new_for_pkey(pkey, 72 if (ectx == NULL) { 76 OSSL_ENCODER_CTX_set_passphrase(ectx, pass, strlen(pass)); 77 if (OSSL_ENCODER_to_bio(ectx, bio)) { 82 OSSL_ENCODER_CTX_free(ectx); 87 OSSL_ENCODER_CTX *ectx; 94 ectx = OSSL_ENCODER_CTX_new_for_pkey(pkey, 99 if (ectx == NULL) { 106 if (OSSL_ENCODER_to_data(ectx, &data, &datalen)) { [all …]
|
/openssl/apps/ |
H A D | dsa.c | 93 OSSL_ENCODER_CTX *ectx = NULL; in dsa_main() local 259 ectx = OSSL_ENCODER_CTX_new_for_pkey(pkey, selection, output_type, in dsa_main() 261 if (OSSL_ENCODER_CTX_get_num_encoders(ectx) == 0) { in dsa_main() 268 OSSL_ENCODER_CTX_set_cipher(ectx, EVP_CIPHER_get0_name(enc), NULL); in dsa_main() 272 OSSL_ENCODER_CTX_set_passphrase_ui(ectx, get_ui_method(), NULL); in dsa_main() 275 OSSL_ENCODER_CTX_set_passphrase(ectx, in dsa_main() 285 if (!OSSL_ENCODER_CTX_set_params(ectx, params)) { in dsa_main() 291 if (!OSSL_ENCODER_to_bio(ectx, out)) { in dsa_main() 299 OSSL_ENCODER_CTX_free(ectx); in dsa_main()
|
H A D | rsa.c | 140 OSSL_ENCODER_CTX *ectx = NULL; in rsa_main() local 361 ectx = OSSL_ENCODER_CTX_new_for_pkey(pkey, selection, in rsa_main() 364 if (OSSL_ENCODER_CTX_get_num_encoders(ectx) == 0) { in rsa_main() 375 OSSL_ENCODER_CTX_set_cipher(ectx, EVP_CIPHER_get0_name(enc), NULL); in rsa_main() 379 OSSL_ENCODER_CTX_set_passphrase_ui(ectx, get_ui_method(), NULL); in rsa_main() 382 OSSL_ENCODER_CTX_set_passphrase(ectx, in rsa_main() 392 if (!OSSL_ENCODER_CTX_set_params(ectx, params)) { in rsa_main() 398 if (!OSSL_ENCODER_to_bio(ectx, out)) { in rsa_main() 405 OSSL_ENCODER_CTX_free(ectx); in rsa_main()
|
H A D | ec.c | 66 OSSL_ENCODER_CTX *ectx = NULL; in ec_main() local 255 ectx = OSSL_ENCODER_CTX_new_for_pkey(eckey, selection, in ec_main() 259 OSSL_ENCODER_CTX_set_cipher(ectx, EVP_CIPHER_get0_name(enc), NULL); in ec_main() 261 OSSL_ENCODER_CTX_set_passphrase_ui(ectx, get_ui_method(), NULL); in ec_main() 264 OSSL_ENCODER_CTX_set_passphrase(ectx, in ec_main() 268 if (!OSSL_ENCODER_to_bio(ectx, out)) { in ec_main() 281 OSSL_ENCODER_CTX_free(ectx); in ec_main()
|
H A D | dhparam.c | 342 OSSL_ENCODER_CTX *ectx = in dhparam_main() local 349 if (ectx == NULL || !OSSL_ENCODER_to_bio(ectx, out)) { in dhparam_main() 350 OSSL_ENCODER_CTX_free(ectx); in dhparam_main() 354 OSSL_ENCODER_CTX_free(ectx); in dhparam_main()
|
/openssl/test/ |
H A D | endecoder_legacy_test.c | 310 OSSL_ENCODER_CTX *ectx = NULL; in test_protected_PEM() local 321 if (!TEST_ptr(ectx = in test_protected_PEM() 325 || !TEST_true(OSSL_ENCODER_to_bio(ectx, membio_provided)) in test_protected_PEM() 359 OSSL_ENCODER_CTX_free(ectx); in test_protected_PEM() 378 OSSL_ENCODER_CTX *ectx = NULL; in test_unprotected_PEM() local 389 if (!TEST_ptr(ectx = in test_unprotected_PEM() 426 OSSL_ENCODER_CTX_free(ectx); in test_unprotected_PEM() 448 OSSL_ENCODER_CTX *ectx = NULL; in test_DER() local 454 if (!TEST_ptr(ectx = in test_DER() 458 || !TEST_true(OSSL_ENCODER_to_data(ectx, in test_DER() [all …]
|
H A D | endecode_test.c | 250 OSSL_ENCODER_CTX *ectx = NULL; in encode_EVP_PKEY_prov() local 256 if (!TEST_FL_ptr(ectx = OSSL_ENCODER_CTX_new_for_pkey(pkey, selection, in encode_EVP_PKEY_prov() 260 || !TEST_FL_int_gt(OSSL_ENCODER_CTX_get_num_encoders(ectx), 0) in encode_EVP_PKEY_prov() 262 && !TEST_FL_true(OSSL_ENCODER_CTX_set_passphrase(ectx, upass, in encode_EVP_PKEY_prov() 265 && !TEST_FL_true(OSSL_ENCODER_CTX_set_cipher(ectx, pcipher, NULL))) in encode_EVP_PKEY_prov() 267 || !TEST_FL_true(OSSL_ENCODER_to_bio(ectx, mem_ser)) in encode_EVP_PKEY_prov() 279 OSSL_ENCODER_CTX_free(ectx); in encode_EVP_PKEY_prov()
|
H A D | evp_libctx_test.c | 550 OSSL_ENCODER_CTX *ectx = NULL; in rsa_keygen() local 553 || !TEST_ptr(ectx = in rsa_keygen() 558 || !TEST_true(OSSL_ENCODER_to_data(ectx, &pub_der, &len))) in rsa_keygen() 565 OSSL_ENCODER_CTX_free(ectx); in rsa_keygen()
|
/openssl/crypto/x509/ |
H A D | x_pubkey.c | 349 OSSL_ENCODER_CTX *ectx = in X509_PUBKEY_set() local 354 if (OSSL_ENCODER_to_data(ectx, &der, &derlen)) { in X509_PUBKEY_set() 360 OSSL_ENCODER_CTX_free(ectx); in X509_PUBKEY_set()
|
/openssl/ssl/ |
H A D | ssl_local.h | 996 EVP_CIPHER_CTX *ectx, HMAC_CTX *hctx, int enc); 1000 EVP_CIPHER_CTX *ectx, EVP_MAC_CTX *hctx,
|