*/
private PrivateKey getPrivateKey(Map runtimeProps, String alias) {
PrivateKey privKey = null;
if (this.keystoreHandler != null) {
try {
PrivateKeyCallback cb = new PrivateKeyCallback();
cb.setKeystore(keyStore);
cb.setAlias(alias);
SecurityUtil.copy(cb.getRuntimeProperties(), runtimeProps);
Callback[] cbs = new Callback[]{cb};
this.keystoreHandler.handle(cbs);
privKey = cb.getKey();
} catch (IOException ex) {
log.log(Level.SEVERE, LogStringsMessages.WSS_1538_ERROR_GETTING_PRIVATE_KEY(), ex);
throw new XWSSecurityRuntimeException(ex);
} catch (UnsupportedCallbackException ex) {
log.log(Level.SEVERE, LogStringsMessages.WSS_1538_ERROR_GETTING_PRIVATE_KEY(), ex);