From 4536deb5af4cfacbcea65c89efa4307ceb2f7e14 Mon Sep 17 00:00:00 2001 From: Michael Catanzaro Date: Fri, 27 Jul 2018 10:52:42 -0500 Subject: Add a new GTlsError to indicate protocol downgrade attacks G_TLS_ERROR_MISC suffices, but it's nicer to have a new error here. --- gio/gioenums.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gio/gioenums.h b/gio/gioenums.h index 99b1c7937..a83fa71f1 100644 --- a/gio/gioenums.h +++ b/gio/gioenums.h @@ -1509,6 +1509,9 @@ typedef enum * @G_TLS_ERROR_EOF: The TLS connection was closed without proper * notice, which may indicate an attack. See * g_tls_connection_set_require_close_notify(). + * @G_TLS_ERROR_INAPPROPRIATE_FALLBACK: The TLS handshake failed + * because the client sent the fallback SCSV, indicating a protocol + * downgrade attack. Since: 2.60 * * An error code used with %G_TLS_ERROR in a #GError returned from a * TLS-related routine. @@ -1522,7 +1525,8 @@ typedef enum { G_TLS_ERROR_NOT_TLS, G_TLS_ERROR_HANDSHAKE, G_TLS_ERROR_CERTIFICATE_REQUIRED, - G_TLS_ERROR_EOF + G_TLS_ERROR_EOF, + G_TLS_ERROR_INAPPROPRIATE_FALLBACK } GTlsError; /** -- cgit v1.2.1