Closed ixalon closed 4 years ago
I think this might be related to issue #444
After some further testing the problems seems to be introduced in 7.3.5 (7.3.4 does not close dealloc the socket prematurely).
Although in 7.3.4 GCDAsyncSocket never considers TLS handshake to be complete so we eventually get a read timeout (the client believes the handshake is complete and is sending encrypted data.).
With 7.3.4 and below I'm seeing socketDidSecure:
get called, but no further data can be read from the socket, so we get timeouts:
2016-07-29 11:53:25.377 DemoServer[19835:1181371] Socket disconected: Error Domain=GCDAsyncSocketErrorDomain Code=4 "Read operation timed out" UserInfo={NSLocalizedDescription=Read operation timed out}
Worked out my issue with 7.3.4 (operator error - waiting for CRLF where a linebreak in openssl s_client is just a LF!).
SSL handshake in 7.3.5 and above remains broken however.
Do you have an idea where/why it's broken? This is a pretty serious regression.
On Fri, Jul 29, 2016 at 1:42 PM, Chris Warren notifications@github.com wrote:
Worked out my issue with 7.3.4 (operator error - waiting for CRLF where a linebreak in openssl s_client is just a LF!).
SSL handshake in 7.3.5 and above remains broken however.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/robbiehanson/CocoaAsyncSocket/issues/457#issuecomment-236288240, or mute the thread https://github.com/notifications/unsubscribe-auth/AAfqH5N6O0uBgkzpl2_UnLt-tc43yZmoks5qamW_gaJpZM4JXvpd .
-(void)socket:(GCDAsyncSocket )socket didConnectToHost:(NSString )host port:(uint16_t)port{
NSMutableDictionary *settings = [[NSMutableDictionary alloc] init];
[settings setObject:[NSNumber numberWithBool:YES]
forKey:GCDAsyncSocketManuallyEvaluateTrust];
[self.socket startTLS:settings];
}
I got the same problem after i call startTLS method the socket disconnect with error " Error Domain=kCFStreamErrorDomainSSL Code=-9806 "(null)" UserInfo={NSLocalizedRecoverySuggestion=Error code definition can be found in Apple's SecureTransport.h}" is there anybody can tell me how to fix it
This issue has been marked as stale, it will be closed automatically if there is no further activity.
did you resolve this issue?
Hi I'm trying to create a simple HTTPS server. In
didAcceptNewSocket
I'm calling:I'm attempting to test using:
With debug logging enabled, I see the following in the xcode console:
socketDidSecure
is never called andsocketDidDisconnect
is called with no error object.openssl's debug log shows:
At which point the connection is closed (note the
write:errno=32
).Am I missing something obvious/doing something silly?
Many thanks, Chris