return state_machine(s, 1);
}
+static void (*get_callback(SSL *s))(const SSL *, int, int)
+{
+ if (s->info_callback != NULL)
+ return s->info_callback;
+ else if (s->ctx->info_callback != NULL)
+ return s->ctx->info_callback;
+
+ return NULL;
+}
+
/*
* The main message flow state machine. We start in the MSG_FLOW_UNINITED or
* MSG_FLOW_RENEGOTIATE state and finish in MSG_FLOW_FINISHED. Valid states and
ERR_clear_error();
clear_sys_error();
- if (s->info_callback != NULL)
- cb = s->info_callback;
- else if (s->ctx->info_callback != NULL)
- cb = s->ctx->info_callback;
+ cb = get_callback(s);
s->in_handshake++;
if (!SSL_in_init(s) || SSL_in_before(s)) {
unsigned long (*max_message_size)(SSL *s);
void (*cb) (const SSL *ssl, int type, int val) = NULL;
- if (s->info_callback != NULL)
- cb = s->info_callback;
- else if (s->ctx->info_callback != NULL)
- cb = s->ctx->info_callback;
+ cb = get_callback(s);
if(s->server) {
transition = server_read_transition;
int (*construct_message)(SSL *s);
void (*cb) (const SSL *ssl, int type, int val) = NULL;
- if (s->info_callback != NULL)
- cb = s->info_callback;
- else if (s->ctx->info_callback != NULL)
- cb = s->ctx->info_callback;
+ cb = get_callback(s);
if(s->server) {
transition = server_write_transition;