Custom extension revision.
[openssl.git] / ssl / ssl.h
index 5f542d1..2705c7c 100644 (file)
--- a/ssl/ssl.h
+++ b/ssl/ssl.h
@@ -409,21 +409,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