summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2017-09-20 11:56:28 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2017-09-20 11:56:28 +0200
commit04a5ad0b814103c5aad10cb1bb913d87a3cb168a (patch)
tree4a8f15142589161b432cc0f199b015a28e10a53d
parent0fee3ea6bcdfeb3299d625afd8fddc6849aa8cf3 (diff)
downloadgnutls-tmp-enhance-ext-handling2.tar.gz
extensions: separate the hello extensions from otherstmp-enhance-ext-handling2
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
-rw-r--r--lib/ext/signature.c2
-rw-r--r--lib/ext/status_request.c2
-rw-r--r--lib/hello_ext.c3
-rw-r--r--lib/hello_ext.h6
-rw-r--r--lib/includes/gnutls/gnutls.h.in8
5 files changed, 4 insertions, 17 deletions
diff --git a/lib/ext/signature.c b/lib/ext/signature.c
index c6fd266080..642b55ac54 100644
--- a/lib/ext/signature.c
+++ b/lib/ext/signature.c
@@ -53,7 +53,7 @@ const hello_ext_entry_st ext_mod_sig = {
.name = "Signature Algorithms",
.tls_id = 13,
.gid = GNUTLS_EXTENSION_SIGNATURE_ALGORITHMS,
- .validity = GNUTLS_EXT_FLAG_CLIENT_HELLO|GNUTLS_EXT_FLAG_CR,
+ .validity = GNUTLS_EXT_FLAG_CLIENT_HELLO,
.parse_type = GNUTLS_EXT_TLS,
.recv_func = _gnutls_signature_algorithm_recv_params,
diff --git a/lib/ext/status_request.c b/lib/ext/status_request.c
index 19d5ded0fb..7020fc690e 100644
--- a/lib/ext/status_request.c
+++ b/lib/ext/status_request.c
@@ -525,7 +525,7 @@ const hello_ext_entry_st ext_mod_status_request = {
.name = "OCSP Status Request",
.tls_id = 5,
.gid = GNUTLS_EXTENSION_STATUS_REQUEST,
- .validity = GNUTLS_EXT_FLAG_CLIENT_HELLO|GNUTLS_EXT_FLAG_CT|GNUTLS_EXT_FLAG_CR|GNUTLS_EXT_FLAG_TLS12_SERVER_HELLO,
+ .validity = GNUTLS_EXT_FLAG_CLIENT_HELLO|GNUTLS_EXT_FLAG_TLS12_SERVER_HELLO,
.parse_type = _GNUTLS_EXT_TLS_POST_CS,
.recv_func = _gnutls_status_request_recv_params,
.send_func = _gnutls_status_request_send_params,
diff --git a/lib/hello_ext.c b/lib/hello_ext.c
index d7315cebbe..c0c4afc9b1 100644
--- a/lib/hello_ext.c
+++ b/lib/hello_ext.c
@@ -726,8 +726,7 @@ gnutls_ext_register(const char *name, int id, gnutls_ext_parse_type_t parse_type
#define VALIDITY_MASK (GNUTLS_EXT_FLAG_CLIENT_HELLO|GNUTLS_EXT_FLAG_TLS12_SERVER_HELLO| \
GNUTLS_EXT_FLAG_TLS13_SERVER_HELLO| \
- GNUTLS_EXT_FLAG_EE|GNUTLS_EXT_FLAG_CT|GNUTLS_EXT_FLAG_CR| \
- GNUTLS_EXT_FLAG_NST|GNUTLS_EXT_FLAG_HRR)
+ GNUTLS_EXT_FLAG_EE|GNUTLS_EXT_FLAG_HRR)
/**
* gnutls_session_ext_register:
diff --git a/lib/hello_ext.h b/lib/hello_ext.h
index 9537a94c79..8387b68f2f 100644
--- a/lib/hello_ext.h
+++ b/lib/hello_ext.h
@@ -68,12 +68,6 @@ inline static const char *ext_msg_validity_to_str(gnutls_ext_flags_t msg)
return "TLS 1.3 server hello";
case GNUTLS_EXT_FLAG_EE:
return "encrypted extensions";
- case GNUTLS_EXT_FLAG_CT:
- return "certificate";
- case GNUTLS_EXT_FLAG_CR:
- return "certificate request";
- case GNUTLS_EXT_FLAG_NST:
- return "new session ticket";
case GNUTLS_EXT_FLAG_HRR:
return "hello retry request";
default:
diff --git a/lib/includes/gnutls/gnutls.h.in b/lib/includes/gnutls/gnutls.h.in
index d14dd9e3cd..913edde246 100644
--- a/lib/includes/gnutls/gnutls.h.in
+++ b/lib/includes/gnutls/gnutls.h.in
@@ -2680,9 +2680,6 @@ typedef enum {
* @GNUTLS_EXT_FLAG_TLS12_SERVER_HELLO: This extension can be present in a TLS1.2 or earlier server hello
* @GNUTLS_EXT_FLAG_TLS13_SERVER_HELLO: This extension can be present in a TLS1.3 server hello
* @GNUTLS_EXT_FLAG_EE: This extension can be present in encrypted extensions message
- * @GNUTLS_EXT_FLAG_CT: This extension can be present in certificate message
- * @GNUTLS_EXT_FLAG_CR: This extension can be present in certificate request message
- * @GNUTLS_EXT_FLAG_NST: This extension can be present in new session ticket message
* @GNUTLS_EXT_FLAG_HRR: This extension can be present in hello retry request message
*
* Enumeration of different TLS extension registration flags.
@@ -2693,10 +2690,7 @@ typedef enum {
GNUTLS_EXT_FLAG_TLS12_SERVER_HELLO = (1<<2),
GNUTLS_EXT_FLAG_TLS13_SERVER_HELLO = (1<<3),
GNUTLS_EXT_FLAG_EE = (1<<4), /* ENCRYPTED */
- GNUTLS_EXT_FLAG_CT = (1<<5),
- GNUTLS_EXT_FLAG_CR = (1<<6),
- GNUTLS_EXT_FLAG_NST = (1<<7),
- GNUTLS_EXT_FLAG_HRR = (1<<8)
+ GNUTLS_EXT_FLAG_HRR = (1<<5)
} gnutls_ext_flags_t;
/* Register a custom tls extension