return new SVNSSHAuthentication(userName, password, portNumber, isAuthStorageEnabled()); } else if (userName != null && keyFile != null) { return new SVNSSHAuthentication(userName, new File(keyFile), passphrase, portNumber, isAuthStorageEnabled());
return new SVNSSHAuthentication(userName, password, portNumber, isAuthStorageEnabled(null), null, false); } else if (userName != null && keyFile != null) { return new SVNSSHAuthentication(userName, new File(keyFile), passphrase, portNumber, isAuthStorageEnabled(null), null, false);
return new SVNSSHAuthentication(userName, password, portNumber, isAuthStorageEnabled(null), null, false); } else if (userName != null && keyFile != null) { return new SVNSSHAuthentication(userName, new File(keyFile), passphrase, portNumber, isAuthStorageEnabled(null), null, false);
boolean store = myAuthManager.isAuthStorageEnabled(); int result = authProvider.acceptServerAuthentication(myURL, myRealm, certs[0], store); if (result == ISVNAuthenticationProvider.ACCEPTED && store) {
return new SVNUserNameAuthentication("", isAuthStorageEnabled(url), url, false);
public void verifyHostKey(String hostName, int port, String keyAlgorithm, byte[] hostKey) throws SVNException { String realm = hostName + ":" + port + " <" + keyAlgorithm + ">"; byte[] existingFingerprints = (byte[]) getRuntimeAuthStorage().getData("svn.ssh.server", realm); if (existingFingerprints == null && myProviders[2] instanceof IPersistentAuthenticationProvider) { existingFingerprints = ((IPersistentAuthenticationProvider) myProviders[2]).loadFingerprints(realm); } if (existingFingerprints == null || !equals(existingFingerprints, hostKey)) { SVNURL url = SVNURL.create("svn+ssh", null, hostName, port, "", true); boolean storageEnabled = isAuthStorageEnabled(url); if (getAuthenticationProvider() != null) { int accepted = getAuthenticationProvider().acceptServerAuthentication(url, realm, hostKey, isAuthStorageEnabled(url)); if (accepted == ISVNAuthenticationProvider.ACCEPTED && isAuthStorageEnabled(url)) { if (storageEnabled && hostKey != null && myProviders[2] instanceof IPersistentAuthenticationProvider) { ((IPersistentAuthenticationProvider) myProviders[2]).saveFingerprints(realm, hostKey); } } else if (accepted == ISVNAuthenticationProvider.REJECTED) { throw new SVNAuthenticationException(SVNErrorMessage.create(SVNErrorCode.AUTHN_CREDS_NOT_SAVED, "Host key ('" + realm + "') can not be verified.")); } if (hostKey != null) { getRuntimeAuthStorage().putData("svn.ssh.server", realm, hostKey); } } } }
return new SVNUserNameAuthentication("", isAuthStorageEnabled(url), url, false);
boolean store = myAuthManager.isAuthStorageEnabled(myURL); boolean trustServer = checkServerTrustedByDefault(certs, algorithm); int result;
boolean store = myAuthManager.isAuthStorageEnabled(myURL); boolean trustServer = checkServerTrustedByDefault(certs, algorithm); int result;