if (this.myPassword != null) {
if (this.myPassword.startsWith("$")) {
String alias = this.myPassword.substring(1);
SecretKeyCallback.AliasRequest ar =
new SecretKeyCallback.AliasRequest(alias);
SecretKeyCallback skcb = new SecretKeyCallback(ar);
Callback[] callbacks = null;
if (this.useXWSSCallbacks) {
RuntimeProperties props = new RuntimeProperties(context);
callbacks = new Callback[]{props, skcb};
} else {
callbacks = new Callback[]{skcb};
}
try {
this._handler.handle(callbacks);
javax.crypto.SecretKey key = skcb.getKey();
byte[] password = key.getEncoded();
return new String(password);
} catch (Exception ex) {
log.log(Level.SEVERE, LogStringsMessages.WSS_0216_CALLBACKHANDLER_HANDLE_EXCEPTION( "SecretKeyCallback.AliasRequest"),
new Object[] { "SecretKeyCallback.AliasRequest"});