WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
104356
[SOUP] Failed to connect secure Websocket request (wss://)
https://bugs.webkit.org/show_bug.cgi?id=104356
Summary
[SOUP] Failed to connect secure Websocket request (wss://)
Basavaraj Padmashali Sidda
Reported
2012-12-07 02:30:40 PST
[EFL] - Failed to connect secure Websocket request (wss://)
Attachments
Patch
(3.57 KB, patch)
2012-12-07 02:38 PST
,
Basavaraj Padmashali Sidda
no flags
Details
Formatted Diff
Diff
Patch
(3.54 KB, patch)
2012-12-07 03:39 PST
,
Basavaraj Padmashali Sidda
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Basavaraj Padmashali Sidda
Comment 1
2012-12-07 02:38:24 PST
Created
attachment 178188
[details]
Patch
Basavaraj Padmashali Sidda
Comment 2
2012-12-07 02:46:04 PST
To reproduce the issue 1. Fetch
http://www.websocket.org/echo.html
2. Click on "Use Secure websocket [TLS]" 3. Connect 4. Disconnect is displayed in the Log Patch is for EFL and other port which uses gnome network libraries. Cause: Fail in TLS Handshake, because "accept-certificate" callback is not registered.
Gyuyoung Kim
Comment 3
2012-12-07 03:01:49 PST
Comment on
attachment 178188
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=178188&action=review
> Source/WebCore/ChangeLog:3 > + [EFL] - Failed to connect secure Websocket request (wss://)
This is not efl specific patch. Use [Soup] prefix instead of [EFL]. Beside '-' is not needed in bug title.
> Source/WebCore/ChangeLog:6 > + Failed to connect secure Websocket request (wss://) in EFL Port,
I think GTK port also has this problem because GTK and EFL ports use soup. Did you check it ?
> Source/WebCore/platform/network/soup/SocketStreamHandleSoup.cpp:298 > + // FIXME : Currently Accepting all the certificate, handle it properly later.
Add notImplemented();
> Source/WebCore/platform/network/soup/SocketStreamHandleSoup.cpp:308 > + // FIXME : We don't have a way to get root CA's certificate info here, so, "accept-certificate" will say UNKNOWN_CA for all connection.
"FIXME:" is general.
Basavaraj Padmashali Sidda
Comment 4
2012-12-07 03:39:30 PST
Created
attachment 178192
[details]
Patch
Basavaraj Padmashali Sidda
Comment 5
2012-12-07 03:41:20 PST
corrected based on review comments given by Gyuyoung Kim, and Uploaded new patch
Dan Winship
Comment 6
2012-12-07 05:06:47 PST
Comment on
attachment 178192
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=178192&action=review
> Source/WebCore/platform/network/soup/SocketStreamHandleSoup.cpp:308 > + // FIXME: We don't have a way to get root CA's certificate info here, so, "accept-certificate" will say UNKNOWN_CA for all connection.
That's not true; GTlsConnection will check against the system CA list by default. This change is only needed for connecting to wss servers using unrecognized CAs. IIRC, Safari's behavior is to use the same list of certificate exceptions as it uses for https connections, and not provide any way to override it from the wss side. (ie, you have to have already ok'ed the bad certificate on an https connection before you can use it for wss connections). I think there may be discussion about this in other open bugs here. (For the soup backend, there's currently no way to add certificate exceptions at the webkit level, although I think Epiphany and Midori both implement it for https at higher levels.)
Basavaraj Padmashali Sidda
Comment 7
2012-12-07 05:52:29 PST
(In reply to
comment #6
)
> (From update of
attachment 178192
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=178192&action=review
> > > Source/WebCore/platform/network/soup/SocketStreamHandleSoup.cpp:308 > > + // FIXME: We don't have a way to get root CA's certificate info here, so, "accept-certificate" will say UNKNOWN_CA for all connection. > > That's not true; GTlsConnection will check against the system CA list by default. This change is only needed for connecting to wss servers using unrecognized CAs. > > IIRC, Safari's behavior is to use the same list of certificate exceptions as it uses for https connections, and not provide any way to override it from the wss side. (ie, you have to have already ok'ed the bad certificate on an https connection before you can use it for wss connections). I think there may be discussion about this in other open bugs here. (For the soup backend, there's currently no way to add certificate exceptions at the webkit level, although I think Epiphany and Midori both implement it for https at higher levels.)
Hi Dan You mean "accept_certificate" callaback will not get triggered or called if WSS servers using recognized CA ? We tried following thing for wss, g_tls_connection_set_database() is used, we get error UNKNOWN_CA in the callback for https when we use g_object_set(SOUP_SESSION, "tls-database",..), we get trusted certificate without any error.. However, we used same database for g_object_set() and g_tls_connection_set_database().
Dan Winship
Comment 8
2012-12-09 01:22:15 PST
(In reply to
comment #7
)
> You mean "accept_certificate" callaback will not get triggered or called if WSS servers using recognized CA ?
Yes, that's how it should work...
> for https when we use g_object_set(SOUP_SESSION, "tls-database",..), we get trusted certificate without any error.. > However, we used same database for g_object_set() and g_tls_connection_set_database().
Is the server sending a different certificate for wss than for https maybe?
Basavaraj Padmashali Sidda
Comment 9
2012-12-10 04:06:30 PST
(In reply to
comment #8
)
> (In reply to
comment #7
) > > You mean "accept_certificate" callaback will not get triggered or called if WSS servers using recognized CA ? > > Yes, that's how it should work... > > > for https when we use g_object_set(SOUP_SESSION, "tls-database",..), we get trusted certificate without any error.. > > However, we used same database for g_object_set() and g_tls_connection_set_database(). > > Is the server sending a different certificate for wss than for https maybe?
Yes
Basavaraj Padmashali Sidda
Comment 10
2012-12-14 01:46:47 PST
(In reply to
comment #9
)
> (In reply to
comment #8
) > > (In reply to
comment #7
) > > > You mean "accept_certificate" callaback will not get triggered or called if WSS servers using recognized CA ? > > > > Yes, that's how it should work... > > > > > for https when we use g_object_set(SOUP_SESSION, "tls-database",..), we get trusted certificate without any error.. > > > However, we used same database for g_object_set() and g_tls_connection_set_database(). > > > > Is the server sending a different certificate for wss than for https maybe? > Yes
Hi Dan, Dont you think, This patch is usefull, if you want show certificate warning message to the user allow (return TRUE) or deny (return FALSE) for this wss request ?. we can show certificate warning message from "accept-certificate" callback.. Because i saw in Mozilla, they support it,
https://bugzilla.mozilla.org/show_bug.cgi?id=594502
Thank You
Anders Carlsson
Comment 11
2014-02-05 11:02:46 PST
Comment on
attachment 178192
[details]
Patch Clearing review flag on patches from before 2014. If this patch is still relevant, please reset the r? flag.
Michael Catanzaro
Comment 12
2017-05-05 07:14:26 PDT
We should not support this. The server you're connecting to is just broken.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug