Add a typedef for the construction function
authorMatt Caswell <matt@openssl.org>
Mon, 3 Oct 2016 14:35:17 +0000 (15:35 +0100)
committerMatt Caswell <matt@openssl.org>
Mon, 3 Oct 2016 15:25:48 +0000 (16:25 +0100)
Reviewed-by: Rich Salz <rsalz@openssl.org>
ssl/statem/statem_clnt.c
ssl/statem/statem_locl.h
ssl/statem/statem_srvr.c

index 1ea9d7512fd3710f882d207bbf0dc46f29292a80..08b1239d5788ee11298ea832192f9896409ae6f0 100644 (file)
@@ -512,8 +512,7 @@ WORK_STATE ossl_statem_client_post_work(SSL *s, WORK_STATE wst)
  *   0: Error
  */
 int ossl_statem_client_construct_message(SSL *s, WPACKET *pkt,
-                                         int (**confunc) (SSL *s, WPACKET *pkt),
-                                         int *mt)
+                                         confunc_f *confunc, int *mt)
 {
     OSSL_STATEM *st = &s->statem;
 
index 16c67319d05d6a94e38fcdb1847d1acd9d60ac49..6b57b25392f093eef33eafa39dac79f0eb713578 100644 (file)
@@ -43,6 +43,8 @@ typedef enum {
 /* Flush the write BIO */
 int statem_flush(SSL *s);
 
+typedef int (*confunc_f) (SSL *s, WPACKET *pkt);
+
 /*
  * TLS/DTLS client state machine functions
  */
@@ -51,8 +53,7 @@ WRITE_TRAN ossl_statem_client_write_transition(SSL *s);
 WORK_STATE ossl_statem_client_pre_work(SSL *s, WORK_STATE wst);
 WORK_STATE ossl_statem_client_post_work(SSL *s, WORK_STATE wst);
 int ossl_statem_client_construct_message(SSL *s, WPACKET *pkt,
-                                         int (**confunc) (SSL *s, WPACKET *pkt),
-                                         int *mt);
+                                         confunc_f *confunc, int *mt);
 unsigned long ossl_statem_client_max_message_size(SSL *s);
 MSG_PROCESS_RETURN ossl_statem_client_process_message(SSL *s, PACKET *pkt);
 WORK_STATE ossl_statem_client_post_process_message(SSL *s, WORK_STATE wst);
@@ -65,8 +66,7 @@ WRITE_TRAN ossl_statem_server_write_transition(SSL *s);
 WORK_STATE ossl_statem_server_pre_work(SSL *s, WORK_STATE wst);
 WORK_STATE ossl_statem_server_post_work(SSL *s, WORK_STATE wst);
 int ossl_statem_server_construct_message(SSL *s, WPACKET *pkt,
-                                         int (**confunc) (SSL *s, WPACKET *pkt),
-                                         int *mt);
+                                         confunc_f *confunc,int *mt);
 unsigned long ossl_statem_server_max_message_size(SSL *s);
 MSG_PROCESS_RETURN ossl_statem_server_process_message(SSL *s, PACKET *pkt);
 WORK_STATE ossl_statem_server_post_process_message(SSL *s, WORK_STATE wst);
index 3b5d60c38193d7c4658fa580ce648333a834c2e3..009d06c811a67dfb998d995f4ff4f64adabe7209 100644 (file)
@@ -621,8 +621,7 @@ WORK_STATE ossl_statem_server_post_work(SSL *s, WORK_STATE wst)
  *   0: Error
  */
 int ossl_statem_server_construct_message(SSL *s, WPACKET *pkt,
-                                         int (**confunc) (SSL *s, WPACKET *pkt),
-                                         int *mt)
+                                         confunc_f *confunc, int *mt)
 {
     OSSL_STATEM *st = &s->statem;