Hi all,

I want to access with an iOS client to a Java server. For the communication I 
used Thrift. If I try to connect to the server, I get the following error 
message:

CFNetwork SSLHandshake failed (-9807) 
Error occured opening stream: Error Domain=NSOSStatusErrorDomain Code=-9807 
"The operation couldn’t be completed. (OSStatus error -9807.)"
Error TTransportException: Error writing to transport output stream.
userInfo = {
    error = "Error Domain=NSOSStatusErrorDomain Code=-9807 \"The operation 
couldn\U2019t be completed. (OSStatus error -9807.)\"";
}
The code of my iOS client:

TSSLSocketClient *transportSSL = [[TSSLSocketClient alloc] 
initWithHostname:_host port:_port];
TFramedTransport *mTransport = [[TFramedTransport alloc] 
initWithTransport:transportSSL];
TBinaryProtocol *protocol = [[TBinaryProtocol alloc]
                             initWithTransport:mTransport
                             strictRead:YES
                             strictWrite:YES];



TMultiplexedProtocol *profilePrtcl = [[TMultiplexedProtocol alloc] 
initWithProtocol:protocol serviceName:@"ProfileService"];
self.service = [[ProfileServiceClient alloc] initWithProtocol:profilePrtcl];
The Code of my Java Server:

TSSLTransportFactory.TSSLTransportParameters params = new 
TSSLTransportFactory.TSSLTransportParameters();
params.setKeyStore("/path/to/keystore.jks", "Password");
this.serverTransport = TSSLTransportFactory.getServerSocket(port,10000, 
InetAddress.getByName("localhost"), params);
TServer server = new TThreadPoolServer(new 
TThreadPoolServer.Args(serverTransport).processor(processor));
server.serve()
Do I have to give the object TSSLSocketClient a certificate? If so, how?

Best regards

Michael Radle

Reply via email to