2006-12-06 [colin] 2.6.1cvs7
[claws.git] / src / etpan / imap-thread.c
index a1ca413de4a95f0466fe57895d1ddf73afc7e580..913c00f511dc3c8838808d0fc7c74616986ab897 100644 (file)
@@ -489,7 +489,8 @@ int imap_threaded_connect_ssl(Folder * folder, const char * server, int port)
        refresh_resolvers();
        threaded_run(folder, &param, &result, connect_ssl_run);
        
-       if (result.error == 0 && !etpan_skip_ssl_cert_check) {
+       if ((result.error == MAILIMAP_NO_ERROR_AUTHENTICATED ||
+            result.error == MAILIMAP_NO_ERROR_NON_AUTHENTICATED) && !etpan_skip_ssl_cert_check) {
                cert_len = mailstream_ssl_get_certificate(imap->imap_stream, &certificate);
                if (etpan_certificate_check(certificate, cert_len, &param) < 0)
                        return -1;