static long linebreak_callback_ctrl(BIO *b, int cmd, bio_info_cb *cb) { if (b->next_bio == NULL) return 0; else return BIO_callback_ctrl(b->next_bio, cmd, cb); }
static long bio_zlib_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp) { BIO *next = BIO_next(b); if (next == NULL) return 0; return BIO_callback_ctrl(next, cmd, fp); }
static long bio_zlib_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp) { if (!b->next_bio) return 0; return BIO_callback_ctrl(b->next_bio, cmd, fp); }
static long bio_rdp_tls_callback_ctrl(BIO* bio, int cmd, bio_info_cb* fp) { int status = 0; BIO_RDP_TLS* tls; if (!bio) return 0; tls = (BIO_RDP_TLS*) BIO_get_data(bio); if (!tls) return 0; switch (cmd) { case BIO_CTRL_SET_CALLBACK: SSL_set_info_callback(tls->ssl, (void (*)(const SSL*, int, int)) fp); status = 1; break; default: status = BIO_callback_ctrl(SSL_get_rbio(tls->ssl), cmd, fp); break; } return status; }
static long dwrap_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp) { // NOLINT(runtime/int) long ret; // NOLINT(runtime/int) ret = BIO_callback_ctrl(b->next_bio, cmd, fp); return ret; }
static long replace_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp) { //DEBUG_MSG(D_DEBUG, "%s", __FUNCTION__); if (b->next_bio == NULL) return (0); return (BIO_callback_ctrl(b->next_bio, cmd, fp)); }
long t_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp) { //printf("t_callback_ctrl %d\n",cmd); if (b->next_bio == NULL) return (0); return BIO_callback_ctrl(b->next_bio, cmd, fp); }
BOOL transport_connect_tls(rdpTransport* transport) { int tlsStatus; rdpTls* tls = NULL; rdpContext* context = transport->context; rdpSettings* settings = transport->settings; if (!(tls = tls_new(settings))) return FALSE; transport->tls = tls; if (transport->GatewayEnabled) transport->layer = TRANSPORT_LAYER_TSG_TLS; else transport->layer = TRANSPORT_LAYER_TLS; tls->hostname = settings->ServerHostname; tls->port = settings->ServerPort; if (tls->port == 0) tls->port = 3389; tls->isGatewayTransport = FALSE; tlsStatus = tls_connect(tls, transport->frontBio); if (tlsStatus < 1) { if (tlsStatus < 0) { if (!freerdp_get_last_error(context)) freerdp_set_last_error(context, FREERDP_ERROR_TLS_CONNECT_FAILED); } else { if (!freerdp_get_last_error(context)) freerdp_set_last_error(context, FREERDP_ERROR_CONNECT_CANCELLED); } return FALSE; } transport->frontBio = tls->bio; BIO_callback_ctrl(tls->bio, BIO_CTRL_SET_CALLBACK, (bio_info_cb*) transport_ssl_cb); SSL_set_app_data(tls->ssl, transport); if (!transport->frontBio) { WLog_ERR(TAG, "unable to prepend a filtering TLS bio"); return FALSE; } return TRUE; }
static long b64_callback_ctrl(BIO *b, int cmd, bio_info_cb fp) { long ret = 1; if (b->next_bio == NULL) { return 0; } switch (cmd) { default: ret = BIO_callback_ctrl(b->next_bio, cmd, fp); break; } return ret; }
static long crlfbuffer_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp) { long ret=1; if (b->next_bio == NULL) return(0); //switch (cmd) //{ //default: ret=BIO_callback_ctrl(b->next_bio,cmd,fp); //break; //} return(ret); }
static long md_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp) { long ret=1; if (b->next_bio == NULL) return(0); switch (cmd) { default: ret=BIO_callback_ctrl(b->next_bio,cmd,fp); break; } return(ret); }
static long nullf_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp) { long ret = 1; if (b->next_bio == NULL) return 0; switch (cmd) { default: ret = BIO_callback_ctrl(b->next_bio, cmd, fp); break; } return ret; }
static long ber_callback_ctrl(BIO *b, int cmd, void *(*fp)()) { long ret=1; if (b->next_bio == NULL) return(0); switch (cmd) { default: ret=BIO_callback_ctrl(b->next_bio,cmd,fp); break; } return(ret); }
static long ssl_callback_ctrl(BIO *bio, int cmd, bio_info_cb fp) { SSL *ssl = bio->ptr; if (ssl == NULL) { return 0; } switch (cmd) { case BIO_CTRL_SET_CALLBACK: return -1; default: return BIO_callback_ctrl(ssl->rbio, cmd, fp); } }
static long enc_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp) { long ret = 1; BIO *next = BIO_next(b); if (next == NULL) return (0); switch (cmd) { default: ret = BIO_callback_ctrl(next, cmd, fp); break; } return (ret); }
static long b64_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp) { long ret = 1; BIO *next = BIO_next(b); if (next == NULL) return 0; switch (cmd) { default: ret = BIO_callback_ctrl(next, cmd, fp); break; } return ret; }
static long ssl_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp) { SSL *ssl; BIO_SSL *bs; long ret=1; bs=(BIO_SSL *)b->ptr; ssl=bs->ssl; switch (cmd) { case BIO_CTRL_SET_CALLBACK: { /* FIXME: setting this via a completely different prototype seems like a crap idea */ SSL_set_info_callback(ssl,(void (*)(const SSL *,int,int))fp); } break; default: ret=BIO_callback_ctrl(ssl->rbio,cmd,fp); break; } return(ret); }
static long tap_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp) { return BIO_callback_ctrl(BIO_next(b), cmd, fp); }
long proxy_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp) { if (!b->next_bio) return 0; return BIO_callback_ctrl(b->next_bio, cmd, fp); }
static long asn1_bio_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp) { if (b->next_bio == NULL) return (0); return BIO_callback_ctrl(b->next_bio, cmd, fp); }
static long bsegs_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp) { return BIO_callback_ctrl(b->next_bio, cmd, fp); }