Home
last modified time | relevance | path

Searched refs:ectx (Results 1 – 12 of 12) sorted by relevance

/openssl/demos/encode/
H A Dec_encode.c105 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 Drsa_encode.c105 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 DOSSL_ENCODER_to_bio.pod62 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 Ddsa.c93 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 Drsa.c140 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 Dec.c66 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 Ddhparam.c342 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 Dendecoder_legacy_test.c310 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 Dendecode_test.c250 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 Devp_libctx_test.c550 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 Dx_pubkey.c349 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 Dssl_local.h996 EVP_CIPHER_CTX *ectx, HMAC_CTX *hctx, int enc);
1000 EVP_CIPHER_CTX *ectx, EVP_MAC_CTX *hctx,

Completed in 35 milliseconds