gnutls_certificate_verify_peers2 failing with GNUTLS_E_INVALID_REQUEST

Nikos Mavrogiannopoulos nmav at gnutls.org
Thu Aug 2 01:36:20 CEST 2012


On 08/01/2012 11:10 AM, sneeboo wrote:

> 
> Hello, as a complete novice in gnutls (and in security in general)  I am
> doing some development using libmicrohttpd with the purpose of developing a
> webserver that works with client certificates for user authorization
> purposes.
> 
> I am starting my work by cloning the example in the libmicrohttpd tutorial.
> This code uses gnutls_certificate_verify_peers2 () to obtain the certificate
> of the connection in order to proceed with the required validations.
> 
> The problem is that gnutls_certificate_verify_peers2() fails with
> GNUTLS_E_INVALID_REQUEST. Is there anyone that might give me a pointer of
> what could be the reason? the only sensible parameter that this function
> accepts as input is the tls session that in libmicrohttpd code is obtained
> with a call as follows

You must have a gnutls session established before calling the
certificate_verify_peers2(). To pinpoint the issue you can try the
debugging functions listed in:
http://www.gnu.org/software/gnutls/manual/html_node/Debugging-and-auditing.html#Debugging-and-auditing


regards,
Nikos




More information about the Gnutls-devel mailing list