gopu23 / skpsmtpmessage

Automatically exported from code.google.com/p/skpsmtpmessage
0 stars 0 forks source link

TLS not working on device? #10

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
TLS connections seem to work fine in the Simulator. As soon as I switch to the 
iPhone, SKP 
throws an exception because it appears the stream can't be written to.

2009-01-07 16:06:23.745 App[1504:20b] C: Attempting to connect to server at: 
my.server.com:5465
2009-01-07 16:06:25.316 App[1504:20b] *** stopping watchdog ***
2009-01-07 16:06:25.322 App[1504:20b] S: 220 my.server.com ESMTP Postfix
2009-01-07 16:06:25.328 App[1504:20b] C: EHLO localhost
2009-01-07 16:06:25.335 App[1504:20b] bytes written: 16
2009-01-07 16:06:25.341 App[1504:20b] *** starting short watchdog ***
2009-01-07 16:06:26.338 App[1504:20b] *** stopping watchdog ***
2009-01-07 16:06:26.347 App[1504:20b] S: 250-my.server.com
2009-01-07 16:06:26.353 App[1504:20b] *** stopping watchdog ***
2009-01-07 16:06:26.358 App[1504:20b] S: 250-PIPELINING
2009-01-07 16:06:26.364 App[1504:20b] *** stopping watchdog ***
2009-01-07 16:06:26.370 App[1504:20b] S: 250-SIZE 10240000
2009-01-07 16:06:26.376 App[1504:20b] *** stopping watchdog ***
2009-01-07 16:06:26.391 App[1504:20b] S: 250-VRFY
2009-01-07 16:06:26.397 App[1504:20b] *** stopping watchdog ***
2009-01-07 16:06:26.404 App[1504:20b] S: 250-ETRN
2009-01-07 16:06:26.410 App[1504:20b] *** stopping watchdog ***
2009-01-07 16:06:26.416 App[1504:20b] S: 250-STARTTLS
2009-01-07 16:06:26.421 App[1504:20b] C: STARTTLS
2009-01-07 16:06:26.428 App[1504:20b] bytes written: 10
2009-01-07 16:06:26.436 App[1504:20b] *** starting short watchdog ***
2009-01-07 16:06:26.442 App[1504:20b] *** stopping watchdog ***
2009-01-07 16:06:26.448 App[1504:20b] S: 250 8BITMIME
2009-01-07 16:06:26.726 App[1504:20b] *** stopping watchdog ***
2009-01-07 16:06:26.732 App[1504:20b] S: 220 Ready to start TLS
2009-01-07 16:06:26.738 App[1504:20b] WARNING: Will not validate SSL chain!!!
2009-01-07 16:06:26.745 App[1504:20b] Beginning TLSv1...
2009-01-07 16:06:26.751 App[1504:20b] C: EHLO localhost
*** Terminating app due to uncaught exception 'HSK_CFUtilitiesErrorDomain', 
reason: 'Error 
writing bytes to stream!'
2009-01-07 16:06:27.588 App[1504:20b] Stack: (
    808221155,
    806100816,
    808035743,
    808035647,
    174565,
    178581,
    177177,
    812621199,
    808007687,
    808007573,
    808007199,
    824152885,
    808006801,
    808006183,
    807836299,
    807834407,
    827735648,
    816119480,
    816158236,
    8343,
    8244
)

Original issue reported on code.google.com by rbru...@gmail.com on 8 Jan 2009 at 12:23

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Sometimes CFWriteStreamWriteFully merely reports -1 bytes written rather than 
throwing the exception.

Original comment by rbru...@gmail.com on 8 Jan 2009 at 12:28

GoogleCodeExporter commented 9 years ago
I too am seeing behavior like this when trying to use smtp.comcast.net.  The 
wierd thing is that I cannot get 
this happen when using my own server with SSL disabled.  Perhaps comcast is 
cutting the stream off 
somehow.   

