Home
last modified time | relevance | path

Searched refs:dctx (Results 1 – 25 of 103) sorted by relevance

12345

/openbsd/lib/libcrypto/ec/
H A Dec_pmeth.c98 EC_PKEY_CTX *dctx; in pkey_ec_init() local
108 ctx->data = dctx; in pkey_ec_init()
120 dctx = dst->data; in pkey_ec_copy()
130 if (!dctx->co_key) in pkey_ec_copy()
153 if (dctx != NULL) { in pkey_ec_cleanup()
157 free(dctx); in pkey_ec_cleanup()
178 if (dctx->md) in pkey_ec_sign()
199 if (dctx->md) in pkey_ec_verify()
223 eckey = dctx->co_key ? dctx->co_key : ctx->pkey->pkey.ec; in pkey_ec_derive()
275 dctx->kdf_ukmlen, dctx->kdf_md)) in pkey_ec_kdf_derive()
[all …]
/openbsd/lib/libcrypto/sm2/
H A Dsm2_pmeth.c47 SM2_PKEY_CTX *dctx; in pkey_sm2_init() local
49 if ((dctx = calloc(1, sizeof(*dctx))) == NULL) { in pkey_sm2_init()
53 ctx->data = dctx; in pkey_sm2_init()
66 free(dctx->uid); in pkey_sm2_cleanup()
67 free(dctx); in pkey_sm2_cleanup()
79 dctx = dst->data; in pkey_sm2_copy()
147 const EVP_MD *md = (dctx->md == NULL) ? EVP_sm3() : dctx->md; in pkey_sm2_encrypt()
164 const EVP_MD *md = (dctx->md == NULL) ? EVP_sm3() : dctx->md; in pkey_sm2_decrypt()
241 if (sm2_compute_userid_digest(za, md, dctx->uid, dctx->uid_len, in pkey_sm2_ctrl()
265 memcpy(p2, dctx->uid, dctx->uid_len); in pkey_sm2_ctrl()
[all …]
/openbsd/lib/libcrypto/dsa/
H A Ddsa_pmeth.c93 if (!dctx) in pkey_dsa_init()
96 dctx->qbits = 160; in pkey_dsa_init()
97 dctx->pmd = NULL; in pkey_dsa_init()
98 dctx->md = NULL; in pkey_dsa_init()
100 ctx->data = dctx; in pkey_dsa_init()
115 dctx = dst->data; in pkey_dsa_copy()
128 free(dctx); in pkey_dsa_cleanup()
184 dctx->nbits = p1; in pkey_dsa_ctrl()
203 dctx->md = p2; in pkey_dsa_ctrl()
225 dctx->md = p2; in pkey_dsa_ctrl()
[all …]
/openbsd/lib/libcrypto/dh/
H A Ddh_pmeth.c90 DH_PKEY_CTX *dctx; in pkey_dh_init() local
93 if (!dctx) in pkey_dh_init()
95 dctx->prime_len = 1024; in pkey_dh_init()
96 dctx->generator = 2; in pkey_dh_init()
97 dctx->use_dsa = 0; in pkey_dh_init()
99 ctx->data = dctx; in pkey_dh_init()
114 dctx = dst->data; in pkey_dh_copy()
126 free(dctx); in pkey_dh_cleanup()
138 dctx->prime_len = p1; in pkey_dh_ctrl()
142 dctx->generator = p1; in pkey_dh_ctrl()
[all …]
/openbsd/usr.bin/dig/lib/dns/
H A Ddst_api.c134 dst_context_t *dctx; in dst_context_create3() local
141 if (dctx == NULL) in dst_context_create3()
143 memset(dctx, 0, sizeof(*dctx)); in dst_context_create3()
154 free(dctx); in dst_context_create3()
157 *dctxp = dctx; in dst_context_create3()
167 dctx = *dctxp; in dst_context_destroy()
168 dctx->key->func->destroyctx(dctx); in dst_context_destroy()
171 free(dctx); in dst_context_destroy()
178 return (dctx->key->func->adddata(dctx, data)); in dst_context_adddata()
187 key = dctx->key; in dst_context_sign()
[all …]
H A Dhmac_link.c65 dctx->ctxdata.hmacsha1ctx = hmacsha1ctx; in hmacsha1_createctx()
70 hmacsha1_destroyctx(dst_context_t *dctx) { in hmacsha1_destroyctx() argument
76 dctx->ctxdata.hmacsha1ctx = NULL; in hmacsha1_destroyctx()
209 dctx->ctxdata.hmacsha224ctx = hmacsha224ctx; in hmacsha224_createctx()
214 hmacsha224_destroyctx(dst_context_t *dctx) { in hmacsha224_destroyctx() argument
220 dctx->ctxdata.hmacsha224ctx = NULL; in hmacsha224_destroyctx()
358 hmacsha256_destroyctx(dst_context_t *dctx) { in hmacsha256_destroyctx() argument
364 dctx->ctxdata.hmacsha256ctx = NULL; in hmacsha256_destroyctx()
502 hmacsha384_destroyctx(dst_context_t *dctx) { in hmacsha384_destroyctx() argument
508 dctx->ctxdata.hmacsha384ctx = NULL; in hmacsha384_destroyctx()
[all …]
H A Dcompress.c224 dns_decompress_init(dns_decompress_t *dctx, int edns, in dns_decompress_init() argument
227 REQUIRE(dctx != NULL); in dns_decompress_init()
230 dctx->allowed = DNS_COMPRESS_NONE; in dns_decompress_init()
231 dctx->edns = edns; in dns_decompress_init()
232 dctx->type = type; in dns_decompress_init()
236 dns_decompress_setmethods(dns_decompress_t *dctx, unsigned int allowed) { in dns_decompress_setmethods() argument
237 switch (dctx->type) { in dns_decompress_setmethods()
239 dctx->allowed = DNS_COMPRESS_ALL; in dns_decompress_setmethods()
242 dctx->allowed = DNS_COMPRESS_NONE; in dns_decompress_setmethods()
245 dctx->allowed = allowed; in dns_decompress_setmethods()
H A Ddst_internal.h108 isc_result_t (*createctx)(dst_key_t *key, dst_context_t *dctx);
109 void (*destroyctx)(dst_context_t *dctx);
110 isc_result_t (*adddata)(dst_context_t *dctx, const isc_region_t *data);
115 isc_result_t (*sign)(dst_context_t *dctx, isc_buffer_t *sig);
116 isc_result_t (*verify)(dst_context_t *dctx, const isc_region_t *sig);
/openbsd/lib/libcrypto/hmac/
H A Dhmac.c210 HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx) in HMAC_CTX_copy() argument
212 if (!EVP_MD_CTX_copy(&dctx->i_ctx, &sctx->i_ctx)) in HMAC_CTX_copy()
214 if (!EVP_MD_CTX_copy(&dctx->o_ctx, &sctx->o_ctx)) in HMAC_CTX_copy()
216 if (!EVP_MD_CTX_copy(&dctx->md_ctx, &sctx->md_ctx)) in HMAC_CTX_copy()
218 memcpy(dctx->key, sctx->key, HMAC_MAX_MD_CBLOCK); in HMAC_CTX_copy()
219 dctx->key_length = sctx->key_length; in HMAC_CTX_copy()
220 dctx->md = sctx->md; in HMAC_CTX_copy()
H A Dhm_pmeth.c98 HMAC_PKEY_CTX *sctx, *dctx; in pkey_hmac_copy() local
103 dctx = dst->data; in pkey_hmac_copy()
104 dctx->md = sctx->md; in pkey_hmac_copy()
105 HMAC_CTX_init(&dctx->ctx); in pkey_hmac_copy()
106 if (!HMAC_CTX_copy(&dctx->ctx, &sctx->ctx)) in pkey_hmac_copy()
109 if (!ASN1_OCTET_STRING_set(&dctx->ktmp, sctx->ktmp.data, in pkey_hmac_copy()
/openbsd/usr.bin/dig/lib/dns/include/dst/
H A Ddst.h176 dst_context_adddata(dst_context_t *dctx, const isc_region_t *data);
192 dst_context_sign(dst_context_t *dctx, isc_buffer_t *sig);
210 dst_context_verify(dst_context_t *dctx, isc_region_t *sig);
/openbsd/lib/libcrypto/rsa/
H A Drsa_pmeth.c135 RSA_PKEY_CTX *dctx, *sctx; in pkey_rsa_copy() local
141 dctx = dst->data; in pkey_rsa_copy()
142 dctx->nbits = sctx->nbits; in pkey_rsa_copy()
144 BN_free(dctx->pub_exp); in pkey_rsa_copy()
145 if ((dctx->pub_exp = BN_dup(sctx->pub_exp)) == NULL) in pkey_rsa_copy()
148 dctx->pad_mode = sctx->pad_mode; in pkey_rsa_copy()
149 dctx->md = sctx->md; in pkey_rsa_copy()
150 dctx->mgf1md = sctx->mgf1md; in pkey_rsa_copy()
152 free(dctx->oaep_label); in pkey_rsa_copy()
153 if ((dctx->oaep_label = calloc(1, sctx->oaep_labellen)) == NULL) in pkey_rsa_copy()
[all …]
/openbsd/lib/libcrypto/evp/
H A Dm_sigver.c146 EVP_PKEY_CTX *dctx = NULL; in evp_digestsignfinal_sigctx_custom() local
153 if ((dctx = EVP_PKEY_CTX_dup(pctx)) == NULL) in evp_digestsignfinal_sigctx_custom()
156 if (!dctx->pmeth->signctx(dctx, sigret, siglen, ctx)) in evp_digestsignfinal_sigctx_custom()
162 EVP_PKEY_CTX_free(dctx); in evp_digestsignfinal_sigctx_custom()
/openbsd/usr.bin/dig/lib/dns/rdata/generic/
H A Dminfo_14.c67 dns_decompress_setmethods(dctx, DNS_COMPRESS_GLOBAL14); in fromwire_minfo()
72 RETERR(dns_name_fromwire(&rmail, source, dctx, options, target)); in fromwire_minfo()
73 return (dns_name_fromwire(&email, source, dctx, options, target)); in fromwire_minfo()
H A Drp_17.c66 dns_decompress_setmethods(dctx, DNS_COMPRESS_NONE); in fromwire_rp()
71 RETERR(dns_name_fromwire(&rmail, source, dctx, options, target)); in fromwire_rp()
72 return (dns_name_fromwire(&email, source, dctx, options, target)); in fromwire_rp()
H A Dtalink_58.c62 dns_decompress_setmethods(dctx, DNS_COMPRESS_NONE); in fromwire_talink()
67 RETERR(dns_name_fromwire(&prev, source, dctx, options, target)); in fromwire_talink()
68 return(dns_name_fromwire(&next, source, dctx, options, target)); in fromwire_talink()
H A Dkey_25.c136 UNUSED(dctx); in generic_fromwire_key()
150 dns_decompress_setmethods(dctx, DNS_COMPRESS_NONE); in generic_fromwire_key()
152 RETERR(dns_name_fromwire(&name, source, dctx, options, target)); in generic_fromwire_key()
182 return (generic_fromwire_key(rdclass, type, source, dctx, in fromwire_key()
H A Dninfo_56.c36 UNUSED(dctx); in fromwire_ninfo()
40 return (generic_fromwire_txt(rdclass, type, source, dctx, options, in fromwire_ninfo()
H A Davc_258.c36 UNUSED(dctx); in fromwire_avc()
40 return (generic_fromwire_txt(rdclass, type, source, dctx, options, in fromwire_avc()
H A Dspf_99.c40 UNUSED(dctx); in fromwire_spf()
44 return (generic_fromwire_txt(rdclass, type, source, dctx, options, in fromwire_spf()
H A Dtxt_16.c44 UNUSED(dctx); in generic_fromwire_txt()
69 return (generic_fromwire_txt(rdclass, type, source, dctx, options, in fromwire_txt()
H A Dresinfo_261.c44 UNUSED(dctx); in generic_fromwire_resinfo()
69 return (generic_fromwire_resinfo(rdclass, type, source, dctx, options, in fromwire_resinfo()
H A Dmf_4.c54 dns_decompress_setmethods(dctx, DNS_COMPRESS_GLOBAL14); in fromwire_mf()
57 return (dns_name_fromwire(&name, source, dctx, options, target)); in fromwire_mf()
/openbsd/usr.bin/dig/lib/dns/rdata/in_1/
H A Dpx_26.c80 dns_decompress_setmethods(dctx, DNS_COMPRESS_NONE); in fromwire_in_px()
96 RETERR(dns_name_fromwire(&name, source, dctx, options, target)); in fromwire_in_px()
101 return (dns_name_fromwire(&name, source, dctx, options, target)); in fromwire_in_px()
/openbsd/usr.bin/dig/lib/dns/include/dns/
H A Dcompress.h165 dns_decompress_init(dns_decompress_t *dctx, int edns,
177 dns_decompress_setmethods(dns_decompress_t *dctx, unsigned int allowed);

12345