[gnutls-devel] [PATCH 6/9] Add gnutls_certificate_get_verify_flags

Armin Burgmeier armin at arbur.net
Thu Sep 18 00:54:09 CEST 2014


Signed-off-by: Armin Burgmeier <armin at arbur.net>
---
 lib/gnutls_ui.c                 | 17 +++++++++++++++++
 lib/includes/gnutls/gnutls.h.in |  3 +++
 lib/libgnutls.map               |  1 +
 3 files changed, 21 insertions(+)

diff --git a/lib/gnutls_ui.c b/lib/gnutls_ui.c
index 03610e8..283fe97 100644
--- a/lib/gnutls_ui.c
+++ b/lib/gnutls_ui.c
@@ -631,6 +631,23 @@ gnutls_certificate_set_verify_flags(gnutls_certificate_credentials_t
 }
 
 /**
+ * gnutls_certificate_get_verify_flags:
+ * @res: is a gnutls_certificate_credentials_t structure
+ *
+ * Returns the verification flags set with
+ * gnutls_certificate_set_verify_flags().
+ *
+ * Returns: The certificate verification flags used by @res.
+ *
+ * Since: 3.4.0
+ */
+unsigned int
+gnutls_certificate_get_verify_flags(gnutls_certificate_credentials_t res)
+{
+	return res->verify_flags;
+}
+
+/**
  * gnutls_certificate_set_verify_limits:
  * @res: is a gnutls_certificate_credentials structure
  * @max_bits: is the number of bits of an acceptable certificate (default 8200)
diff --git a/lib/includes/gnutls/gnutls.h.in b/lib/includes/gnutls/gnutls.h.in
index bad59e0..17ff8fc 100644
--- a/lib/includes/gnutls/gnutls.h.in
+++ b/lib/includes/gnutls/gnutls.h.in
@@ -1349,6 +1349,9 @@ void gnutls_certificate_set_verify_limits(gnutls_certificate_credentials_t
 					  res, unsigned int max_bits,
 					  unsigned int max_depth);
 
+unsigned int
+gnutls_certificate_get_verify_flags(gnutls_certificate_credentials_t);
+
 int
 gnutls_certificate_set_x509_system_trust(gnutls_certificate_credentials_t
 					 cred);
diff --git a/lib/libgnutls.map b/lib/libgnutls.map
index 27b12ba..b64ff13 100644
--- a/lib/libgnutls.map
+++ b/lib/libgnutls.map
@@ -1012,6 +1012,7 @@ GNUTLS_3_1_0 {
 	gnutls_x509_crt_check_hostname2;
 	gnutls_openpgp_crt_check_hostname2;
 	gnutls_certificate_verify_peers;
+	gnutls_certificate_get_verify_flags;
 	gnutls_credentials_get;
 	gnutls_x509_crl_iter_crt_serial;
 	gnutls_x509_crl_iter_deinit;
-- 
2.1.0




More information about the Gnutls-devel mailing list