[168.215.14.55], pleased to meet you
2009-01-15 16:44:04.206 RingItUp[2471:20b] *** stopping watchdog ***
2009-01-15 16:44:04.211 RingItUp[2471:20b] S: 250-HELP
2009-01-15 16:44:04.217 RingItUp[2471:20b] *** stopping watchdog ***
2009-01-15 16:44:04.222 RingItUp[2471:20b] S: 250-AUTH LOGIN PLAIN CRAM-MD5
2009-01-15 16:44:04.228 RingItUp[2471:20b] *** stopping watchdog ***
2009-01-15 16:44:04.244 RingItUp[2471:20b] S: 250-SIZE 15728640
2009-01-15 16:44:04.249 RingItUp[2471:20b] *** stopping watchdog ***
2009-01-15 16:44:04.255 RingItUp[2471:20b] S: 250-ENHANCEDSTATUSCODES
2009-01-15 16:44:04.261 RingItUp[2471:20b] *** stopping watchdog ***
2009-01-15 16:44:04.267 RingItUp[2471:20b] S: 250-8BITMIME
2009-01-15 16:44:04.272 RingItUp[2471:20b] *** stopping watchdog ***
2009-01-15 16:44:04.278 RingItUp[2471:20b] S: 250-STARTTLS
2009-01-15 16:44:04.283 RingItUp[2471:20b] C: STARTTLS
2009-01-15 16:44:04.290 RingItUp[2471:20b] *** starting short watchdog ***
2009-01-15 16:44:04.296 RingItUp[2471:20b] *** stopping watchdog ***
2009-01-15 16:44:04.302 RingItUp[2471:20b] S: 250 OK
2009-01-15 16:44:04.323 RingItUp[2471:20b] *** stopping watchdog ***
2009-01-15 16:44:04.348 RingItUp[2471:20b] S: 220 2.0.0 Ready to start TLS
2009-01-15 16:44:04.355 RingItUp[2471:20b] Beginning TLSv1...
2009-01-15 16:44:04.361 RingItUp[2471:20b] C: EHLO localhost
2009-01-15 16:44:04.464 RingItUp[2471:20b] *** Terminating app due to uncaught 
exception 
'HSK_CFUtilitiesErrorDomain', reason: 'Error writing bytes to stream!'
2009-01-15 16:44:04.479 RingItUp[2471:20b] Stack: (
    808221155,
    806100816,
    808035743,
    808035647,
    375375,
    383821,
    380617,
    812621199,
    808007687,
    808007573,
    808007199,
    824152885,
    808006801,
    808006183,
    807836299,
    807834407,
    827735648,
    816119480,
    816158236,
    8381,
    8244
)
terminate called after throwing an instance of 'NSException'
(gdb) backtrace
#0  0x31459c58 in __kill ()
#1  0x31459c4c in kill ()
#2  0x31459c40 in raise ()
#3  0x3147442a in abort ()
#4  0x30075b44 in __gnu_cxx::__verbose_terminate_handler ()
#5  0x300c2100 in _objc_terminate ()
#6  0x300730d8 in std::terminate ()
#7  0x300731e0 in __cxa_throw ()
#8  0x300c1f8c in objc_exception_throw ()
#9  0x3029a59e in +[NSException raise:format:arguments:] ()
#10 0x3029a53e in +[NSException raise:format:] ()
#11 0x0005ba4e in CFWriteStreamWriteFully (outputStream=0x182fc0, 
buffer=0x181bc0 "EHLO 
localhost\r\n", length=16) at 
/Users/tflorman/Projects/RingItUp-v1.4/Email/HSK_CFUtilities.m:49
#12 0x0005db4c in -[SKPSMTPMessage parseBuffer] (self=0x182be0, _cmd=0x6ebf0) 
at 
/Users/tflorman/Projects/RingItUp-v1.4/Email/SKPSMTPMessage.m:411
#13 0x0005cec8 in -[SKPSMTPMessage stream:handleEvent:] (self=0x182be0, 
_cmd=0x300e8a60, 
stream=0x182f50, eventCode=2) at 
/Users/tflorman/Projects/RingItUp-v1.4/Email/SKPSMTPMessage.m:229
#14 0x306f9d8e in _inputStreamCallbackFunc ()
#15 0x30293806 in _CFStreamSignalEventSynch ()
#16 0x30293794 in _CFStreamSignalEvent ()
#17 0x3029361e in CFReadStreamSignalEvent ()
#18 0x311f9334 in _SocketCallBack ()
#19 0x30293490 in __CFSocketDoCallback ()
#20 0x30293226 in __CFSocketPerformV0 ()
#21 0x30269a8a in CFRunLoopRunSpecific ()
#22 0x30269326 in CFRunLoopRunInMode ()
#23 0x31563e60 in GSEventRunModal ()
#24 0x30a4feb8 in -[UIApplication _run] ()
#25 0x30a5961c in UIApplicationMain ()
#26 0x000020bc in main (argc=1, argv=0x2ffff5fc) at 
/Users/tflorman/Projects/RingItUp-v1.4/main.m:13
Current language:  auto; currently objective-c

Original comment by BSDim...@gmail.com on 15 Jan 2009 at 11:50

GoogleCodeExporter commented 9 years ago
TLS works fine on the device here. Check for expired certs, etc. Also please 
try the new code.

Original comment by ibaird@gmail.com on 20 Feb 2009 at 3:29