}
}
private WebdavResource connect(String url){
WebdavResource wdr = null;
String user = null;
String password = null;
String host = null;
String port = null;
try {
//selfsigned; wenn selbssignierte Certifikate ber�cksichtigt werden sollen
//es gilt jetzt nur die offizielle
//System.getProperties().put("javax.net.ssl.trustStore","C:/scheduler/webdav_keystore/.keystore");
//System.getProperties().put("javax.net.ssl.trustStorePassword","changeit");
user = sosString.parseToString(currProfile.get("user"));
password = sosString.parseToString(currProfile.get("password"));
String proxyHost = sosString.parseToString(currProfile.get("proxy_server"));
int proxyPort = 21;
if(sosString.parseToString(currProfile.get("proxy_port")).length() > 0)
proxyPort = Integer.parseInt(sosString.parseToString(currProfile.get("proxy_port")));
String key = Options.getProperty("profile.timestamp." + currProfileName);
if(key != null && key.length() > 8) {
key = key.substring(key.length()-8);
}
if(password.length() > 0 && sosString.parseToString(key).length() > 0) {
password = SOSCrypt.decrypt(key, password);
}
if(password.length() == 0 ) {
Shell shell = new Shell();
shell.pack();
Dialog dialog = new Dialog(shell);
dialog.setText("Password");
dialog.open(this);
while (!shell.isDisposed()) {
if (!shell.getDisplay().readAndDispatch())
shell.getDisplay().sleep();
}
//shell.getDisplay().dispose();
//shell.dispose();
password = getPassword();
}
HttpURL hrl = new HttpURL(url);
hrl.setUserinfo(user,password);
if(proxyHost.length() > 0)
wdr = new WebdavResource(hrl, proxyHost, proxyPort);
else
wdr = new WebdavResource(hrl);
wdr.setDebug(9);
if(logtext != null) logtext.append("..webdav server reply [connect] [status= " + wdr.getStatusMessage() );
Options.setProperty("last_webdav_profile" , currProfileName);
Options.saveProperties();
} catch (Exception ex) {