When setting up TLS with cert-type OpenPGP from a client,
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Sat, 10 Jan 2015 11:12:25 +0000 (12:12 +0100)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Sat, 10 Jan 2015 11:12:25 +0000 (12:12 +0100)
commitd7abc0b7ccded0fa25ec8cfe0169addfb496d5fa
tree287146e62c7ca9027e08bc8179263299bceddec7
parent2bf116e5e5b0080a60aab0dae63c13cb10e710d8
When setting up TLS with cert-type OpenPGP from a client,
the server verifies if it supports the extension’s contents
in _gnutls_session_cert_type_supported().  This function
checks for cred->get_cert_callback but not cred->get_cert_callback2.
As a result, servers setup for OpenPGP certificate credential
callback with gnutls_certificate_set_retrieve_function2() are
unable to use the OpenPGP certificate type.

The solution is to consider cred->get_cert_callback2 alongside
cred->get_cert_callback in _gnutls_session_cert_type_supported().

Patch by Rick van Rein.
lib/gnutls_state.c