public synchronized KeyStore do_getKeyStore(boolean reinitialize, boolean createIfNotPresent) throws Exception {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.entry(tc, "do_getKeyStore", new Object[] { Boolean.valueOf(reinitialize), Boolean.valueOf(createIfNotPresent) });

        final String storeFile = this.location;
        final boolean create = createIfNotPresent;

        try {
            myKeyStore = obtainKeyStore(storeFile, create);
        } catch (PrivilegedActionException e) {
            Exception ex = e.getException();

            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                Tr.debug(tc, "Cannot open keystore URL: " + storeFile + "; " + ex);

            //Return a more HW friendly message if this is PKCS11
            if (getType().equals(Constants.KEYSTORE_TYPE_JAVACRYPTO)) {
                String msg = ex.getMessage();
                if (msg == null) {
                    msg = ex.getCause().getMessage();
                }
                Tr.error(tc, "ssl.hwkeystore.load.error.CWPKI0814E", new Object[] { getName(), storeFile, msg });
            } else {
                Tr.error(tc, "ssl.keystore.load.error.CWPKI0033E", new Object[] { storeFile, ex.getMessage() });
            }

            // Caller creates FFDC
            Tr.warning(tc, "ssl.config.not.used.CWPKI0809W", new Object[] { this.name, this.name });
            throw ex;
        }

        if (isDefault)
            Tr.info(tc, "Successfully loaded default keystore: " + this.location + " of type: " + this.type);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.exit(tc, "do_getKeyStore", myKeyStore);
        return myKeyStore;
    }
public synchronized KeyStore do_getKeyStore ( boolean reinitialize , boolean createIfNotPresent ) throws Exception { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "do_getKeyStore" , new Object [ ] { Boolean . valueOf ( reinitialize ) , Boolean . valueOf ( createIfNotPresent ) } ) ; final String storeFile = this . location ; final boolean create = createIfNotPresent ; try { myKeyStore = obtainKeyStore ( storeFile , create ) ; } catch ( PrivilegedActionException e ) { Exception ex = e . getException ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "Cannot open keystore URL: " + storeFile + "; " + ex ) ; if ( getType ( ) . equals ( Constants . KEYSTORE_TYPE_JAVACRYPTO ) ) { String msg = ex . getMessage ( ) ; if ( msg == null ) { msg = ex . getCause ( ) . getMessage ( ) ; } Tr . error ( tc , "ssl.hwkeystore.load.error.CWPKI0814E" , new Object [ ] { getName ( ) , storeFile , msg } ) ; } else { Tr . error ( tc , "ssl.keystore.load.error.CWPKI0033E" , new Object [ ] { storeFile , ex . getMessage ( ) } ) ; } Tr . warning ( tc , "ssl.config.not.used.CWPKI0809W" , new Object [ ] { this . name , this . name } ) ; throw ex ; } if ( isDefault ) Tr . info ( tc , "Successfully loaded default keystore: " + this . location + " of type: " + this . type ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "do_getKeyStore" , myKeyStore ) ; return myKeyStore ; }
Get the key store wrapped by this object. Synchronized version of
getKeyStore().

@param reinitialize
@param createIfNotPresent
@return KeyStore
@throws Exception