(Created page with "== Enforce certificate hostname checks == Since Fedora 21 (http://fedoraproject.org/wiki/Changes/CryptoPolicy) there are policies for the usage of SSL and TLS cryptographic pr...") |
No edit summary |
||
Line 37: | Line 37: | ||
&status); | &status); | ||
</pre> | </pre> | ||
Alternatively, if support or gnutls 2.x is necessary, a valid alternative is to use '''gnutls_certificate_verify_peers2()''' with '''gnutls_x509_crt_check_hostname()''' | |||
}} | }} | ||
* '''NSS applications''': | * '''NSS applications''': | ||
** The application should either be calling '''SSL_SetURL()''' or, if it overrides the default certificate verification handler by calling '''SSL_AuthCertificateHook()''' and ''not'' calling '''SSL_AuthCertificate()''' inside the hook, then it should be using '''CERT_VerifyCertName()''' as described in [https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/SSL_functions/sslintro.html NSS documentation]. | ** The application should either be calling '''SSL_SetURL()''' or, if it overrides the default certificate verification handler by calling '''SSL_AuthCertificateHook()''' and ''not'' calling '''SSL_AuthCertificate()''' inside the hook, then it should be using '''CERT_VerifyCertName()''' as described in [https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/SSL_functions/sslintro.html NSS documentation]. |
Latest revision as of 14:08, 31 July 2015
Enforce certificate hostname checks
Since Fedora 21 (http://fedoraproject.org/wiki/Changes/CryptoPolicy) there are policies for the usage of SSL and TLS cryptographic protocols that are enforced system-wide. To make those changes more effective, the applications need to actually check if the certificates presented by servers match the expected hostname. rpmlint will warn if it detects that some application seems to be using SSL/TLS certificate checks without performing necessary calls to check if the hostanme in certificate matches the expected one. That detection is based on heuristics and limited to C programs, so manual inspection is recommended. Note however, that there are applications which intentionally don't perform such checks or perform custom checks on purpose (e.g., postfix); those need not adhere to the policy. When in doubt, discuss with the Fedora security team.
C/C++ applications
- OpenSSL applications:
- The application should either be calling X509_check_host() (for now OpenSSL 1.0.2 specific) or performing the verification according to information on OpenSSL wiki.
- GnuTLS applications:
- The application should either be calling gnutls_certificate_verify_peers() with one of the data fields set to
GNUTLS_DT_DNS_HOSTNAME
or gnutls_certificate_verify_peers3(), as described in GnuTLS documentation
- The application should either be calling gnutls_certificate_verify_peers() with one of the data fields set to
- NSS applications:
- The application should either be calling SSL_SetURL() or, if it overrides the default certificate verification handler by calling SSL_AuthCertificateHook() and not calling SSL_AuthCertificate() inside the hook, then it should be using CERT_VerifyCertName() as described in NSS documentation.