Hi,
Trust chains:
CLIENT_CERT -> CA -> ROOT_CA
SERVER_CERT -> OTHER_CA -> ROOT_CA
All certificates except ROOT_CA have an "id-ce-cRLDistributionPoints" extension.
Configuration:
CA, OTHER_CA, and ROOT_CA are added to the certificate-bag in the ietf-truststore module.
SERVER_CERT and corresponding keys, etc. are also configured accordingly.
Observation:
When mutual TLS session is established, CRLs are downloaded for SERVER_CERT, OTHER_CA and CA, but not for certificates received from the peer:
https://github.com/CESNET/libnetconf2/blob/284ee667445c34402ebbe83c5b38344d6283d6ce/src/session.c#L1833
Then, because there are some CRLs downloaded for local certificares, openssl is configured to enable CRL check: https://github.com/CESNET/libnetconf2/blob/284ee667445c34402ebbe83c5b38344d6283d6ce/src/session_openssl.c#L906
CRL check now is enabled for all certificates. As a result, CRL check fails for the CLIENT_CERT (which also has CRL distribution point field), because its CRL is never downloaded. In the debug output it looks like:
[INF]: LN: Cert verify: fail (unable to get certificate CRL).
[ERR]: LN: Client certificate error (unable to get certificate CRL).
[ERR]: LN: TLS accept failed (certificate verify failed).
Expected behavior:
If CRL extension is present in certificate, it should be downloaded for both local and peer certificates.
Thanks!
Hi,
Trust chains:
All certificates except ROOT_CA have an "id-ce-cRLDistributionPoints" extension.
Configuration:
CA, OTHER_CA, and ROOT_CA are added to the certificate-bag in the ietf-truststore module.
SERVER_CERT and corresponding keys, etc. are also configured accordingly.
Observation:
When mutual TLS session is established, CRLs are downloaded for SERVER_CERT, OTHER_CA and CA, but not for certificates received from the peer:
https://github.com/CESNET/libnetconf2/blob/284ee667445c34402ebbe83c5b38344d6283d6ce/src/session.c#L1833
Then, because there are some CRLs downloaded for local certificares, openssl is configured to enable CRL check: https://github.com/CESNET/libnetconf2/blob/284ee667445c34402ebbe83c5b38344d6283d6ce/src/session_openssl.c#L906
CRL check now is enabled for all certificates. As a result, CRL check fails for the CLIENT_CERT (which also has CRL distribution point field), because its CRL is never downloaded. In the debug output it looks like:
Expected behavior:
If CRL extension is present in certificate, it should be downloaded for both local and peer certificates.
Thanks!