Searched refs:psm2ctx (Results 1 – 2 of 2) sorted by relevance
93 static int sm2sig_set_mdname(PROV_SM2_CTX *psm2ctx, const char *mdname) in sm2sig_set_mdname() argument95 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() local139 || psm2ctx == NULL) in sm2sig_signature_init()[all …]
50 PROV_SM2_CTX *psm2ctx = OPENSSL_zalloc(sizeof(PROV_SM2_CTX)); in sm2_newctx() local52 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() local63 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 …]