Ejemplo n.º 1
0
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);
}
Ejemplo n.º 2
0
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);
}
Ejemplo n.º 3
0
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);
}
Ejemplo n.º 4
0
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;
}
Ejemplo n.º 5
0
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;
}
Ejemplo n.º 6
0
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));
}
Ejemplo n.º 7
0
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);
}
Ejemplo n.º 8
0
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;
}
Ejemplo n.º 9
0
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;
}
Ejemplo n.º 10
0
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);
	}
Ejemplo n.º 11
0
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);
	}
Ejemplo n.º 12
0
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;
}
Ejemplo n.º 13
0
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);
	}
Ejemplo n.º 14
0
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);
  }
}
Ejemplo n.º 15
0
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);
}
Ejemplo n.º 16
0
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;
}
Ejemplo n.º 17
0
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);
	}
Ejemplo n.º 18
0
static long tap_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp)
{
    return BIO_callback_ctrl(BIO_next(b), cmd, fp);
}
Ejemplo n.º 19
0
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);
}
Ejemplo n.º 20
0
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);
}
Ejemplo n.º 21
0
static long bsegs_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp)
{
	return BIO_callback_ctrl(b->next_bio, cmd, fp);
}