Lines Matching refs:libctx
36 static EVP_PKEY *get_key(OSSL_LIB_CTX *libctx, const char *propq, int public) in get_key() argument
54 selection, libctx, propq); in get_key()
96 static int do_encrypt(OSSL_LIB_CTX *libctx, in do_encrypt() argument
109 pub_key = get_key(libctx, propq, public); in do_encrypt()
114 ctx = EVP_PKEY_CTX_new_from_pkey(libctx, pub_key, propq); in do_encrypt()
154 static int do_decrypt(OSSL_LIB_CTX *libctx, const unsigned char *in, size_t in_len, in do_decrypt() argument
166 priv_key = get_key(libctx, propq, public); in do_decrypt()
171 ctx = EVP_PKEY_CTX_new_from_pkey(libctx, priv_key, propq); in do_decrypt()
219 OSSL_LIB_CTX *libctx = NULL; in main() local
221 if (!do_encrypt(libctx, msg, msg_len, &encrypted, &encrypted_len)) { in main()
225 if (!do_decrypt(libctx, encrypted, encrypted_len, in main()
239 OSSL_LIB_CTX_free(libctx); in main()