Home
last modified time | relevance | path

Searched refs:psm2ctx (Results 1 – 2 of 2) sorted by relevance

/third_party/openssl/providers/implementations/signature/
Dsm2_sig.c93 static int sm2sig_set_mdname(PROV_SM2_CTX *psm2ctx, const char *mdname) in sm2sig_set_mdname() argument
95 if (psm2ctx->md == NULL) /* We need an SM3 md to compare with */ in sm2sig_set_mdname()
96 psm2ctx->md = EVP_MD_fetch(psm2ctx->libctx, psm2ctx->mdname, in sm2sig_set_mdname()
97 psm2ctx->propq); in sm2sig_set_mdname()
98 if (psm2ctx->md == NULL) in sm2sig_set_mdname()
104 if (strlen(mdname) >= sizeof(psm2ctx->mdname) in sm2sig_set_mdname()
105 || !EVP_MD_is_a(psm2ctx->md, mdname)) { in sm2sig_set_mdname()
111 OPENSSL_strlcpy(psm2ctx->mdname, mdname, sizeof(psm2ctx->mdname)); in sm2sig_set_mdname()
136 PROV_SM2_CTX *psm2ctx = (PROV_SM2_CTX *)vpsm2ctx; in sm2sig_signature_init() local
139 || psm2ctx == NULL) in sm2sig_signature_init()
[all …]
/third_party/openssl/providers/implementations/asymciphers/
Dsm2_enc.c50 PROV_SM2_CTX *psm2ctx = OPENSSL_zalloc(sizeof(PROV_SM2_CTX)); in sm2_newctx() local
52 if (psm2ctx == NULL) in sm2_newctx()
54 psm2ctx->libctx = PROV_LIBCTX_OF(provctx); in sm2_newctx()
56 return psm2ctx; in sm2_newctx()
61 PROV_SM2_CTX *psm2ctx = (PROV_SM2_CTX *)vpsm2ctx; in sm2_init() local
63 if (psm2ctx == NULL || vkey == NULL || !EC_KEY_up_ref(vkey)) in sm2_init()
65 EC_KEY_free(psm2ctx->key); in sm2_init()
66 psm2ctx->key = vkey; in sm2_init()
68 return sm2_set_ctx_params(psm2ctx, params); in sm2_init()
71 static const EVP_MD *sm2_get_md(PROV_SM2_CTX *psm2ctx) in sm2_get_md() argument
[all …]