-
Name
TrustManagerFactory -
Synopsis
ATrustManagerFactoryis responsible for creatingTrustManagerobjects for a specific trust management algorithm. Obtain aTrustManagerFactoryobject by calling one of thegetInstance( )methods and specifying the desired algorithm and, optionally, the desired provider. In Java 1.4, the “SunX509” algorithm is the only one supported by the default “SunJSSE” provider. After callinggetInstance( ), you initialize the factory object withinit( ). For the “SunX509” algorithm, you pass aKeyStoreobject toinit( ). ThisKeyStoreshould contain the public keys of trusted CAs (certification authorities). Once aTrustManagerFactoryhas been created and initialized, use it to create aTrustManagerby callinggetTrustManagers( ). This method returns an array ofTrustManagerobjects because some trust management algorithms may handle more than one type of key or certificate. The “SunX509” algorithm manages only X.509 keys, and always returns an array with anX509TrustManagerobject as its single element. This returned array is typically passed to theinit( )method of anSSLContextobject.If no
KeyStoreis passed to theinit( )method of theTrustManagerFactoryfor the “SunX509” algorithm, then the factory uses aKeyStorecreated from the file named by the system propertyjavax.net.ssl.trustStoreif that property is defined. (It also uses the key store type and password specified by the propertiesjavax.net.ssl.trustStoreTypeandjavax.net.ssl.trustStorePassword...
Last active
November 8, 2021 01:32
-
-
Save tw-Frey/a0df4c81d448100826b6fcae6feeba8b to your computer and use it in GitHub Desktop.
Synopsis of TrustManagerFactory
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment