private KeyStore getClientTruststore ( ) throws KeyStoreException , NoSuchAlgorithmException , CertificateException , IOException { KeyStore ks = null ; if ( _config . getTruststoreType ( ) != null && ! _config . getTruststoreType ( ) . isEmpty ( ) ) { try { ks = KeyStore . getInstance ( _config . getTruststoreType ( ) ) ; } catch ( KeyStoreException e ) { LOGGER . warn ( "The specified truststore type [" + _config . getTruststoreType ( ) + "] didn't work." , e ) ; throw e ; } } else { ks = KeyStore . getInstance ( KeyStore . getDefaultType ( ) ) ; } // get user password and file input stream char [ ] password = _config . getTruststorePassword ( ) . toCharArray ( ) ; java . io . FileInputStream fis = null ; try { fis = new java . io . FileInputStream ( _config . geTruststoreFilename ( ) ) ; ks . load ( fis , password ) ; } finally { if ( fis != null ) { fis . close ( ) ; } } return ks ; }
Read the KeyStore information supplied from the responder configuration file .