Foren

Liferay iOS Mobile SDK and self sighed SSL Certificate

thumbnail
Alessandro Maroldi, geändert vor 8 Jahren.

Liferay iOS Mobile SDK and self sighed SSL Certificate

New Member Beiträge: 5 Beitrittsdatum: 20.03.15 Neueste Beiträge
I'm facing with the problem on my Test environment to connect to Liferay services using LRSession on an HTTPS server that use a self sighed SSL certificate.

The app return this error "The certificate for this server is invalid. You might be connecting to a server that is pretending to be “***.***.it” which could put your confidential information at risk."

Error Domain=NSURLErrorDomain Code=-1202 "The certificate for this server is invalid. You might be connecting to a server that is pretending to be “****.****.it” which could put your confidential information at risk." UserInfo={NSURLErrorFailingURLPeerTrustErrorKey=<sectrustref: 0x7fb2ba76e540>, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9843, NSErrorPeerCertificateChainKey=<cfarray 0x7fb2ba76a7f0 [0x106ea8a40]>{}, NSUnderlyingError=0x7fb2ba58e660 </cfarray></sectrustref:>


Is there a way for Mobile SDK or a parameter to set inside my project configurations to accept the untrusted connetion?

Thanks a lot for any help
thumbnail
Bruno Farache, geändert vor 8 Jahren.

RE: Liferay iOS Mobile SDK and self sighed SSL Certificate

Liferay Master Beiträge: 603 Beitrittsdatum: 14.05.07 Neueste Beiträge
H Alessando, the SDK doesn't support untrusted certificates, you would have to modify it.
thumbnail
Alessandro Maroldi, geändert vor 8 Jahren.

RE: Liferay iOS Mobile SDK and self sighed SSL Certificate

New Member Beiträge: 5 Beitrittsdatum: 20.03.15 Neueste Beiträge
Hi Bruno, thanks for your reply.

I can try to make this change and send to you a Pull Request.

Could you please suggest me the best way to modify Mobile SDK to achieve it?

Best
Alessandro

PS: In particular I'm facing the problem with Wild Card certificate as well on third level domain.