diff options
author | Brian P. Hinz <bphinz@users.sf.net> | 2019-11-02 14:26:47 -0400 |
---|---|---|
committer | Brian P. Hinz <bphinz@users.sf.net> | 2019-11-02 14:29:00 -0400 |
commit | 7b6532423d28365c43baf0641cb3ea110837d8bd (patch) | |
tree | 3345309f349323b55be15746d3dbb6ea58ce1e92 /java | |
parent | 929bd648b980db9b0a24fe4d9ead3c83c3e0ee4e (diff) | |
download | tigervnc-7b6532423d28365c43baf0641cb3ea110837d8bd.tar.gz tigervnc-7b6532423d28365c43baf0641cb3ea110837d8bd.zip |
Using socket.getPeerName() causes DNS lookup and noticable UI stall
Diffstat (limited to 'java')
-rw-r--r-- | java/com/tigervnc/rfb/CSecurityTLS.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/java/com/tigervnc/rfb/CSecurityTLS.java b/java/com/tigervnc/rfb/CSecurityTLS.java index 4524b1b7..ad6f6fe1 100644 --- a/java/com/tigervnc/rfb/CSecurityTLS.java +++ b/java/com/tigervnc/rfb/CSecurityTLS.java @@ -377,8 +377,7 @@ public class CSecurityTLS extends CSecurity { LdapName ln = new LdapName(dn); for (Rdn rdn : ln.getRdns()) { if (rdn.getType().equalsIgnoreCase("CN")) { - String peer = - ((CConn)client).getSocket().getPeerName().toLowerCase(); + String peer = client.getServerName().toLowerCase(); if (peer.equals(((String)rdn.getValue()).toLowerCase())) return; } @@ -388,8 +387,7 @@ public class CSecurityTLS extends CSecurity { while (i.hasNext()) { List nxt = (List)i.next(); if (((Integer)nxt.get(0)).intValue() == 2) { - String peer = - ((CConn)client).getSocket().getPeerName().toLowerCase(); + String peer = client.getServerName().toLowerCase(); if (peer.equals(((String)nxt.get(1)).toLowerCase())) return; } else if (((Integer)nxt.get(0)).intValue() == 7) { |