Table of Contents |
---|
By default, Android SDK delegates SSL certificates checking to the system level while establishing secure Websocket connestion to a server. On the system level, in its turn, server certificate is compared with system certificate storage content.
...
Since Android SDK build 1.1.0.56X509TrustManager class implementation is removed fromAndroid SDK code. For testing purposes, self-signed certificate must be added to application resources. Also, the configuration file network_security_config.xml
containing certificate file description must be added:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<network-security-config> <base-config> <trust-anchors> <certificates src="@raw/my_ca"/> <certificates src="system"/> </trust-anchors> </base-config> </network-security-config> |