@@ -45,12 +45,13 @@ static SoupWebsocketConnection *ws_conn = NULL;
45
45
static enum AppState app_state = 0 ;
46
46
static const gchar * peer_id = NULL ;
47
47
static const gchar * server_url = "wss://webrtc.nirbheek.in:8443" ;
48
- static gboolean strict_ssl = TRUE ;
48
+ static gboolean disable_ssl = FALSE ;
49
49
50
50
static GOptionEntry entries [] =
51
51
{
52
52
{ "peer-id" , 0 , 0 , G_OPTION_ARG_STRING , & peer_id , "String ID of the peer to connect to" , "ID" },
53
53
{ "server" , 0 , 0 , G_OPTION_ARG_STRING , & server_url , "Signalling server to connect to" , "URL" },
54
+ { "disable-ssl" , 0 , 0 , G_OPTION_ARG_NONE , & disable_ssl , "Disable ssl" , NULL },
54
55
{ NULL },
55
56
};
56
57
@@ -569,7 +570,7 @@ connect_to_websocket_server_async (void)
569
570
SoupSession * session ;
570
571
const char * https_aliases [] = {"wss" , NULL };
571
572
572
- session = soup_session_new_with_options (SOUP_SESSION_SSL_STRICT , strict_ssl ,
573
+ session = soup_session_new_with_options (SOUP_SESSION_SSL_STRICT , ! disable_ssl ,
573
574
SOUP_SESSION_SSL_USE_SYSTEM_CA_FILE , TRUE,
574
575
//SOUP_SESSION_SSL_CA_FILE, "/etc/ssl/certs/ca-bundle.crt",
575
576
SOUP_SESSION_HTTPS_ALIASES , https_aliases , NULL );
@@ -634,13 +635,13 @@ main (int argc, char *argv[])
634
635
return -1 ;
635
636
}
636
637
637
- /* Don't use strict ssl when running a localhost server, because
638
+ /* Disable ssl when running a localhost server, because
638
639
* it's probably a test server with a self-signed certificate */
639
640
{
640
641
GstUri * uri = gst_uri_from_string (server_url );
641
642
if (g_strcmp0 ("localhost" , gst_uri_get_host (uri )) == 0 ||
642
643
g_strcmp0 ("127.0.0.1" , gst_uri_get_host (uri )) == 0 )
643
- strict_ssl = FALSE ;
644
+ disable_ssl = TRUE ;
644
645
gst_uri_unref (uri );
645
646
}
646
647
0 commit comments