[glib/wip/mjog/accept-certificate-docs] gio: Update bad cert error in accept-certificate and GTlsError docs



commit d7aedeff29063d2a68d47ff4b927510e77edc63a
Author: Michael Gratton <mike vee net>
Date:   Tue Jan 8 22:34:36 2019 +1100

    gio: Update bad cert error in accept-certificate and GTlsError docs
    
    This makes the documented error returned when the cert is rejected
    consistent with both self and reality.

 gio/gdtlsconnection.c | 4 ++--
 gio/gioenums.h        | 3 ++-
 gio/gtlsconnection.c  | 4 ++--
 3 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/gio/gdtlsconnection.c b/gio/gdtlsconnection.c
index 254537198..d621b1eac 100644
--- a/gio/gdtlsconnection.c
+++ b/gio/gdtlsconnection.c
@@ -295,8 +295,8 @@ g_dtls_connection_default_init (GDtlsConnectionInterface *iface)
    * let the user decide whether or not to accept the certificate, you
    * would have to return %FALSE from the signal handler on the first
    * attempt, and then after the connection attempt returns a
-   * %G_TLS_ERROR_HANDSHAKE, you can interact with the user, and if
-   * the user decides to accept the certificate, remember that fact,
+   * %G_TLS_ERROR_BAD_CERTIFICATE, you can interact with the user, and
+   * if the user decides to accept the certificate, remember that fact,
    * create a new connection, and return %TRUE from the signal handler
    * the next time.
    *
diff --git a/gio/gioenums.h b/gio/gioenums.h
index d6d1e59f1..bf7b8e8b5 100644
--- a/gio/gioenums.h
+++ b/gio/gioenums.h
@@ -1505,7 +1505,8 @@ typedef enum
  * GTlsError:
  * @G_TLS_ERROR_UNAVAILABLE: No TLS provider is available
  * @G_TLS_ERROR_MISC: Miscellaneous TLS error
- * @G_TLS_ERROR_BAD_CERTIFICATE: A certificate could not be parsed
+ * @G_TLS_ERROR_BAD_CERTIFICATE: The certificate presented could not
+ *   be parsed or failed validation.
  * @G_TLS_ERROR_NOT_TLS: The TLS handshake failed because the
  *   peer does not seem to be a TLS server.
  * @G_TLS_ERROR_HANDSHAKE: The TLS handshake failed because the
diff --git a/gio/gtlsconnection.c b/gio/gtlsconnection.c
index a1e98c0c9..02a3098c1 100644
--- a/gio/gtlsconnection.c
+++ b/gio/gtlsconnection.c
@@ -323,8 +323,8 @@ g_tls_connection_class_init (GTlsConnectionClass *klass)
    * let the user decide whether or not to accept the certificate, you
    * would have to return %FALSE from the signal handler on the first
    * attempt, and then after the connection attempt returns a
-   * %G_TLS_ERROR_HANDSHAKE, you can interact with the user, and if
-   * the user decides to accept the certificate, remember that fact,
+   * %G_TLS_ERROR_BAD_CERTIFICATE, you can interact with the user, and
+   * if the user decides to accept the certificate, remember that fact,
    * create a new connection, and return %TRUE from the signal handler
    * the next time.
    *


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]