mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-09 17:19:39 +02:00
[core] Rework TLS logic
This moves the logic in AbstractXMPPConnection.getSmackTlsContext() into the ConnectionConfiguration constructor. Also introduce SslContextFactory and use it in ConnectionConfiguration.
This commit is contained in:
parent
7156849c77
commit
f5448c5faa
14 changed files with 252 additions and 314 deletions
|
@ -37,7 +37,6 @@ import javax.net.ssl.HttpsURLConnection;
|
|||
import javax.net.ssl.SSLContext;
|
||||
import javax.net.ssl.SSLSocketFactory;
|
||||
|
||||
import org.jivesoftware.smack.ConnectionConfiguration;
|
||||
import org.jivesoftware.smack.ConnectionCreationListener;
|
||||
import org.jivesoftware.smack.ConnectionListener;
|
||||
import org.jivesoftware.smack.Manager;
|
||||
|
@ -428,11 +427,6 @@ public final class HttpFileUploadManager extends Manager {
|
|||
this.tlsSocketFactory = tlsContext.getSocketFactory();
|
||||
}
|
||||
|
||||
public void useTlsSettingsFrom(ConnectionConfiguration connectionConfiguration) {
|
||||
SSLContext sslContext = connectionConfiguration.getCustomSSLContext();
|
||||
setTlsContext(sslContext);
|
||||
}
|
||||
|
||||
private void upload(InputStream iStream, long fileSize, Slot slot, UploadProgressListener listener) throws IOException {
|
||||
final URL putUrl = slot.getPutUrl();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue