Refine search
private Object readResolve() { if (secretPassword == null) // backward compatibility : get scrambled password and store it encrypted secretPassword = Secret.fromString(Scrambler.descramble(password)); password = null; authenticator = newAuthenticator(); return this; }
@Override public SVNAuthentication createSVNAuthentication(String kind) { if(kind.equals(ISVNAuthenticationManager.SSL)) try { SVNSSLAuthentication authentication = SVNSSLAuthentication.newInstance( Base64.decode(certificate.getPlainText().toCharArray()), Scrambler.descramble(Secret.toString(password)).toCharArray(), false, null, false); return authentication; } catch (IOException e) { throw new Error(e); // can't happen } else return null; // unexpected authentication type }
public PasswordCredential(String userName, String password) { this.userName = userName; this.password = Secret.fromString(Scrambler.scramble(password)); }
public SVNUsernamePasswordAuthenticationBuilder(UsernamePasswordCredentials c) { this.username = c.getUsername(); this.password = Scrambler.scramble(c.getPassword().getPlainText()); }
@Override public SVNAuthentication createSVNAuthentication(String kind) { if (kind.equals(ISVNAuthenticationManager.SSL)) { try { return new SVNSSLAuthentication( Base64.decode(certificate.getPlainText().toCharArray()), Scrambler.descramble(password), false); } catch (IOException e) { throw new Error(e); // can't happen } } return null; // unexpected authentication type } }
@Override public StandardCertificateCredentials toCredentials(String description) { return new CertificateCredentialsImpl(CredentialsScope.GLOBAL, null, description, Scrambler.descramble(Secret.toString(password)), new CertificateCredentialsImpl.UploadedKeyStoreSource(certificate.getEncryptedValue())); }
private String getPassword() { return Scrambler.descramble(Secret.toString(password)); } }
@Override protected void callback(Details d, UnmarshallingContext context) { // Convert to hashed password and report to monitor if we load old data if (d.password!=null && d.passwordHash==null) { d.passwordHash = PASSWORD_ENCODER.encodePassword(Scrambler.descramble(d.password),null); OldDataMonitor.report(context, "1.283"); } } }
public ProxyConfiguration(String name, int port, String noProxyFor, String userName, String password, boolean authNeeded) { this.name = name; this.port = port; this.userName = userName; this.password = Scrambler.scramble(password); this.authNeeded = authNeeded; this.noProxyFor = noProxyFor; }
public SslClientCertificateCredential(File certificate, String password) throws IOException { this.password = Scrambler.scramble(password); this.certificate = Secret.fromString( new String(Base64.encode(FileUtils.readFileToByteArray(certificate)))); }
public SVNUsernamePrivateKeysAuthenticationBuilder(SSHUserPrivateKey c) { username = c.getUsername(); Secret secret = c.getPassphrase(); this.passphrase = secret != null ? Scrambler.scramble(secret.getPlainText()) : null; privateKeys = new ArrayList<String>(c.getPrivateKeys()); }
@Override public SVNAuthentication createSVNAuthentication(String kind) { if (kind.equals(ISVNAuthenticationManager.SSL)) { try { return new SVNSSLAuthentication( Base64.decode(certificate.getPlainText().toCharArray()), Scrambler.descramble(password), false); } catch (IOException e) { throw new Error(e); // can't happen } } else { return null; // unexpected authentication type } } }
@Override public StandardCredentials toCredentials(String description) throws IOException { try { return new BasicSSHUserPrivateKey(CredentialsScope.GLOBAL, null, userName, new BasicSSHUserPrivateKey.DirectEntryPrivateKeySource( FileUtils.readFileToString(getKeyFile(), "iso-8859-1") ), Scrambler.descramble(Secret.toString(passphrase)), description); } catch (UnsupportedCharsetException e) { throw new IllegalStateException( "Java Language Specification lists ISO-8859-1 as a required standard charset", e ); } }
String uidpassword = Scrambler.descramble(authorization.substring(6)); int idx = uidpassword.indexOf(':'); if (idx >= 0) {
/** * Main constructor * * @param username Username * @param password Clear-text password. Will be scrambled. */ public Credentials(String username, String password) { this.username = username; this.password = Scrambler.scramble(password); }
public SslClientCertificateCredential(File certificate, String password) throws IOException { this.password = Scrambler.scramble(password); this.certificate = Secret.fromString( new String(Base64.encode(FileUtils.readFileToByteArray(certificate)))); }
public SVNCertificateAuthenticationBuilder(CertificateCredentials c) { String password = c.getPassword().getPlainText(); this.password = Scrambler.scramble(password); char[] passwordChars = password.toCharArray(); KeyStore.PasswordProtection passwordProtection =
public Object readResolve() { if (secretPassword == null) // backward compatibility : get scrambled password and store it encrypted secretPassword = Secret.fromString(Scrambler.descramble(password)); password = null; return this; }
@Override public SVNSSHAuthentication createSVNAuthentication(String kind) throws SVNException { if(kind.equals(ISVNAuthenticationManager.SSH)) { try { Channel channel = Channel.current(); String privateKey; if(channel!=null) { // remote // Unsafe in general, but we should have already converted $JENKINS_HOME/subversion-credentials anyway. privateKey = channel.call(new SlaveToMasterCallable<String,IOException>() { /** * */ private static final long serialVersionUID = -3088632649290496373L; public String call() throws IOException { return FileUtils.readFileToString(getKeyFile(),"iso-8859-1"); } }); } else { privateKey = FileUtils.readFileToString(getKeyFile(),"iso-8859-1"); } return new SVNSSHAuthentication(userName, privateKey.toCharArray(), Scrambler.descramble(Secret.toString(passphrase)),-1,false); } catch (IOException | InterruptedException e) { throw new SVNException( new RemotableSVNErrorMessage(SVNErrorCode.AUTHN_CREDS_UNAVAILABLE, "Unable to load private key"), e); } } else return null; // unknown }
String uidpassword = Scrambler.descramble(authorization.substring(6)); int idx = uidpassword.indexOf(':'); if (idx >= 0) {