Home
last modified time | relevance | path

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

/openssl/providers/implementations/exchange/
H A Ddh_exch.c288 PROV_DH_CTX *srcctx = (PROV_DH_CTX *)vpdhctx; in dh_dupctx() local
294 dstctx = OPENSSL_zalloc(sizeof(*srcctx)); in dh_dupctx()
298 *dstctx = *srcctx; in dh_dupctx()
305 if (srcctx->dh != NULL && !DH_up_ref(srcctx->dh)) in dh_dupctx()
308 dstctx->dh = srcctx->dh; in dh_dupctx()
310 if (srcctx->dhpeer != NULL && !DH_up_ref(srcctx->dhpeer)) in dh_dupctx()
313 dstctx->dhpeer = srcctx->dhpeer; in dh_dupctx()
315 if (srcctx->kdf_md != NULL && !EVP_MD_up_ref(srcctx->kdf_md)) in dh_dupctx()
318 dstctx->kdf_md = srcctx->kdf_md; in dh_dupctx()
321 if (srcctx->kdf_ukm != NULL && srcctx->kdf_ukmlen > 0) { in dh_dupctx()
[all …]
H A Decdh_exch.c195 PROV_ECDH_CTX *srcctx = (PROV_ECDH_CTX *)vpecdhctx; in ecdh_dupctx() local
201 dstctx = OPENSSL_zalloc(sizeof(*srcctx)); in ecdh_dupctx()
205 *dstctx = *srcctx; in ecdh_dupctx()
216 if (srcctx->k != NULL && !EC_KEY_up_ref(srcctx->k)) in ecdh_dupctx()
219 dstctx->k = srcctx->k; in ecdh_dupctx()
221 if (srcctx->peerk != NULL && !EC_KEY_up_ref(srcctx->peerk)) in ecdh_dupctx()
224 dstctx->peerk = srcctx->peerk; in ecdh_dupctx()
226 if (srcctx->kdf_md != NULL && !EVP_MD_up_ref(srcctx->kdf_md)) in ecdh_dupctx()
229 dstctx->kdf_md = srcctx->kdf_md; in ecdh_dupctx()
232 if (srcctx->kdf_ukm != NULL && srcctx->kdf_ukmlen > 0) { in ecdh_dupctx()
[all …]
H A Dkdf_exch.c143 PROV_KDF_CTX *srcctx = (PROV_KDF_CTX *)vpkdfctx; in kdf_dupctx() local
149 dstctx = OPENSSL_zalloc(sizeof(*srcctx)); in kdf_dupctx()
153 *dstctx = *srcctx; in kdf_dupctx()
155 dstctx->kdfctx = EVP_KDF_CTX_dup(srcctx->kdfctx); in kdf_dupctx()
H A Decx_exch.c153 PROV_ECX_CTX *srcctx = (PROV_ECX_CTX *)vecxctx; in ecx_dupctx() local
159 dstctx = OPENSSL_zalloc(sizeof(*srcctx)); in ecx_dupctx()
163 *dstctx = *srcctx; in ecx_dupctx()
/openssl/providers/implementations/signature/
H A Dsm2_sig.c353 dstctx = OPENSSL_zalloc(sizeof(*srcctx)); in sm2sig_dupctx()
357 *dstctx = *srcctx; in sm2sig_dupctx()
364 if (srcctx->ec != NULL && !EC_KEY_up_ref(srcctx->ec)) in sm2sig_dupctx()
366 dstctx->ec = srcctx->ec; in sm2sig_dupctx()
368 if (srcctx->propq != NULL) { in sm2sig_dupctx()
374 if (srcctx->md != NULL && !EVP_MD_up_ref(srcctx->md)) in sm2sig_dupctx()
376 dstctx->md = srcctx->md; in sm2sig_dupctx()
378 if (srcctx->mdctx != NULL) { in sm2sig_dupctx()
385 if (srcctx->id != NULL) { in sm2sig_dupctx()
389 dstctx->id_len = srcctx->id_len; in sm2sig_dupctx()
[all …]
H A Dmac_legacy_sig.c174 PROV_MAC_CTX *srcctx = (PROV_MAC_CTX *)vpmacctx; in mac_dupctx() local
180 dstctx = OPENSSL_zalloc(sizeof(*srcctx)); in mac_dupctx()
184 *dstctx = *srcctx; in mac_dupctx()
189 if (srcctx->propq != NULL && (dstctx->propq = OPENSSL_strdup(srcctx->propq)) == NULL) in mac_dupctx()
192 if (srcctx->key != NULL && !ossl_mac_key_up_ref(srcctx->key)) in mac_dupctx()
194 dstctx->key = srcctx->key; in mac_dupctx()
196 if (srcctx->macctx != NULL) { in mac_dupctx()
197 dstctx->macctx = EVP_MAC_CTX_dup(srcctx->macctx); in mac_dupctx()
H A Decdsa_sig.c623 PROV_ECDSA_CTX *srcctx = (PROV_ECDSA_CTX *)vctx; in ecdsa_dupctx() local
629 dstctx = OPENSSL_zalloc(sizeof(*srcctx)); in ecdsa_dupctx()
633 *dstctx = *srcctx; in ecdsa_dupctx()
637 if (srcctx->ec != NULL && !EC_KEY_up_ref(srcctx->ec)) in ecdsa_dupctx()
640 if (srcctx->kinv != NULL || srcctx->r != NULL) in ecdsa_dupctx()
642 dstctx->ec = srcctx->ec; in ecdsa_dupctx()
644 if (srcctx->md != NULL && !EVP_MD_up_ref(srcctx->md)) in ecdsa_dupctx()
646 dstctx->md = srcctx->md; in ecdsa_dupctx()
648 if (srcctx->mdctx != NULL) { in ecdsa_dupctx()
655 if (srcctx->propq != NULL) { in ecdsa_dupctx()
[all …]
H A Ddsa_sig.c628 PROV_DSA_CTX *srcctx = (PROV_DSA_CTX *)vpdsactx; in dsa_dupctx() local
634 dstctx = OPENSSL_zalloc(sizeof(*srcctx)); in dsa_dupctx()
638 *dstctx = *srcctx; in dsa_dupctx()
642 if (srcctx->dsa != NULL && !DSA_up_ref(srcctx->dsa)) in dsa_dupctx()
644 dstctx->dsa = srcctx->dsa; in dsa_dupctx()
646 if (srcctx->md != NULL && !EVP_MD_up_ref(srcctx->md)) in dsa_dupctx()
648 dstctx->md = srcctx->md; in dsa_dupctx()
650 if (srcctx->mdctx != NULL) { in dsa_dupctx()
653 || !EVP_MD_CTX_copy_ex(dstctx->mdctx, srcctx->mdctx)) in dsa_dupctx()
657 if (srcctx->propq != NULL) { in dsa_dupctx()
[all …]
H A Drsa_sig.c1336 PROV_RSA_CTX *srcctx = (PROV_RSA_CTX *)vprsactx; in rsa_dupctx() local
1342 dstctx = OPENSSL_zalloc(sizeof(*srcctx)); in rsa_dupctx()
1346 *dstctx = *srcctx; in rsa_dupctx()
1354 if (srcctx->rsa != NULL && !RSA_up_ref(srcctx->rsa)) in rsa_dupctx()
1356 dstctx->rsa = srcctx->rsa; in rsa_dupctx()
1358 if (srcctx->md != NULL && !EVP_MD_up_ref(srcctx->md)) in rsa_dupctx()
1360 dstctx->md = srcctx->md; in rsa_dupctx()
1362 if (srcctx->mgf1_md != NULL && !EVP_MD_up_ref(srcctx->mgf1_md)) in rsa_dupctx()
1364 dstctx->mgf1_md = srcctx->mgf1_md; in rsa_dupctx()
1366 if (srcctx->mdctx != NULL) { in rsa_dupctx()
[all …]
H A Deddsa_sig.c750 PROV_EDDSA_CTX *srcctx = (PROV_EDDSA_CTX *)vpeddsactx; in eddsa_dupctx() local
756 dstctx = OPENSSL_zalloc(sizeof(*srcctx)); in eddsa_dupctx()
760 *dstctx = *srcctx; in eddsa_dupctx()
763 if (srcctx->key != NULL && !ossl_ecx_key_up_ref(srcctx->key)) { in eddsa_dupctx()
767 dstctx->key = srcctx->key; in eddsa_dupctx()
/openssl/providers/implementations/asymciphers/
H A Dsm2_enc.c134 PROV_SM2_CTX *srcctx = (PROV_SM2_CTX *)vpsm2ctx; in sm2_dupctx() local
137 dstctx = OPENSSL_zalloc(sizeof(*srcctx)); in sm2_dupctx()
141 *dstctx = *srcctx; in sm2_dupctx()
149 if (!ossl_prov_digest_copy(&dstctx->md, &srcctx->md)) { in sm2_dupctx()
H A Drsa_enc.c330 PROV_RSA_CTX *srcctx = (PROV_RSA_CTX *)vprsactx; in rsa_dupctx() local
336 dstctx = OPENSSL_zalloc(sizeof(*srcctx)); in rsa_dupctx()
340 *dstctx = *srcctx; in rsa_dupctx()
/openssl/providers/implementations/kem/
H A Drsa_kem.c111 PROV_RSA_CTX *srcctx = (PROV_RSA_CTX *)vprsactx; in rsakem_dupctx() local
117 dstctx = OPENSSL_zalloc(sizeof(*srcctx)); in rsakem_dupctx()
121 *dstctx = *srcctx; in rsakem_dupctx()
/openssl/test/
H A Dtls-provider.c527 PROV_XORKEMKEX_CTX *srcctx = (PROV_XORKEMKEX_CTX *)vpxorctx; in xor_dupctx() local
530 dstctx = OPENSSL_zalloc(sizeof(*srcctx)); in xor_dupctx()
534 *dstctx = *srcctx; in xor_dupctx()
2934 PROV_XORSIG_CTX *srcctx = (PROV_XORSIG_CTX *)vpxor_sigctx; in xor_sig_dupctx() local
2937 dstctx = OPENSSL_zalloc(sizeof(*srcctx)); in xor_sig_dupctx()
2941 *dstctx = *srcctx; in xor_sig_dupctx()
2947 if ((srcctx->sig != NULL) && !xor_key_up_ref(srcctx->sig)) in xor_sig_dupctx()
2949 dstctx->sig = srcctx->sig; in xor_sig_dupctx()
2951 if (srcctx->md != NULL && !EVP_MD_up_ref(srcctx->md)) in xor_sig_dupctx()
2953 dstctx->md = srcctx->md; in xor_sig_dupctx()
[all …]

Completed in 44 milliseconds