summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2007-12-13 15:36:45 +0100
committerSimon Josefsson <simon@josefsson.org>2007-12-13 15:38:18 +0100
commit0420cc1ec5dd8c4c18268abb9f769c1641098925 (patch)
treeb7ce7a8eaf3571a14817c215e9bc3cc10c039573
parent340960352828c4e9bf973a072ceb100298a1c90b (diff)
downloadgnutls-0420cc1ec5dd8c4c18268abb9f769c1641098925.tar.gz
If the server has a callback, the search for a valid certificate will fail.
Patch from Nikos.
-rw-r--r--lib/gnutls_state.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/gnutls_state.c b/lib/gnutls_state.c
index c95f723d7a..ba97da2368 100644
--- a/lib/gnutls_state.c
+++ b/lib/gnutls_state.c
@@ -127,7 +127,8 @@ _gnutls_session_cert_type_supported (gnutls_session_t session,
unsigned cert_found = 0;
gnutls_certificate_credentials_t cred;
- if (session->security_parameters.entity == GNUTLS_SERVER)
+ if (session->security_parameters.entity == GNUTLS_SERVER &&
+ session->server_get_cert_callback == NULL)
{
cred = (gnutls_certificate_credentials_t)
_gnutls_get_cred (session->key, GNUTLS_CRD_CERTIFICATE, NULL);