help-gnutls
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help needed with x.509 certificate


From: Nikos Mavrogiannopoulos
Subject: Re: Help needed with x.509 certificate
Date: Fri, 18 Nov 2011 18:44:25 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20111010 Icedove/3.1.15

On 11/18/2011 04:33 AM, Rebel Neurofog wrote:
> Hi!
> 
> I'm implementing network security for my project.
> But now I'm stuck writing a sample with both client and server certificates.
> So here's what happens:
> 
> 1. I've generated all the keys and certificates needed to run GnuTLS examples.
> 2. Server works fine and client gets it's echo message as in examples.
> 3. But even though I do 'gnutls_certificate_server_set_request
> (session, GNUTLS_CERT_REQUEST);'
> on server side and also do 'gnutls_certificate_set_x509_key_file
> (xcred, CERTFILE, KEYFILE, GNUTLS_X509_FMT_PEM));'
> on client side which returns no error, there's no certificate received
> by server.
> 4. And if I do 'gnutls_certificate_server_set_request (session,
> GNUTLS_CERT_REQUIRE);' instead of REQUEST,
> server of course declines handshake with "The peer did not send any
> certificate." message.
> 
> I guess, I miss something...

As Mike mentioned, you must be missing something. What you need to do is
just use the client example from the documentation and add a call to
gnutls_certificate_set_x509_key_file(), or use the example "Using a
callback to select the certificate to use".

regards,
Nikos



reply via email to

[Prev in Thread] Current Thread [Next in Thread]