gnutls_certificate_verify_peers2 failing with GNUTLS_E_INVALID_REQUEST

sneeboo oronzo10010 at
Wed Aug 1 11:10:31 CEST 2012

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

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

MHD_get_connection_info (connection, MHD_CONNECTION_INFO_GNUTLS_SESSION)

The other parameter of gnutls_certificate_verify_peers2 is an ouput one and
should give no problem

View this message in context:
Sent from the GnuPG - Gnutls - Dev mailing list archive at

More information about the Gnutls-devel mailing list