Commit 932c069e authored by Jens Georg's avatar Jens Georg
Browse files

SSL: Make it more clear that something failed

First step of improved SSL communication. Make it more clear that something
unrecoverably failed with SSL instead of just re-displaying the auth page.
Signed-off-by: Jens Georg's avatarJens Georg <>
parent 644f0562
......@@ -202,6 +202,9 @@ public class Transaction {
case Soup.KnownStatusCode.CANT_CONNECT_PROXY:
throw new Spit.Publishing.PublishingError.NO_ANSWER("Unable to connect to %s (error code %u)",
get_endpoint_url(), message.status_code);
case Soup.KnownStatusCode.SSL_FAILED:
throw new Spit.Publishing.PublishingError.SSL_FAILED ("Unable to connect to %s: Secure connection failed",
get_endpoint_url ());
// status codes below 100 are used by Soup, 100 and above are defined HTTP codes
......@@ -912,6 +912,8 @@ public class PiwigoPublisher : Spit.Publishing.Publisher, GLib.Object {
error_type = "LOCAL_FILE_ERROR";
} else if(e is Spit.Publishing.PublishingError.EXPIRED_SESSION) {
error_type = "EXPIRED_SESSION";
} else if (e is Spit.Publishing.PublishingError.SSL_FAILED) {
debug("Unhandled error: type=%s; message='%s'".printf(error_type, e.message));
......@@ -82,7 +82,14 @@ public errordomain PublishingError {
* Indicates that the remote host has rejected the session identifier used by the local
* client as out-of-date. The local client should acquire a new session identifier.
* Indicates that a secure connection to the remote host cannot be
* established. This might have various reasons such as expired
* certificats, invalid certificates, self-signed certificates...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment