Changeset 2082
- Timestamp:
- 06/06/07 13:54:07
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libtinymail-camel/camel-lite/camel/camel-tcp-stream-openssl.c
r2077 r2082 54 54 #include "camel-tcp-stream-ssl.h" 55 55 56 #define d(x) g_print (x)56 #define d(x) 57 57 58 58 static CamelTcpStreamClass *parent_class = NULL; trunk/libtinymail-camel/camel-lite/camel/camel-tcp-stream-ssl.c
r2063 r2082 317 317 g_return_val_if_fail (CAMEL_IS_TCP_STREAM_SSL (ssl), -1); 318 318 319 if (ssl->priv->sockfd && !ssl->priv->ssl_mode) { 320 if (!(fd = enable_ssl (ssl, NULL))) { 319 if (ssl->priv->sockfd && !ssl->priv->ssl_mode) 320 { 321 322 if (!(fd = enable_ssl (ssl, NULL))) 323 { 321 324 set_errno (PR_GetError ()); 322 325 return -1; 323 326 } 324 327 325 328 ssl->priv->sockfd = fd; 326 327 if (SSL_ResetHandshake (fd, FALSE) == SECFailure) { 329 330 if (SSL_ResetHandshake (fd, FALSE) == SECFailure) 331 { 328 332 set_errno (PR_GetError ()); 329 333 return -1; 330 334 } 331 332 if (SSL_ForceHandshake (fd) == -1) { 335 336 if (SSL_ForceHandshake (fd) == SECFailure) 337 { 333 338 set_errno (PR_GetError ()); 334 339 return -1; 335 340 } 336 341 } 337 342 338 343 ssl->priv->ssl_mode = TRUE; 339 344 340 345 return 0; 341 346 } … … 528 533 nread = -1; 529 534 530 res = PR_Poll(pollfds, 2, 5);535 res = PR_Poll(pollfds, 2, PR_TicksPerSecond () * 5); 531 536 532 537 if (res == -1) trunk/libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-store.c
r2081 r2082 639 639 #ifdef HAVE_SSL 640 640 #define SSL_PORT_FLAGS (CAMEL_TCP_STREAM_SSL_ENABLE_SSL2 | CAMEL_TCP_STREAM_SSL_ENABLE_SSL3) 641 #define STARTTLS_FLAGS (CAMEL_TCP_STREAM_SSL_ENABLE_TLS | CAMEL_TCP_STREAM_SSL_ENABLE_SSL3)641 #define STARTTLS_FLAGS (CAMEL_TCP_STREAM_SSL_ENABLE_TLS) /* | CAMEL_TCP_STREAM_SSL_ENABLE_SSL3)*/ 642 642 #endif 643 643 … … 850 850 { 851 851 camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM, 852 _("Failed to connect to IMAP server %s in secure mode: %s "),853 service->url->host, _("SSL negotiations failed") );852 _("Failed to connect to IMAP server %s in secure mode: %s (%s)"), 853 service->url->host, _("SSL negotiations failed"), strerror (errno)); 854 854 goto exception; 855 855 } … … 869 869 { 870 870 camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM, 871 _("Failed to connect to IMAP server %s "),871 _("Failed to connect to IMAP server %s (%s)"), 872 872 service->url->host, _("Reading second CAPABILITY failed")); 873 873 goto exception;
