private String getAuthStorageEnabledOption(SVNURL url) { String host = url != null ? url.getHost() : null; Map properties = getHostProperties(host); return (String) properties.get("store-auth-creds"); }
public boolean isStoreSSLClientCertificatePassphrases(SVNURL url) { String host = url != null ? url.getHost() : null; Map properties = getHostProperties(host); String storeCertPassphrases = (String) properties.get("store-ssl-client-cert-pp"); if (storeCertPassphrases == null) { return true; } return "yes".equalsIgnoreCase(storeCertPassphrases) || "on".equalsIgnoreCase(storeCertPassphrases) || "true".equalsIgnoreCase(storeCertPassphrases); }
public boolean trustDefaultSSLCertificateAuthority(SVNURL url) { String host = url.getHost(); Map properties = getHostProperties(host); return !"no".equalsIgnoreCase((String) properties.get("ssl-trust-default-ca")); }
public DefaultSVNSSLTrustManager(File authDir, SVNURL url, File[] serverCertFiles, boolean useKeyStore, DefaultSVNAuthenticationManager authManager) { myURL = url; myAuthDirectory = authDir; myRealm = "https://" + url.getHost() + ":" + url.getPort(); myAuthManager = authManager; myIsUseKeyStore = useKeyStore; myServerCertFiles = serverCertFiles; }
protected boolean isStoreSSLClientCertificatePassphrases(SVNURL url) { String host = url != null ? url.getHost() : null; Map properties = getHostProperties(host); String storeCertPassphrases = (String) properties.get("store-ssl-client-cert-pp"); if (storeCertPassphrases == null) { return true; } return "yes".equalsIgnoreCase(storeCertPassphrases) || "on".equalsIgnoreCase(storeCertPassphrases) || "true".equalsIgnoreCase(storeCertPassphrases); }
public String getUserName(SVNURL url) { String host = url != null ? url.getHost() : null; // if (url != null && url.getUserInfo() != null) { // return url.getUserInfo(); // } Map properties = getHostProperties(host); String userName = (String) properties.get("username"); return userName; }
public DefaultSVNSSLTrustManager(File authDir, SVNURL url, File[] serverCertFiles, boolean useKeyStore, DefaultSVNAuthenticationManager authManager) { myURL = url; myAuthDirectory = authDir; myRealm = "https://" + url.getHost() + ":" + url.getPort(); myAuthManager = authManager; myIsUseKeyStore = useKeyStore; myServerCertFiles = serverCertFiles; }
private String getStorePlainTextPassphraseOption(SVNAuthentication auth) { SVNURL url = auth.getURL(); String host = url != null ? url.getHost() : null; Map properties = getHostProperties(host); return (String) properties.get("store-ssl-client-cert-pp-plaintext"); }
private String getStorePlainTextPasswordOption(SVNAuthentication auth) { SVNURL url = auth.getURL(); String host = url != null ? url.getHost() : null; Map properties = getHostProperties(host); return (String) properties.get("store-plaintext-passwords"); }
private static String getFullRealmName(SVNURL location, String realm) { if (location == null || realm == null) { return realm; } return "<" + location.getProtocol() + "://" + location.getHost() + ":" + location.getPort() + "> " + realm; }
@Nullable @Override public RepositoryInfo getRepository(@NotNull SVNURL url) throws SVNException { final Map.Entry<String, GiteaProject> entry = RepositoryListMapping.getMapped(mapping, url.getPath()); if (entry != null && entry.getValue().isReady()) { return new RepositoryInfo( SVNURL.create(url.getProtocol(), url.getUserInfo(), url.getHost(), url.getPort() == SVNURL.getDefaultPortNumber(url.getProtocol()) ? -1 : url.getPort(), entry.getKey(), true), entry.getValue().getRepository() ); } return null; }
private HTTPSSLKeyManager createKeyManager() { if (!myIsSecured) { return null; } SVNURL location = myRepository.getLocation(); ISVNAuthenticationManager authManager = myRepository.getAuthenticationManager(); String sslRealm = "<" + location.getProtocol() + "://" + location.getHost() + ":" + location.getPort() + ">"; return new HTTPSSLKeyManager(authManager, sslRealm, location); }
/** * Returns a string representing a decoded url. * * @return a decoded url string */ public String toDecodedString() { return composeURL(getProtocol(), getUserInfo(), getHost(), myIsDefaultPort ? -1 : getPort(), getPath()); }
public void initCredentials(HTTPAuthentication authentication, String method, String path) { if (authentication != null) { authentication.setChallengeParameter("method", method); authentication.setChallengeParameter("uri", composeRequestURI(method, path)); authentication.setChallengeParameter("host", myConnection.getHost().getHost()); } }
/** * Returns a string representing a UTF-8 encoded url. * * @return an encoded url string */ public String toString() { if (myURL == null) { myURL = composeURL(getProtocol(), getUserInfo(), getHost(), myIsDefaultPort ? -1 : getPort(), getURIEncodedPath()); } return myURL; }
private HTTPSSLKeyManager createKeyManager() { if (!myIsSecured) { return null; } SVNURL location = myRepository.getLocation(); ISVNAuthenticationManager authManager = myRepository.getAuthenticationManager(); String sslRealm = "<" + location.getProtocol() + "://" + location.getHost() + ":" + location.getPort() + ">"; return new HTTPSSLKeyManager(authManager, sslRealm, location); }
/** * Returns a string representing a UTF-8 encoded url. * * @return an encoded url string */ public String toString() { if (myURL == null) { myURL = composeURL(getProtocol(), getUserInfo(), getHost(), myIsDefaultPort ? -1 : getPort(), getURIEncodedPath()); } return myURL; }
public void initCredentials(HTTPAuthentication authentication, String method, String path) { if (authentication != null) { authentication.setChallengeParameter("method", method); authentication.setChallengeParameter("uri", composeRequestURI(method, path)); authentication.setChallengeParameter("host", myConnection.getHost().getHost()); } }
/** * Returns a string representing a UTF-8 encoded url. * * @return an encoded url string */ public String toString() { if (myURL == null) { myURL = composeURL(getProtocol(), getUserInfo(), getHost(), myIsDefaultPort ? -1 : getPort(), getURIEncodedPath()); } return myURL; }
/** * Returns a string representing a decoded url. * * @return a decoded url string */ public String toDecodedString() { return composeURL(getProtocol(), getUserInfo(), getHost(), myIsDefaultPort ? -1 : getPort(), getPath()); }