String data = Base64.byteArrayToBase64(certs[0].getEncoded());
String data = SVNBase64.byteArrayToBase64(certs[0].getEncoded());
    public SSLContext getSSLContext() throws IOException {        try {            SSLContext context = SSLContext.getInstance("TLS");            context.init(getKeyManagers(), new TrustManager[] {new X509TrustManager() {                 public X509Certificate[] getAcceptedIssuers() {                    init();                    return myTrustedCerts;                }                public void checkClientTrusted(X509Certificate[] certs, String arg1) throws CertificateException {                }                public void checkServerTrusted(X509Certificate[] certs, String algorithm) throws CertificateException {                    if (certs != null && certs.length > 0 && certs[0] != null) {                        String data = Base64.byteArrayToBase64(certs[0].getEncoded());                        String stored = (String) myAuthManager.getRuntimeAuthStorage().getData("svn.ssl.server", myRealm);                        if (data.equals(stored)) {                            return;                        }                        stored = getStoredServerCertificate(myRealm);                        if (data.equals(stored)) {                            return;                        }                        ISVNAuthenticationProvider authProvider = myAuthManager.getAuthenticationProvider();                        int failures = getServerCertificateFailures(certs[0]);                        // compose bit mask.                        // 8 is default                        // check dates for 1 and 2                        // check host name for 4                        if (authProvider != null) {                            boolean store = myAuthManager.isAuthStorageEnabled();                            int result = authProvider.acceptServerAuthentication(myURL, myRealm, certs[0], store);                            if (result == ISVNAuthenticationProvider.ACCEPTED && store) {                                storeServerCertificate(myRealm, data, failures);                            }                            if (result != ISVNAuthenticationProvider.REJECTED) {                                myAuthManager.getRuntimeAuthStorage().putData("svn.ssl.server", myRealm, data);                                return;                            }                             throw new CertificateException("svn: Server SSL ceritificate for '" + myRealm + "' rejected");                        }                         // like as tmp. accepted.                        return;                    }                }                                }}, null);            return context;        } catch (NoSuchAlgorithmException e) {            throw new IOException(e.getMessage());        } catch (KeyManagementException e) {            throw new IOException(e.getMessage());        }                }