diff options
author | tb <> | 2021-11-05 17:15:05 +0000 |
---|---|---|
committer | tb <> | 2021-11-05 17:15:05 +0000 |
commit | ce3e1e635eb18f169ffcf8680f7f44ca582adf35 (patch) | |
tree | 4692ac58ae174ac3dd85c669147b251664e29b67 /src/lib/libc | |
parent | 1bf191415816e13d5d45a0ef96bd514e64c912fb (diff) | |
download | openbsd-ce3e1e635eb18f169ffcf8680f7f44ca582adf35.tar.gz openbsd-ce3e1e635eb18f169ffcf8680f7f44ca582adf35.tar.bz2 openbsd-ce3e1e635eb18f169ffcf8680f7f44ca582adf35.zip |
Clean up X509_STORE_add_{cert,crl}().
Add a X509_STORE_add_object() function that adds an X509 object to the
store and takes care of locking and cleaning up. This way we can set up
an X509_OBJECT for both the cert and CRL case and hand over to the new
function.
There is one intentional change of behavior: if there is an attempt to
add an object which is already present in the store, succeed instead of
throwing an error. This makes sense and is also the OpenSSL behavior.
As pointed out by jsing, this is a partial fix for the long standing
GH issue #100 on libtls where connections would fail if the store
contains duplicate certificates.
Also: remove the internal X509_OBJECT_dec_ref_count(), which is no
longer used.
ok jsing
Diffstat (limited to 'src/lib/libc')
0 files changed, 0 insertions, 0 deletions