]> git.ipfire.org Git - thirdparty/gnutls.git/commit
cert-cred: fix possible segfault when resetting cert retrieval function
authorDmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Fri, 20 Jul 2018 17:49:28 +0000 (20:49 +0300)
committerDmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Tue, 24 Jul 2018 07:39:57 +0000 (10:39 +0300)
commit3df5b7bc8a6496eb9efdb3586d25bfab109e78db
tree6f7400a8c30e68819575806ba7b602b64b6d921d
parentaf833f3448b618662dae92141fcdf7b6d18c854b
cert-cred: fix possible segfault when resetting cert retrieval function

Reset get_cert_callback3 callback to NULL if provided callback is NULL.
Otherwise after the certificate request call_legacy_cert_cb1 /
call_legacy_cert_cb2 will try to unconditionally call legacy_cert_cb1 /
legacy_cert_cb2 callback (set to NULL) leading to segfault.

Fixes: 9829ef9a3ca06d60472599df7c74ebb9a53f1fe2
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
lib/cert-cred.c
tests/Makefile.am
tests/null_retrieve_function.c [new file with mode: 0644]