Lines Matching refs:libctx
46 static int generate_dsa_params(OSSL_LIB_CTX *libctx, in generate_dsa_params() argument
54 pkey_ctx = EVP_PKEY_CTX_new_from_name(libctx, ALG, PROPQUERY); in generate_dsa_params()
83 static int generate_dsa_key(OSSL_LIB_CTX *libctx, in generate_dsa_key() argument
92 ctx = EVP_PKEY_CTX_new_from_pkey(libctx, params, in generate_dsa_key()
163 static int demo_sign(OSSL_LIB_CTX *libctx, in demo_sign() argument
174 pkey_ctx = EVP_PKEY_CTX_new_from_name(libctx, ALG, PROPQUERY); in demo_sign()
186 if (EVP_DigestSignInit_ex(ctx, NULL, DIGEST, libctx, NULL, pkey, NULL) != 1) in demo_sign()
228 static int demo_verify(OSSL_LIB_CTX *libctx, in demo_verify() argument
237 pkey_ctx = EVP_PKEY_CTX_new_from_name(libctx, ALG, PROPQUERY); in demo_verify()
249 if (EVP_DigestVerifyInit_ex(ctx, NULL, DIGEST, libctx, NULL, pkey, NULL) != 1) in demo_verify()
272 OSSL_LIB_CTX *libctx = NULL; in main() local
280 libctx = OSSL_LIB_CTX_new(); in main()
281 if (libctx == NULL) in main()
284 if (generate_dsa_params(libctx, ¶ms) != 1) in main()
287 if (generate_dsa_key(libctx, params, &pkey) != 1) in main()
297 if (demo_sign(libctx, &sig_len, &sig_value, keypair) != 1) in main()
301 if (demo_verify(libctx, sig_len, sig_value, public_key) != 1) in main()
314 OSSL_LIB_CTX_free(libctx); in main()