-
Notifications
You must be signed in to change notification settings - Fork 18
SSL configuration
jalukse edited this page Nov 13, 2019
·
1 revision
- By default the client is set up to trust both demo and live environment ssl certificates
Method | Description |
---|---|
SmartIdClient.useDemoEnvSSLCertificates() | uses only demo env ssl certificates |
SmartIdClient.useLiveEnvSSLCertificates() | uses only live env ssl certificates |
SmartIdClient.addTrustedSSLCertificates(String ...sslCertificate) | add ssl certificates when SK starts to use new |
SmartIdClient.setTrustedSSLCertificates(String ...sslCertificates) | set specific ssl certificates to trust |
SmartIdClient.loadSslCertificatesFromKeystore(KeyStore keyStore) | loads only the certificates in the keystore |
client = new SmartIdClient();
client.setRelyingPartyUUID(RELYING_PARTY_UUID);
client.setRelyingPartyName(RELYING_PARTY_NAME);
client.setHostUrl(DEMO_URL);
client.useDemoEnvSSLCertificates()
client = new SmartIdClient();
client.setRelyingPartyUUID(RELYING_PARTY_UUID);
client.setRelyingPartyName(RELYING_PARTY_NAME);
client.setHostUrl(HOST_URL);
InputStream is = SmartIdIntegrationTest.class.getResourceAsStream("/path_to_keystore_resource");
KeyStore keyStore = KeyStore.getInstance("JKS");
keyStore.load(is, "changeit".toCharArray());
client = new SmartIdClient();
client.setRelyingPartyUUID(RELYING_PARTY_UUID);
client.setRelyingPartyName(RELYING_PARTY_NAME);
client.setHostUrl(HOST_URL);
client.loadSslCertificatesFromKeystore(keystore);