public boolean isSSLPassphrasePromtSupported() { if (getAuthenticationProvider() == null) { return true; } else if (getAuthenticationProvider() instanceof ISVNSSLPasspharsePromptSupport) { return ((ISVNSSLPasspharsePromptSupport) getAuthenticationProvider()).isSSLPassphrasePromtSupported(); } return false; }
@Override @CheckForNull public SVNAuthentication getFirstAuthentication(String kind, String realm, SVNURL url) throws SVNException { // SVNKIT DefaultAuthenticationManager ignores any credentials that are added to the manager. return super.getAuthenticationProvider().requestClientAuthentication(kind, url, realm, null, null, false); } }
return; ISVNAuthenticationProvider authProvider = myAuthManager.getAuthenticationProvider(); int failures = getServerCertificateFailures(certs[0]);
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 ISVNPersistentAuthenticationProvider) { existingFingerprints = ((ISVNPersistentAuthenticationProvider) myProviders[2]).loadFingerprints(realm); } if (existingFingerprints == null || !equals(existingFingerprints, hostKey)) { SVNURL url = SVNURL.create("svn+ssh", null, hostName, port, "", true); final ISVNHostOptions hostOptions = getHostOptionsProvider().getHostOptions(url); boolean storageEnabled = hostOptions.isAuthStorageEnabled(); if (getAuthenticationProvider() != null) { int accepted = getAuthenticationProvider().acceptServerAuthentication(url, realm, hostKey, storageEnabled); if (accepted == ISVNAuthenticationProvider.ACCEPTED && storageEnabled) { if (storageEnabled && hostKey != null && myProviders[2] instanceof ISVNPersistentAuthenticationProvider) { ((ISVNPersistentAuthenticationProvider) 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); } } } }
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; ISVNAuthenticationProvider authProvider = myAuthManager.getAuthenticationProvider(); int failures = SVNSSLUtil.getServerCertificateFailures(certs[0], myURL.getHost());
return; ISVNAuthenticationProvider authProvider = myAuthManager.getAuthenticationProvider(); int failures = SVNSSLUtil.getServerCertificateFailures(certs[0], myURL.getHost());
return; ISVNAuthenticationProvider authProvider = myAuthManager.getAuthenticationProvider(); int failures = SVNSSLUtil.getServerCertificateFailures(certs[0], myURL.getHost());