• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/openssl-1.0.2h/crypto/ec/

Lines Matching refs:dctx

93     EC_PKEY_CTX *dctx;
94 dctx = OPENSSL_malloc(sizeof(EC_PKEY_CTX));
95 if (!dctx)
97 dctx->gen_group = NULL;
98 dctx->md = NULL;
100 dctx->cofactor_mode = -1;
101 dctx->co_key = NULL;
102 dctx->kdf_type = EVP_PKEY_ECDH_KDF_NONE;
103 dctx->kdf_md = NULL;
104 dctx->kdf_outlen = 0;
105 dctx->kdf_ukm = NULL;
106 dctx->kdf_ukmlen = 0;
108 ctx->data = dctx;
115 EC_PKEY_CTX *dctx, *sctx;
119 dctx = dst->data;
121 dctx->gen_group = EC_GROUP_dup(sctx->gen_group);
122 if (!dctx->gen_group)
125 dctx->md = sctx->md;
128 dctx->co_key = EC_KEY_dup(sctx->co_key);
129 if (!dctx->co_key)
132 dctx->kdf_type = sctx->kdf_type;
133 dctx->kdf_md = sctx->kdf_md;
134 dctx->kdf_outlen = sctx->kdf_outlen;
136 dctx->kdf_ukm = BUF_memdup(sctx->kdf_ukm, sctx->kdf_ukmlen);
137 if (!dctx->kdf_ukm)
140 dctx->kdf_ukm = NULL;
141 dctx->kdf_ukmlen = sctx->kdf_ukmlen;
147 EC_PKEY_CTX *dctx = ctx->data;
148 if (dctx) {
149 if (dctx->gen_group)
150 EC_GROUP_free(dctx->gen_group);
151 if (dctx->co_key)
152 EC_KEY_free(dctx->co_key);
153 if (dctx->kdf_ukm)
154 OPENSSL_free(dctx->kdf_ukm);
155 OPENSSL_free(dctx);
164 EC_PKEY_CTX *dctx = ctx->data;
175 if (dctx->md)
176 type = EVP_MD_type(dctx->md);
193 EC_PKEY_CTX *dctx = ctx->data;
196 if (dctx->md)
197 type = EVP_MD_type(dctx->md);
214 EC_PKEY_CTX *dctx = ctx->data;
220 eckey = dctx->co_key ? dctx->co_key : ctx->pkey->pkey.ec;
247 EC_PKEY_CTX *dctx = ctx->data;
251 if (dctx->kdf_type == EVP_PKEY_ECDH_KDF_NONE)
254 *keylen = dctx->kdf_outlen;
257 if (*keylen != dctx->kdf_outlen)
268 dctx->kdf_ukm, dctx->kdf_ukmlen, dctx->kdf_md))
283 EC_PKEY_CTX *dctx = ctx->data;
292 if (dctx->gen_group)
293 EC_GROUP_free(dctx->gen_group);
294 dctx->gen_group = group;
298 if (!dctx->gen_group) {
302 EC_GROUP_set_asn1_flag(dctx->gen_group, p1);
308 if (dctx->cofactor_mode != -1)
309 return dctx->cofactor_mode;
317 dctx->cofactor_mode = p1;
325 if (!dctx->co_key) {
326 dctx->co_key = EC_KEY_dup(ec_key);
327 if (!dctx->co_key)
331 EC_KEY_set_flags(dctx->co_key, EC_FLAG_COFACTOR_ECDH);
333 EC_KEY_clear_flags(dctx->co_key, EC_FLAG_COFACTOR_ECDH);
334 } else if (dctx->co_key) {
335 EC_KEY_free(dctx->co_key);
336 dctx->co_key = NULL;
343 return dctx->kdf_type;
346 dctx->kdf_type = p1;
350 dctx->kdf_md = p2;
354 *(const EVP_MD **)p2 = dctx->kdf_md;
360 dctx->kdf_outlen = (size_t)p1;
364 *(int *)p2 = dctx->kdf_outlen;
368 if (dctx->kdf_ukm)
369 OPENSSL_free(dctx->kdf_ukm);
370 dctx->kdf_ukm = p2;
372 dctx->kdf_ukmlen = p1;
374 dctx->kdf_ukmlen = 0;
378 *(unsigned char **)p2 = dctx->kdf_ukm;
379 return dctx->kdf_ukmlen;
391 dctx->md = p2;
395 *(const EVP_MD **)p2 = dctx->md;
454 EC_PKEY_CTX *dctx = ctx->data;
456 if (dctx->gen_group == NULL) {
463 ret = EC_KEY_set_group(ec, dctx->gen_group);
474 EC_PKEY_CTX *dctx = ctx->data;
475 if (ctx->pkey == NULL && dctx->gen_group == NULL) {
488 if (!EC_KEY_set_group(ec, dctx->gen_group))