November 2017
Intermediate to advanced
452 pages
11h 46m
English
In the preceding example, an Android app creates a KeyStore with CAs (trusted certificates) that initializes the TrustManager whose job is to validate only the certificates that are within the KeyStore:
public class KeyPinStore {
private static KeyPinStore instance = null;
private SSLContext sslContext = SSLContext.getInstance("TLS");
public static synchronized KeyPinStore getInstance() throws CertificateException, IOException, KeyStoreException, NoSuchAlgorithmException, KeyManagementException{
if (instance == null){
instance = new KeyPinStore();
}
return instance;
}
private KeyPinStore() ...
Read now
Unlock full access