[gnutls-devel] GnuTLS | server auth: disable TLS 1.3 if no signature algorithm is usable (!987)
Development of GNU's TLS library
gnutls-devel at lists.gnutls.org
Thu May 2 11:47:58 CEST 2019
Daiki Ueno commented on a discussion on lib/auth.c: https://gitlab.com/gnutls/gnutls/merge_requests/987#note_166099829
> gnutls_certificate_credentials_t c = cred;
> - unsigned i;
> + unsigned i, j;
> bool allow_tls13 = 0;
> unsigned key_usage;
> + const gnutls_sign_algorithm_t *sign_algos = gnutls_sign_list();
> + const gnutls_sign_entry_st *se;
>
> if (c != NULL && c->ncerts != 0) {
> for (i = 0; i < c->ncerts; i++) {
> key_usage = get_key_usage(session, c->certs[i].cert_list[0].pubkey);
> if (key_usage == 0 || (key_usage & GNUTLS_KEY_DIGITAL_SIGNATURE)) {
> - allow_tls13 = 1;
> - break;
> + /* check if the private key is usable for signing in TLS 1.3 */
> + if (session->security_parameters.entity == GNUTLS_SERVER) {
I think we nevertheless would need to check all the signature algorithms, for the case where ECDSA/EdDSA keys are available but RSA-PSS is not usable. I'm moving the iteration logic into `lib/algorithms/sign.c` so it doesn't have thread-safety issue.
--
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/merge_requests/987#note_166099829
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20190502/0c42f971/attachment-0001.html>
More information about the Gnutls-devel
mailing list