public void engineSetKeyEntry(final String alias, final Key key, final char[] password, final Certificate[] chain) throws KeyStoreException { if (key instanceof Password) { engineSetEntry(alias, new PasswordEntry((Password) key), password == null ? null : new KeyStore.PasswordProtection(password)); } else { delegate.setKeyEntry(alias, key, password, chain); } }
public KeyStore.Entry engineGetEntry(final String alias, final KeyStore.ProtectionParameter protParam) throws KeyStoreException, NoSuchAlgorithmException, UnrecoverableEntryException { final KeyStore.Entry entry = delegate.getEntry(alias, protParam); if (entry instanceof KeyStore.SecretKeyEntry) { final SecretKey secretKey = ((KeyStore.SecretKeyEntry) entry).getSecretKey(); if ("password".equals(secretKey.getAlgorithm())) { return new PasswordEntry(decoded(secretKey)); } } return entry; }
public void engineSetKeyEntry(final String alias, final Key key, final char[] password, final Certificate[] chain) throws KeyStoreException { if (password != null) { throw new KeyStoreException(log.invalidKeyStoreEntryPassword(alias)); } if (key instanceof Password) { engineSetEntry(alias, new PasswordEntry((Password) key), null); } throw log.invalidKeyStoreEntryType(alias, PasswordEntry.class, Key.class); }
throw log.noAlgorithmForPassword(alias); map.put(alias, new PasswordEntry(pw)); while (ch != '\n') { ch = forceReadCP(br);
if (keyStoreCredential != null) throw reader.unexpectedElement(); ExceptionSupplier<Password, ConfigXMLParseException> credential = parseClearPassword(reader, providers); keyStoreCredential = () -> new PasswordEntry(credential.get()); break; throw new ConfigXMLParseException(xmlLog.couldNotObtainCredential(), reader); return new PasswordEntry(passwordCredential.getPassword()); } catch (IOException e) { throw xmlLog.xmlFailedToCreateCredential(nestedLocation, e);
if (keyStoreCredential != null) throw reader.unexpectedElement(); ExceptionSupplier<Password, ConfigXMLParseException> credential = parseClearPassword(reader, providers); keyStoreCredential = () -> new PasswordEntry(credential.get()); break; throw new ConfigXMLParseException(xmlLog.couldNotObtainCredential(), reader); return new PasswordEntry(passwordCredential.getPassword()); } catch (IOException e) { throw xmlLog.xmlFailedToCreateCredential(nestedLocation, e);
@ManagedBean(name = "entry") @ViewScoped public class PasswordEntryBean implements Serializable { //other attributes... private PasswordEntry passwordEntry; private PasswordEntry passwordEntryV; private PasswordEntry conPasswordEntry; //<editor-fold defaultstate="collapsed" desc="CONSTRUCTORS"> public PasswordEntryBean() { passwordEntry = new PasswordEntry(); passwordEntryV = new PasswordEntry(); conPasswordEntry = new PasswordEntry(); } //getters and setters... }
public void engineSetKeyEntry(final String alias, final Key key, final char[] password, final Certificate[] chain) throws KeyStoreException { if (key instanceof Password) { engineSetEntry(alias, new PasswordEntry((Password) key), password == null ? null : new KeyStore.PasswordProtection(password)); } else { delegate.setKeyEntry(alias, key, password, chain); } }
public void engineSetKeyEntry(final String alias, final Key key, final char[] password, final Certificate[] chain) throws KeyStoreException { if (key instanceof Password) { engineSetEntry(alias, new PasswordEntry((Password) key), password == null ? null : new KeyStore.PasswordProtection(password)); } else { delegate.setKeyEntry(alias, key, password, chain); } }
public void engineSetKeyEntry(final String alias, final Key key, final char[] password, final Certificate[] chain) throws KeyStoreException { if (key instanceof Password) { engineSetEntry(alias, new PasswordEntry((Password) key), password == null ? null : new KeyStore.PasswordProtection(password)); } else { delegate.setKeyEntry(alias, key, password, chain); } }
public KeyStore.Entry engineGetEntry(final String alias, final KeyStore.ProtectionParameter protParam) throws KeyStoreException, NoSuchAlgorithmException, UnrecoverableEntryException { final KeyStore.Entry entry = delegate.getEntry(alias, protParam); if (entry instanceof KeyStore.SecretKeyEntry) { final SecretKey secretKey = ((KeyStore.SecretKeyEntry) entry).getSecretKey(); if ("password".equals(secretKey.getAlgorithm())) { return new PasswordEntry(decoded(secretKey)); } } return entry; }
public KeyStore.Entry engineGetEntry(final String alias, final KeyStore.ProtectionParameter protParam) throws KeyStoreException, NoSuchAlgorithmException, UnrecoverableEntryException { final KeyStore.Entry entry = delegate.getEntry(alias, protParam); if (entry instanceof KeyStore.SecretKeyEntry) { final SecretKey secretKey = ((KeyStore.SecretKeyEntry) entry).getSecretKey(); if ("password".equals(secretKey.getAlgorithm())) { return new PasswordEntry(decoded(secretKey)); } } return entry; }
public KeyStore.Entry engineGetEntry(final String alias, final KeyStore.ProtectionParameter protParam) throws KeyStoreException, NoSuchAlgorithmException, UnrecoverableEntryException { final KeyStore.Entry entry = delegate.getEntry(alias, protParam); if (entry instanceof KeyStore.SecretKeyEntry) { final SecretKey secretKey = ((KeyStore.SecretKeyEntry) entry).getSecretKey(); if ("password".equals(secretKey.getAlgorithm())) { return new PasswordEntry(decoded(secretKey)); } } return entry; }
throw log.noAlgorithmForPassword(alias); map.put(alias, new PasswordEntry(pw)); while (ch != '\n') { ch = forceReadCP(br);
public void engineSetKeyEntry(final String alias, final Key key, final char[] password, final Certificate[] chain) throws KeyStoreException { if (password != null) { throw new KeyStoreException(log.invalidKeyStoreEntryPassword(alias)); } if (key instanceof Password) { engineSetEntry(alias, new PasswordEntry((Password) key), null); } throw log.invalidKeyStoreEntryType(alias, PasswordEntry.class, Key.class); }
public void engineSetKeyEntry(final String alias, final Key key, final char[] password, final Certificate[] chain) throws KeyStoreException { if (password != null) { throw new KeyStoreException(log.invalidKeyStoreEntryPassword(alias)); } if (key instanceof Password) { engineSetEntry(alias, new PasswordEntry((Password) key), null); } throw log.invalidKeyStoreEntryType(alias, PasswordEntry.class, Key.class); }
throw log.noAlgorithmForPassword(alias); map.put(alias, new PasswordEntry(pw)); while (ch != '\n') { ch = forceReadCP(br);
public void engineSetKeyEntry(final String alias, final Key key, final char[] password, final Certificate[] chain) throws KeyStoreException { if (password != null) { throw new KeyStoreException(log.invalidKeyStoreEntryPassword(alias)); } if (key instanceof Password) { engineSetEntry(alias, new PasswordEntry((Password) key), null); } throw log.invalidKeyStoreEntryType(alias, PasswordEntry.class, Key.class); }
throw log.noAlgorithmForPassword(alias); map.put(alias, new PasswordEntry(pw)); while (ch != '\n') { ch = forceReadCP(br);
if (keyStoreCredential != null) throw reader.unexpectedElement(); ExceptionSupplier<Password, ConfigXMLParseException> credential = parseClearPassword(reader, providers); keyStoreCredential = () -> new PasswordEntry(credential.get()); break; throw new ConfigXMLParseException(xmlLog.couldNotObtainCredential(), reader); return new PasswordEntry(passwordCredential.getPassword()); } catch (IOException e) { throw xmlLog.xmlFailedToCreateCredential(nestedLocation, e);