help-gnutls
[Top][All Lists]
Advanced

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

[Help-gnutls] Re: Certs directory for peer certificate validation


From: Simon Josefsson
Subject: [Help-gnutls] Re: Certs directory for peer certificate validation
Date: Mon, 15 May 2006 18:10:15 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux)

Albert Chin <address@hidden> writes:

> On Mon, May 15, 2006 at 02:05:45PM +0200, Simon Josefsson wrote:
>> Albert Chin <address@hidden> writes:
>> 
>> > OpenSSL has a directory and path for certificates in PEM format used
>> > to verify a peer certificate (i.e. CAfile and CApath). Does GnuTLS
>> > have similar functionality?
>> 
>> GnuTLS does not support reading all files in a directory, but it
>> supports reading CA certificates in PEM format from a file, see
>> gnutls_certificate_set_x509_trust_file().  You'll call
>> gnutls_certificate_verify_peers2() to use it.
>
> Is there a default CA certificate file or do all clients need to call
> gnutls_certificate_set_x509_trust_file()?

There is no default CA certificate file for all GnuTLS applications,
all applications must call that function internally, and have a local
policy on which CAs are acceptable, and thus, generally, a different
path for each application.

I'm not sure it is possible to have a "default CA" file/path that
works fine for all kind of GnuTLS applications.  The kind of CAs that
are OK for one application may be unacceptable for another, and vice
versa.

It may be useful to centralize certificates per-usage on a single
machine though, for improve user experience.  It may make sense to
have a "default" file with CA's used by all IMAP GnuTLS application on
a host, one for all HTTPS GnuTLS applications and so on.  There could
be some GNOME tool to manage the certificates, per usage.

Alternatively, creating a gnutls_certificate_set_x509_trust_dir() and
have it read files a'la OpenSSL may be a solution too.

/Simon




reply via email to

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