diff options
author | tb <> | 2024-04-17 14:00:17 +0000 |
---|---|---|
committer | tb <> | 2024-04-17 14:00:17 +0000 |
commit | 890c50bb0eece51229ea3b1e14532004304699a3 (patch) | |
tree | dba3b36e3d114e39957b02f82d1354708720821b /src/lib/libcrypto/crypto_internal.h | |
parent | 21c1d53a4df6641a3f58120b16a3324c92786156 (diff) | |
download | openbsd-890c50bb0eece51229ea3b1e14532004304699a3.tar.gz openbsd-890c50bb0eece51229ea3b1e14532004304699a3.tar.bz2 openbsd-890c50bb0eece51229ea3b1e14532004304699a3.zip |
ecdh_cms_encrypt(): tweak wrap_algor construction
This manually constructs an X509_ALGOR because the (now internal) legacy
interface EVP_CIPHER_param_to_asn1() (which is an unwelcome complication
thanks to RC2) is entirely incompatible with X509_ALGOR_set0() since
the ASN1_TYPE can't be pulled apart nicely (because the ASN1_TYPE API
is incomplete as well).
Once we got this far, we get to DER-encode the inner AlgorithmIdentifier
and set that blob as the parameters of another one. The same variables
are reused of course and needless to say an unchecked X509_ALGOR_set0()
would leak this blob on failure. So fix this by switching to the usual
error checked X509_ALGOR_set0_by_nid().
ok jsing
Diffstat (limited to 'src/lib/libcrypto/crypto_internal.h')
0 files changed, 0 insertions, 0 deletions