Class CertificateUtilities
java.lang.Object
com.inductiveautomation.ignition.client.launch.util.CertificateUtilities
- 
Nested Class SummaryNested Classes
- 
Field SummaryFields
- 
Method SummaryModifier and TypeMethodDescriptionstatic KeyStoregetLoadedKeyStore(String javaHome) Returns a KeyStore that is loaded from the supplied java home.static StringgetSha256Fingerprint(X509Certificate certificate) Returns the SHA-256 fingerprint of the certificate.static TrustManager[]static voidCreates anSSLContextwhich is backed by aTrustManagerFactorywhose Keystore contains the contents of the default keystore on disk as well as the certificates in thegetCertificatesDirectory()and sets thatSSLContextas the default.static List<X509Certificate>readPemBundleCertificates(File pemBundle) Reads all the valid certificates which exist in the provided PEM bundle file.
- 
Field Details- 
IGN_TRUSTSTORE_TYPE
 
- 
- 
Method Details- 
readPemBundleCertificatesReads all the valid certificates which exist in the provided PEM bundle file. If the file is null or doesn't exist an empty list is returned.
- 
getSha256FingerprintReturns the SHA-256 fingerprint of the certificate.- Throws:
- Exception
 
- 
getTrustManagerspublic static TrustManager[] getTrustManagers() throws NoSuchAlgorithmException, KeyStoreException, CertificateUtilities.TrustStoreTypeException- Returns:
- the trust managers created from a trust manager factory initialized with the trust store loaded from java.home system property
- Throws:
- NoSuchAlgorithmException
- KeyStoreException
- CertificateUtilities.TrustStoreTypeException
- See Also:
 
- 
injectDefaultSslContextpublic static void injectDefaultSslContext() throws KeyStoreException, NoSuchAlgorithmException, KeyManagementException, CertificateUtilities.TrustStoreTypeExceptionCreates anSSLContextwhich is backed by aTrustManagerFactorywhose Keystore contains the contents of the default keystore on disk as well as the certificates in thegetCertificatesDirectory()and sets thatSSLContextas the default.
- 
getLoadedKeyStoreReturns a KeyStore that is loaded from the supplied java home. May be null if there was an issue loading the cacerts or default trust file file. If it has been previously loaded the existingKEY_STOREis returned.The default trust store is retrieved via getDefaultTrustStore(String)- Parameters:
- javaHome- The path to java home. This is usually just the System Property 'java.home'. Must not be null.
 
 
-