summaryrefslogtreecommitdiffstats
path: root/ssl/ssl.h
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2014-08-10 12:08:08 +0100
committerDr. Stephen Henson <steve@openssl.org>2014-08-28 18:09:05 +0100
commit0a4fe37fc6248e5efadcda34015eff122e01b1db (patch)
treeecc261ba3f2b21e6de4fb984535403c6668c0a3f /ssl/ssl.h
parentda67a0ae3462f6c6447ed841a9ec514077244b02 (diff)
Custom extension revision.
Use the same structure for client and server custom extensions. Add utility functions in new file t1_ext.c. Use new utility functions to handle custom server and client extensions and remove a lot of code duplication. Reviewed-by: Emilia Käsper <emilia@openssl.org> (cherry picked from commit ecf4d660902dcef6e0afc51d52926f00d409ee6b) Conflicts: ssl/ssl_lib.c ssl/ssl_locl.h ssl/t1_lib.c
Diffstat (limited to 'ssl/ssl.h')
-rw-r--r--ssl/ssl.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/ssl/ssl.h b/ssl/ssl.h
index d113b43a39..823bf0625b 100644
--- a/ssl/ssl.h
+++ b/ssl/ssl.h
@@ -405,21 +405,21 @@ typedef int (*tls_session_secret_cb_fn)(SSL *s, void *secret, int *secret_len, S
* "al" is a TLS "AlertDescription" from 0-255 which WILL be sent as a
* fatal TLS alert, if the callback returns zero.
*/
-typedef int (*custom_cli_ext_first_cb_fn)(SSL *s, unsigned short ext_type,
+
+typedef int (*custom_ext_add_cb)(SSL *s, unsigned short ext_type,
const unsigned char **out,
- unsigned short *outlen, int *al, void *arg);
-typedef int (*custom_cli_ext_second_cb_fn)(SSL *s, unsigned short ext_type,
+ unsigned short *outlen, int *al,
+ void *arg);
+
+typedef int (*custom_ext_parse_cb)(SSL *s, unsigned short ext_type,
const unsigned char *in,
unsigned short inlen, int *al,
void *arg);
-typedef int (*custom_srv_ext_first_cb_fn)(SSL *s, unsigned short ext_type,
- const unsigned char *in,
- unsigned short inlen, int *al,
- void *arg);
-typedef int (*custom_srv_ext_second_cb_fn)(SSL *s, unsigned short ext_type,
- const unsigned char **out,
- unsigned short *outlen, int *al, void *arg);
+typedef custom_ext_add_cb custom_cli_ext_first_cb_fn;
+typedef custom_ext_parse_cb custom_cli_ext_second_cb_fn;
+typedef custom_ext_add_cb custom_srv_ext_second_cb_fn;
+typedef custom_ext_parse_cb custom_srv_ext_first_cb_fn;
#endif