summaryrefslogtreecommitdiff
path: root/src/lib/libssl
diff options
context:
space:
mode:
authorop <>2023-05-25 07:46:21 +0000
committerop <>2023-05-25 07:46:21 +0000
commitd9e5f520e02c69e7bb007ce9e7466dbf19dad201 (patch)
tree5528bbfa78941f58360ca3ddf165e208510ee895 /src/lib/libssl
parent586ba9a5155b6cb379d532ed6383502ab9832610 (diff)
downloadopenbsd-d9e5f520e02c69e7bb007ce9e7466dbf19dad201.tar.gz
openbsd-d9e5f520e02c69e7bb007ce9e7466dbf19dad201.tar.bz2
openbsd-d9e5f520e02c69e7bb007ce9e7466dbf19dad201.zip
Forcibly update the EVP_PKEY's internal key
To aid privilege separation, libtls maintains application-specific data on the key inside the EVP_PKEY abstraction because the EVP API doesn't provide a way to do that on the EVP_PKEY itself. OpenSSL 3 changed behavior of EVP_PKEY_get1_RSA() and related functions. These now return a struct from some cache. Thus, modifying the RSA will no longer modify the EVP_PKEY like it did previously, which was clearly implied to be the case in the older documentation. This is a subtle breaking change that affects several applications. While this is documented, no real solution is provided. The transition plan from one OpenSSL major version to the next one tends to involve many #ifdef in the ecosystem, and the only suggestion provided by the new documentation is to switch to a completely unrelated, new API. Instead, forcibly reset the internal key on EVP_PKEY after modification, this way the change is picked up also by OpenSSL 3. Fixes issue 1171 in OpenSMTPD-portable ok tb@, jsing@
Diffstat (limited to 'src/lib/libssl')
0 files changed, 0 insertions, 0 deletions