This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // see http://developer.android.com/intl/ru/training/articles/security-ssl.html#UnknownCa | |
| // copy ssl certificate: echo -n | openssl s_client -connect server:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > ./res/raw/cert.crt | |
| public class ApiBuilder { | |
| public static IServerApi getServerApi() { | |
| OkHttpClient.Builder builder = new OkHttpClient.Builder(); | |
| try { | |
| Context context = App.getContext(); |