]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
removed gnutls_certificate_get_ours_index()
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Thu, 7 Feb 2002 19:08:53 +0000 (19:08 +0000)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Thu, 7 Feb 2002 19:08:53 +0000 (19:08 +0000)
lib/gnutls_ui.c
lib/gnutls_ui.h

index dee84b9f5ca1a3917652be67bce937f0fc5396e1..2e472dc14bd3c680b5304d5304e0661f401de208 100644 (file)
@@ -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
index 55784b9dee074bb01e2dc7037767333ae0284179..fcaf3307710c6ba3fb3cabaee4982fa70c6c3fee 100644 (file)
@@ -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);