tlscertificate: add support for certificate chains
authorAleix Conchillo Flaqué <aconchillo@gmail.com>
Mon, 6 Oct 2014 17:19:48 +0000 (10:19 -0700)
committerAleix Conchillo Flaqué <aconchillo@src.gnome.org>
Mon, 6 Oct 2014 17:19:48 +0000 (10:19 -0700)
commitda053e345b4729a8a166eca54da257ae9accc7b1
treeaaa537d84f08f238860498d693d7d1c81ea1091f
parent4454b815367831a71b1ae00b0182b5b389a78df2
tlscertificate: add support for certificate chains

This patch changes the behavior of the following functions:

   g_tls_certificate_new_from_pem
   g_tls_certificate_new_from_file
   g_tls_certificate_new_from_files

If more than one certificate is found it will try to load the chain.

It is assumed that the chain will be in the right order (top-level
certificate will be the last one in the file). If the chain cannot be
verified, the first certificate in the file will be returned as before.

https://bugzilla.gnome.org/show_bug.cgi?id=729739
gio/gtlscertificate.c