mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-10 17:49:38 +02:00
Remove ServerTrustManager
The implementation of ServerTrustManger contains a security vulnerability, which could lead to unauthorized certificates being erroneously trusted. SMACK-410
This commit is contained in:
parent
5f5805cd1c
commit
93030c218c
3 changed files with 1 additions and 529 deletions
|
@ -844,8 +844,7 @@ public class XMPPConnection extends Connection {
|
|||
// Verify certificate presented by the server
|
||||
if (context == null) {
|
||||
context = SSLContext.getInstance("TLS");
|
||||
context.init(kms, new javax.net.ssl.TrustManager[] { new ServerTrustManager(getServiceName(), config) },
|
||||
new java.security.SecureRandom());
|
||||
context.init(kms, null, new java.security.SecureRandom());
|
||||
}
|
||||
Socket plain = socket;
|
||||
// Secure the plain connection
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue