diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2003-12-16 11:49:40 +0000 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2003-12-16 11:49:40 +0000 |
commit | b929e5b3cde43482d4f502260c06cf1270079755 (patch) | |
tree | f1e7884e55bd5c83ab53038fe67eecc9770b3ef2 /lib/gnutls_ui.c | |
parent | 36b34cea246de4ffa74d2ec55040747ead89ea2c (diff) | |
download | gnutls-b929e5b3cde43482d4f502260c06cf1270079755.tar.gz |
* The error codes GNUTLS_E_NO_TEMPORARY_DH_PARAMS and GNUTLS_E_NO_TEMPORARY_RSA_PARAMS
are no longer returned by the handshake function. Ciphersuites that
require temporary parameters are removed when such parameters do not exist.
* Several internal changes to allow adding the callback function to retrieve
the certificate and the private key.
Diffstat (limited to 'lib/gnutls_ui.c')
-rw-r--r-- | lib/gnutls_ui.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/lib/gnutls_ui.c b/lib/gnutls_ui.c index dc5207efe2..bf157596db 100644 --- a/lib/gnutls_ui.c +++ b/lib/gnutls_ui.c @@ -196,7 +196,6 @@ int gnutls_dh_get_peers_public_bits(gnutls_session session) const gnutls_datum *gnutls_certificate_get_ours(gnutls_session session) { const gnutls_certificate_credentials cred; - int index; CHECK_AUTH(GNUTLS_CRD_CERTIFICATE, NULL); @@ -206,15 +205,10 @@ const gnutls_datum *gnutls_certificate_get_ours(gnutls_session session) return NULL; } - index = session->internals.selected_cert_index; - if (index < 0) { - gnutls_assert(); - return NULL; /* no certificate */ - } - - if (cred->ncerts > (unsigned int) index) - return &cred->cert_list[index][0].raw; - return NULL; + if (session->internals.selected_cert_list == NULL) + return NULL; + + return &session->internals.selected_cert_list[0].raw; } /** |