mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-03-15 06:48:10 +08:00
Allow loading DER-encoded CRLs
This commit is contained in:
14
src/tlslib.c
14
src/tlslib.c
@@ -766,15 +766,15 @@ struct stat st;
|
|||||||
gnutls_certificate_set_x509_crl_file(creds->xcred,
|
gnutls_certificate_set_x509_crl_file(creds->xcred,
|
||||||
s->config->crl,
|
s->config->crl,
|
||||||
GNUTLS_X509_FMT_PEM);
|
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) {
|
if (ret < 0) {
|
||||||
/* ignore the CRL file when empty */
|
/* ignore the CRL file when empty */
|
||||||
if (ret == GNUTLS_E_BASE64_DECODING_ERROR) {
|
mslog(s, NULL, LOG_ERR, "error reading the CRL (%s) file: %s",
|
||||||
mslog(s, NULL, LOG_ERR, "unreadable CRL file (%s)",
|
s->config->crl, gnutls_strerror(ret));
|
||||||
s->config->crl);
|
|
||||||
} else {
|
|
||||||
mslog(s, NULL, LOG_ERR, "error reading the CRL (%s) file: %s",
|
|
||||||
s->config->crl, gnutls_strerror(ret));
|
|
||||||
}
|
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
mslog(s, NULL, LOG_INFO, "loaded CRL: %s", s->config->crl);
|
mslog(s, NULL, LOG_INFO, "loaded CRL: %s", s->config->crl);
|
||||||
|
|||||||
Reference in New Issue
Block a user