]> git.ipfire.org Git - thirdparty/hostap.git/commit
GnuTLS: Fix DER encoding certificate parsing
authorJouni Malinen <j@w1.fi>
Sun, 11 Jan 2015 14:57:26 +0000 (16:57 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 11 Jan 2015 22:19:21 +0000 (00:19 +0200)
commit79b1dd9aad013271deb5ebd97c1e7e87c83021e9
treebbbef94897af8f08d20f2b07050b97dd60035fb1
parent3b51cc6359ab994549193616b1383e7503b1c194
GnuTLS: Fix DER encoding certificate parsing

It looks like GnuTLS may return success on
gnutls_certificate_set_x509_*() functions with GNUTLS_X509_FMT_PEM even
when trying to read DER encoded information. Reverse the order of
parsing attempts so that we start with DER and then move to PEM if
GnuTLS reports failure on DER parsing. This seems to be more reliable
way of getting errors reported and both cases can now be handled.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/crypto/tls_gnutls.c