Allow loading DER-encoded CRLs

This commit is contained in:
Nikos Mavrogiannopoulos
2015-09-14 18:46:20 +02:00
parent 998c0dae4b
commit 9ef5569c7c

View File

@@ -766,15 +766,15 @@ struct stat st;
gnutls_certificate_set_x509_crl_file(creds->xcred,
s->config->crl,
GNUTLS_X509_FMT_PEM);
if (ret == GNUTLS_E_BASE64_DECODING_ERROR)
ret =
gnutls_certificate_set_x509_crl_file(creds->xcred,
s->config->crl,
GNUTLS_X509_FMT_DER);
if (ret < 0) {
/* ignore the CRL file when empty */
if (ret == GNUTLS_E_BASE64_DECODING_ERROR) {
mslog(s, NULL, LOG_ERR, "unreadable CRL file (%s)",
s->config->crl);
} else {
mslog(s, NULL, LOG_ERR, "error reading the CRL (%s) file: %s",
s->config->crl, gnutls_strerror(ret));
}
mslog(s, NULL, LOG_ERR, "error reading the CRL (%s) file: %s",
s->config->crl, gnutls_strerror(ret));
exit(1);
}
mslog(s, NULL, LOG_INFO, "loaded CRL: %s", s->config->crl);