private synchronized void loadTrustManager(){
  try {
    TrustManagerFactory tmf=TrustManagerFactory.getInstance(X509_ALGORITHM);
    tmf.init(keystore);
    for (    TrustManager trustManager : tmf.getTrustManagers()) {
      if (trustManager instanceof X509TrustManager) {
        defaultViPRTrustManager=(X509TrustManager)trustManager;
        log.debug("found a X509TrustManager instance");
        break;
      }
    }
    log.info("renew trust manager. the # of certificates in trust store is {}",defaultViPRTrustManager.getAcceptedIssuers().length);
  }
 catch (  GeneralSecurityException e) {
    log.error(e.getMessage(),e);
  }
}

private synchronized void loadTrustManager ( ) { try { TrustManagerFactory tmf = TrustManagerFactory . getInstance ( X509_ALGORITHM ) ; tmf . init ( keystore ) ; for ( TrustManager trustManager : tmf . getTrustManagers ( ) ) { if ( trustManager instanceof X509TrustManager ) { defaultViPRTrustManager = ( X509TrustManager ) trustManager ; log . debug ( "found a X509TrustManager instance" ) ; break ; } } log . info ( "renew trust manager. the # of certificates in trust store is {}" , defaultViPRTrustManager . getAcceptedIssuers ( ) . length ) ; } catch ( GeneralSecurityException e ) { log . error ( e . getMessage ( ) , e ) ; } }
loads the trust manager using the vipr keystore .
