summaryrefslogtreecommitdiff
path: root/lib/includes
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2017-04-23 11:54:38 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2017-04-23 11:58:04 +0200
commit28e44059f7c388df7786a8375a36123c7c085333 (patch)
tree19d100a416bd76e8d5e47f911b6dddb664512d76 /lib/includes
parent4c08f343e4fe7b8136e2190f886a6947beab5591 (diff)
downloadgnutls-28e44059f7c388df7786a8375a36123c7c085333.tar.gz
gnutls.h: introduced flag GNUTLS_EXT_FLAG_OVERRIDE_INTERNAL [ci skip]
This flag is expected to be used by applications which handle custom extensions that are not currently supported in gnutls, but support for them may be added in the future. Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Diffstat (limited to 'lib/includes')
-rw-r--r--lib/includes/gnutls/gnutls.h.in20
1 files changed, 15 insertions, 5 deletions
diff --git a/lib/includes/gnutls/gnutls.h.in b/lib/includes/gnutls/gnutls.h.in
index 289be64fc0..d7eec43d31 100644
--- a/lib/includes/gnutls/gnutls.h.in
+++ b/lib/includes/gnutls/gnutls.h.in
@@ -2579,9 +2579,9 @@ typedef int (*gnutls_ext_unpack_func) (gnutls_buffer_t packed_data,
* @GNUTLS_EXT_TLS: TLS-internal extension.
* @GNUTLS_EXT_MANDATORY: Extension parsed even if resuming (or extensions are disabled).
*
- * Enumeration of different TLS extension types. This flag
- * indicates for an extension whether it is useful to application
- * level or TLS level only. This is (only) used to parse the
+ * Enumeration of different TLS extension types. This type is
+ * to indicate whether an extension is useful to application
+ * level or TLS level only. This is used to parse the
* application level extensions before the "client_hello" callback
* is called.
*/
@@ -2593,8 +2593,18 @@ typedef enum {
GNUTLS_EXT_NONE = 4
} gnutls_ext_parse_type_t;
- /* Register a custom tls extension
- */
+/**
+ * gnutls_ext_flags_t:
+ * @GNUTLS_EXT_FLAG_OVERRIDE_INTERNAL: If specified the extension registered will override the internal; this does not work with extensions existing prior to 3.6.0.
+ *
+ * Enumeration of different TLS extension registration flags.
+ */
+typedef enum {
+ GNUTLS_EXT_FLAG_OVERRIDE_INTERNAL = 1
+} gnutls_ext_flags_t;
+
+/* Register a custom tls extension
+ */
int gnutls_ext_register(const char *name, int type, gnutls_ext_parse_type_t parse_type,
gnutls_ext_recv_func recv_func, gnutls_ext_send_func send_func,
gnutls_ext_deinit_data_func deinit_func, gnutls_ext_pack_func pack_func,