mirror of
				https://gitlab.gnome.org/GNOME/glib.git
				synced 2025-10-31 00:12:19 +01:00 
			
		
		
		
	gioenums: Add G_TLS_CERTIFICATE_FLAGS_NONE
This makes the absence of flags (in other words, a valid certificate) more self-documenting. Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
		| @@ -191,7 +191,7 @@ g_dtls_client_connection_new (GDatagramBased      *base_socket, | ||||
| GTlsCertificateFlags | ||||
| g_dtls_client_connection_get_validation_flags (GDtlsClientConnection *conn) | ||||
| { | ||||
|   GTlsCertificateFlags flags = 0; | ||||
|   GTlsCertificateFlags flags = G_TLS_CERTIFICATE_FLAGS_NONE; | ||||
|  | ||||
|   g_return_val_if_fail (G_IS_DTLS_CLIENT_CONNECTION (conn), 0); | ||||
|  | ||||
|   | ||||
| @@ -1578,6 +1578,7 @@ typedef enum { | ||||
|  | ||||
| /** | ||||
|  * GTlsCertificateFlags: | ||||
|  * @G_TLS_CERTIFICATE_FLAGS_NONE: No flags. Since: 2.74 | ||||
|  * @G_TLS_CERTIFICATE_UNKNOWN_CA: The signing certificate authority is | ||||
|  *   not known. | ||||
|  * @G_TLS_CERTIFICATE_BAD_IDENTITY: The certificate does not match the | ||||
| @@ -1609,6 +1610,7 @@ typedef enum { | ||||
|  * Since: 2.28 | ||||
|  */ | ||||
| typedef enum { | ||||
|   G_TLS_CERTIFICATE_FLAGS_NONE GLIB_AVAILABLE_ENUMERATOR_IN_2_74 = 0, | ||||
|   G_TLS_CERTIFICATE_UNKNOWN_CA    = (1 << 0), | ||||
|   G_TLS_CERTIFICATE_BAD_IDENTITY  = (1 << 1), | ||||
|   G_TLS_CERTIFICATE_NOT_ACTIVATED = (1 << 2), | ||||
|   | ||||
| @@ -1121,6 +1121,8 @@ g_tls_certificate_get_issuer (GTlsCertificate  *cert) | ||||
|  * check a certificate against a CA that is not part of the system | ||||
|  * CA database. | ||||
|  * | ||||
|  * If @cert is valid, %G_TLS_CERTIFICATE_FLAGS_NONE is returned. | ||||
|  * | ||||
|  * If @identity is not %NULL, @cert's name(s) will be compared against | ||||
|  * it, and %G_TLS_CERTIFICATE_BAD_IDENTITY will be set in the return | ||||
|  * value if it does not match. If @identity is %NULL, that bit will | ||||
|   | ||||
| @@ -213,7 +213,7 @@ g_tls_client_connection_new (GIOStream           *base_io_stream, | ||||
| GTlsCertificateFlags | ||||
| g_tls_client_connection_get_validation_flags (GTlsClientConnection *conn) | ||||
| { | ||||
|   GTlsCertificateFlags flags = 0; | ||||
|   GTlsCertificateFlags flags = G_TLS_CERTIFICATE_FLAGS_NONE; | ||||
|  | ||||
|   g_return_val_if_fail (G_IS_TLS_CLIENT_CONNECTION (conn), 0); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user