WORK_STATE(*pre_work) (SSL_CONNECTION *s, WORK_STATE wst);
WORK_STATE(*post_work) (SSL_CONNECTION *s, WORK_STATE wst);
int (*get_construct_message_f) (SSL_CONNECTION *s,
- int (**confunc) (SSL_CONNECTION *s,
- WPACKET *pkt),
+ CON_FUNC_RETURN (**confunc) (SSL_CONNECTION *s,
+ WPACKET *pkt),
int *mt);
void (*cb) (const SSL *ssl, int type, int val) = NULL;
- int (*confunc) (SSL_CONNECTION *s, WPACKET *pkt);
+ CON_FUNC_RETURN (*confunc) (SSL_CONNECTION *s, WPACKET *pkt);
int mt;
WPACKET pkt;
SSL *ssl = SSL_CONNECTION_GET_SSL(s);
return SUB_STATE_ERROR;
}
if (confunc != NULL) {
- int tmpret;
+ CON_FUNC_RETURN tmpret;
tmpret = confunc(s, &pkt);
- if (tmpret <= 0) {
+ if (tmpret == CON_FUNC_ERROR) {
WPACKET_cleanup(&pkt);
check_fatal(s);
return SUB_STATE_ERROR;
- } else if (tmpret == 2) {
+ } else if (tmpret == CON_FUNC_DONT_SEND) {
/*
* The construction function decided not to construct the
* message after all and continue. Skip sending.