From: Nikos Mavrogiannopoulos Date: Thu, 7 Feb 2002 19:08:53 +0000 (+0000) Subject: removed gnutls_certificate_get_ours_index() X-Git-Tag: gnutls_0_3_90~102 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=97fac7bcf554e4056d3f8c00a16157bd15864105;p=thirdparty%2Fgnutls.git removed gnutls_certificate_get_ours_index() --- diff --git a/lib/gnutls_ui.c b/lib/gnutls_ui.c index dee84b9f5c..2e472dc14b 100644 --- a/lib/gnutls_ui.c +++ b/lib/gnutls_ui.c @@ -133,35 +133,6 @@ const gnutls_datum *gnutls_certificate_get_ours(GNUTLS_STATE state) return &cred->cert_list[index]->raw; } -/** - * gnutls_certificate_get_ours_index - This function returns the index of the certificate sent in the last handshake - * @state: is a gnutls state - * - * This function will return the index of the certificate sent to - * the peer, in the last handshake. The index depends on the sequence - * that the certificates were added, and the first certificate is assigned 0. - * Returns a negative value in case of an error, or if no certificate was sent. - * - **/ -int gnutls_certificate_get_ours_index(GNUTLS_STATE state) -{ - const GNUTLS_CERTIFICATE_CREDENTIALS cred; - int index; - - CHECK_AUTH(GNUTLS_CRD_CERTIFICATE, GNUTLS_E_INVALID_REQUEST); - - cred = _gnutls_get_cred(state->gnutls_key, GNUTLS_CRD_CERTIFICATE, NULL); - if (cred == NULL) { - gnutls_assert(); - return GNUTLS_E_INSUFICIENT_CRED; - } - - index = state->gnutls_internals.selected_cert_index; - if (index < 0) return GNUTLS_E_NO_CERTIFICATE_FOUND; /* no certificate */ - - return index; -} - /** * gnutls_certificate_get_peers - This function returns the peer's raw certificate * @state: is a gnutls state diff --git a/lib/gnutls_ui.h b/lib/gnutls_ui.h index 55784b9dee..fcaf330771 100644 --- a/lib/gnutls_ui.h +++ b/lib/gnutls_ui.h @@ -97,7 +97,6 @@ int gnutls_openpgp_verify_key( const gnutls_datum* key_list, int key_list_length /* get data from the state */ const gnutls_datum* gnutls_certificate_get_peers( GNUTLS_STATE, int* list_size); const gnutls_datum *gnutls_certificate_get_ours(GNUTLS_STATE state); -int gnutls_certificate_get_ours_index(GNUTLS_STATE state); int gnutls_certificate_client_get_request_status( GNUTLS_STATE); int gnutls_certificate_verify_peers( GNUTLS_STATE);