Fix gnutls_x509_trust_list_add_trust_mem with DER-format certificates.
commit440801eaa6333f03a46e57c59e4d97764391afae
authorMarti Raudsepp <marti@juffo.org>
Mon, 3 Sep 2012 17:58:54 +0000 (3 20:58 +0300)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Mon, 3 Sep 2012 19:48:38 +0000 (3 21:48 +0200)
tree82b05f546fc0496851757beec56ecc2c4171fb87
parenta67d5e78c8eb7d81c9fcd92bf92f4eb60d4f3a60
Fix gnutls_x509_trust_list_add_trust_mem with DER-format certificates.

The function took a "type" argument and then happily proceeded to ignore
it and try PEM format anyway.

Most importantly, this makes gnutls_x509_trust_list_add_system_trust
work on Windows, which loads DER certificates using this function.  I'll
be damned if that actually ever worked properly -- certainly not in any
git version. :)

Also added test for gnutls_x509_trust_list_add_trust_mem.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
lib/x509/verify-high2.c
tests/x509cert-tl.c