Home
last modified time | relevance | path

Searched refs:dstctx (Results 1 – 14 of 14) sorted by relevance

/openssl/providers/implementations/exchange/
H A Decx_exch.c154 PROV_ECX_CTX *dstctx; in ecx_dupctx() local
159 dstctx = OPENSSL_zalloc(sizeof(*srcctx)); in ecx_dupctx()
160 if (dstctx == NULL) in ecx_dupctx()
163 *dstctx = *srcctx; in ecx_dupctx()
164 if (dstctx->key != NULL && !ossl_ecx_key_up_ref(dstctx->key)) { in ecx_dupctx()
166 OPENSSL_free(dstctx); in ecx_dupctx()
170 if (dstctx->peerkey != NULL && !ossl_ecx_key_up_ref(dstctx->peerkey)) { in ecx_dupctx()
172 ossl_ecx_key_free(dstctx->key); in ecx_dupctx()
173 OPENSSL_free(dstctx); in ecx_dupctx()
177 return dstctx; in ecx_dupctx()
H A Dkdf_exch.c144 PROV_KDF_CTX *dstctx; in kdf_dupctx() local
149 dstctx = OPENSSL_zalloc(sizeof(*srcctx)); in kdf_dupctx()
150 if (dstctx == NULL) in kdf_dupctx()
153 *dstctx = *srcctx; in kdf_dupctx()
155 dstctx->kdfctx = EVP_KDF_CTX_dup(srcctx->kdfctx); in kdf_dupctx()
156 if (dstctx->kdfctx == NULL) { in kdf_dupctx()
157 OPENSSL_free(dstctx); in kdf_dupctx()
160 if (!ossl_kdf_data_up_ref(dstctx->kdfdata)) { in kdf_dupctx()
161 EVP_KDF_CTX_free(dstctx->kdfctx); in kdf_dupctx()
162 OPENSSL_free(dstctx); in kdf_dupctx()
[all …]
H A Ddh_exch.c289 PROV_DH_CTX *dstctx; in dh_dupctx() local
295 if (dstctx == NULL) in dh_dupctx()
298 *dstctx = *srcctx; in dh_dupctx()
299 dstctx->dh = NULL; in dh_dupctx()
300 dstctx->dhpeer = NULL; in dh_dupctx()
301 dstctx->kdf_md = NULL; in dh_dupctx()
302 dstctx->kdf_ukm = NULL; in dh_dupctx()
303 dstctx->kdf_cekalg = NULL; in dh_dupctx()
308 dstctx->dh = srcctx->dh; in dh_dupctx()
334 return dstctx; in dh_dupctx()
[all …]
H A Decdh_exch.c196 PROV_ECDH_CTX *dstctx; in ecdh_dupctx() local
202 if (dstctx == NULL) in ecdh_dupctx()
205 *dstctx = *srcctx; in ecdh_dupctx()
209 dstctx->k= NULL; in ecdh_dupctx()
210 dstctx->peerk = NULL; in ecdh_dupctx()
211 dstctx->kdf_md = NULL; in ecdh_dupctx()
212 dstctx->kdf_ukm = NULL; in ecdh_dupctx()
219 dstctx->k = srcctx->k; in ecdh_dupctx()
235 if (dstctx->kdf_ukm == NULL) in ecdh_dupctx()
239 return dstctx; in ecdh_dupctx()
[all …]
/openssl/providers/implementations/asymciphers/
H A Dsm2_enc.c135 PROV_SM2_CTX *dstctx; in sm2_dupctx() local
137 dstctx = OPENSSL_zalloc(sizeof(*srcctx)); in sm2_dupctx()
138 if (dstctx == NULL) in sm2_dupctx()
141 *dstctx = *srcctx; in sm2_dupctx()
142 memset(&dstctx->md, 0, sizeof(dstctx->md)); in sm2_dupctx()
144 if (dstctx->key != NULL && !EC_KEY_up_ref(dstctx->key)) { in sm2_dupctx()
145 OPENSSL_free(dstctx); in sm2_dupctx()
149 if (!ossl_prov_digest_copy(&dstctx->md, &srcctx->md)) { in sm2_dupctx()
150 sm2_freectx(dstctx); in sm2_dupctx()
154 return dstctx; in sm2_dupctx()
H A Drsa_enc.c331 PROV_RSA_CTX *dstctx; in rsa_dupctx() local
337 if (dstctx == NULL) in rsa_dupctx()
340 *dstctx = *srcctx; in rsa_dupctx()
341 if (dstctx->rsa != NULL && !RSA_up_ref(dstctx->rsa)) { in rsa_dupctx()
342 OPENSSL_free(dstctx); in rsa_dupctx()
346 if (dstctx->oaep_md != NULL && !EVP_MD_up_ref(dstctx->oaep_md)) { in rsa_dupctx()
347 RSA_free(dstctx->rsa); in rsa_dupctx()
348 OPENSSL_free(dstctx); in rsa_dupctx()
352 if (dstctx->mgf1_md != NULL && !EVP_MD_up_ref(dstctx->mgf1_md)) { in rsa_dupctx()
355 OPENSSL_free(dstctx); in rsa_dupctx()
[all …]
/openssl/providers/implementations/signature/
H A Dmac_legacy_sig.c175 PROV_MAC_CTX *dstctx; in mac_dupctx() local
180 dstctx = OPENSSL_zalloc(sizeof(*srcctx)); in mac_dupctx()
181 if (dstctx == NULL) in mac_dupctx()
184 *dstctx = *srcctx; in mac_dupctx()
185 dstctx->propq = NULL; in mac_dupctx()
186 dstctx->key = NULL; in mac_dupctx()
187 dstctx->macctx = NULL; in mac_dupctx()
194 dstctx->key = srcctx->key; in mac_dupctx()
198 if (dstctx->macctx == NULL) in mac_dupctx()
202 return dstctx; in mac_dupctx()
[all …]
H A Dsm2_sig.c351 PROV_SM2_CTX *dstctx; in sm2sig_dupctx() local
354 if (dstctx == NULL) in sm2sig_dupctx()
357 *dstctx = *srcctx; in sm2sig_dupctx()
358 dstctx->ec = NULL; in sm2sig_dupctx()
359 dstctx->propq = NULL; in sm2sig_dupctx()
360 dstctx->md = NULL; in sm2sig_dupctx()
361 dstctx->mdctx = NULL; in sm2sig_dupctx()
362 dstctx->id = NULL; in sm2sig_dupctx()
366 dstctx->ec = srcctx->ec; in sm2sig_dupctx()
393 return dstctx; in sm2sig_dupctx()
[all …]
H A Ddsa_sig.c629 PROV_DSA_CTX *dstctx; in dsa_dupctx() local
635 if (dstctx == NULL) in dsa_dupctx()
638 *dstctx = *srcctx; in dsa_dupctx()
639 dstctx->dsa = NULL; in dsa_dupctx()
640 dstctx->propq = NULL; in dsa_dupctx()
644 dstctx->dsa = srcctx->dsa; in dsa_dupctx()
648 dstctx->md = srcctx->md; in dsa_dupctx()
652 if (dstctx->mdctx == NULL in dsa_dupctx()
659 if (dstctx->propq == NULL) in dsa_dupctx()
663 return dstctx; in dsa_dupctx()
[all …]
H A Decdsa_sig.c624 PROV_ECDSA_CTX *dstctx; in ecdsa_dupctx() local
630 if (dstctx == NULL) in ecdsa_dupctx()
633 *dstctx = *srcctx; in ecdsa_dupctx()
634 dstctx->ec = NULL; in ecdsa_dupctx()
635 dstctx->propq = NULL; in ecdsa_dupctx()
642 dstctx->ec = srcctx->ec; in ecdsa_dupctx()
646 dstctx->md = srcctx->md; in ecdsa_dupctx()
650 if (dstctx->mdctx == NULL in ecdsa_dupctx()
657 if (dstctx->propq == NULL) in ecdsa_dupctx()
661 return dstctx; in ecdsa_dupctx()
[all …]
H A Drsa_sig.c1337 PROV_RSA_CTX *dstctx; in rsa_dupctx() local
1343 if (dstctx == NULL) in rsa_dupctx()
1346 *dstctx = *srcctx; in rsa_dupctx()
1347 dstctx->rsa = NULL; in rsa_dupctx()
1348 dstctx->md = NULL; in rsa_dupctx()
1349 dstctx->mgf1_md = NULL; in rsa_dupctx()
1350 dstctx->mdctx = NULL; in rsa_dupctx()
1351 dstctx->tbuf = NULL; in rsa_dupctx()
1352 dstctx->propq = NULL; in rsa_dupctx()
1379 return dstctx; in rsa_dupctx()
[all …]
H A Deddsa_sig.c751 PROV_EDDSA_CTX *dstctx; in eddsa_dupctx() local
756 dstctx = OPENSSL_zalloc(sizeof(*srcctx)); in eddsa_dupctx()
757 if (dstctx == NULL) in eddsa_dupctx()
760 *dstctx = *srcctx; in eddsa_dupctx()
761 dstctx->key = NULL; in eddsa_dupctx()
767 dstctx->key = srcctx->key; in eddsa_dupctx()
769 return dstctx; in eddsa_dupctx()
771 eddsa_freectx(dstctx); in eddsa_dupctx()
/openssl/providers/implementations/kem/
H A Drsa_kem.c112 PROV_RSA_CTX *dstctx; in rsakem_dupctx() local
117 dstctx = OPENSSL_zalloc(sizeof(*srcctx)); in rsakem_dupctx()
118 if (dstctx == NULL) in rsakem_dupctx()
121 *dstctx = *srcctx; in rsakem_dupctx()
122 if (dstctx->rsa != NULL && !RSA_up_ref(dstctx->rsa)) { in rsakem_dupctx()
123 OPENSSL_free(dstctx); in rsakem_dupctx()
126 return dstctx; in rsakem_dupctx()
/openssl/test/
H A Dtls-provider.c531 if (dstctx == NULL) in xor_dupctx()
534 *dstctx = *srcctx; in xor_dupctx()
536 return dstctx; in xor_dupctx()
2935 PROV_XORSIG_CTX *dstctx; in xor_sig_dupctx() local
2938 if (dstctx == NULL) in xor_sig_dupctx()
2941 *dstctx = *srcctx; in xor_sig_dupctx()
2942 dstctx->sig = NULL; in xor_sig_dupctx()
2943 dstctx->md = NULL; in xor_sig_dupctx()
2944 dstctx->mdctx = NULL; in xor_sig_dupctx()
2945 dstctx->aid = NULL; in xor_sig_dupctx()
[all …]

Completed in 58 milliseconds