2016-01-12 13:44:44 +01:00
|
|
|
Index: tigervnc-1.6.0/java/com/tigervnc/rfb/CSecurityTLS.java
|
|
|
|
===================================================================
|
|
|
|
--- tigervnc-1.6.0.orig/java/com/tigervnc/rfb/CSecurityTLS.java
|
|
|
|
+++ tigervnc-1.6.0/java/com/tigervnc/rfb/CSecurityTLS.java
|
|
|
|
@@ -64,6 +64,9 @@ public class CSecurityTLS extends CSecur
|
2015-07-15 16:13:40 +02:00
|
|
|
public static StringParameter x509crl
|
|
|
|
= new StringParameter("x509crl",
|
|
|
|
"X509 CRL file", "", Configuration.ConfigurationObject.ConfViewer);
|
|
|
|
+ public static StringParameter x509autoaccept
|
|
|
|
+ = new StringParameter("x509autoaccept",
|
|
|
|
+ "X509 Certificate SHA-1 fingerprint", "", Configuration.ConfigurationObject.ConfViewer);
|
|
|
|
|
|
|
|
private void initGlobal()
|
|
|
|
{
|
2016-01-12 13:44:44 +01:00
|
|
|
@@ -82,6 +85,7 @@ public class CSecurityTLS extends CSecur
|
2015-07-15 16:13:40 +02:00
|
|
|
setDefaults();
|
|
|
|
cafile = x509ca.getData();
|
|
|
|
crlfile = x509crl.getData();
|
|
|
|
+ certautoaccept = x509autoaccept.getData();
|
|
|
|
}
|
|
|
|
|
|
|
|
public static String getDefaultCA() {
|
2016-01-12 13:44:44 +01:00
|
|
|
@@ -277,6 +281,11 @@ public class CSecurityTLS extends CSecur
|
|
|
|
String thumbprint =
|
|
|
|
DatatypeConverter.printHexBinary(md.digest());
|
|
|
|
thumbprint = thumbprint.replaceAll("..(?!$)", "$0 ");
|
2015-07-15 16:13:40 +02:00
|
|
|
+
|
2016-01-12 13:44:44 +01:00
|
|
|
+ if (certautoaccept != null && thumbprint.equalsIgnoreCase(certautoaccept)) {
|
|
|
|
+ return;
|
2015-07-15 16:13:40 +02:00
|
|
|
+ }
|
|
|
|
+
|
2016-01-12 13:44:44 +01:00
|
|
|
int ret = JOptionPane.showOptionDialog(null,
|
|
|
|
"This certificate has been signed by an unknown authority\n"+
|
|
|
|
"\n"+
|
|
|
|
@@ -466,7 +475,7 @@ public class CSecurityTLS extends CSecur
|
2015-07-15 16:13:40 +02:00
|
|
|
private SSLEngineManager manager;
|
|
|
|
private boolean anon;
|
|
|
|
|
|
|
|
- private String cafile, crlfile;
|
|
|
|
+ private String cafile, crlfile, certautoaccept;
|
|
|
|
private FdInStream is;
|
|
|
|
private FdOutStream os;
|
|
|
|
|
2016-01-12 13:44:44 +01:00
|
|
|
Index: tigervnc-1.6.0/java/com/tigervnc/vncviewer/VncViewer.java
|
|
|
|
===================================================================
|
|
|
|
--- tigervnc-1.6.0.orig/java/com/tigervnc/vncviewer/VncViewer.java
|
|
|
|
+++ tigervnc-1.6.0/java/com/tigervnc/vncviewer/VncViewer.java
|
|
|
|
@@ -353,6 +353,8 @@ public class VncViewer extends javax.swi
|
2015-07-15 16:13:40 +02:00
|
|
|
parent.setFocusTraversalKeysEnabled(false);
|
|
|
|
setLookAndFeel();
|
|
|
|
setBackground(Color.white);
|
|
|
|
+
|
|
|
|
+ SecurityClient.setDefaults();
|
|
|
|
}
|
|
|
|
|
|
|
|
private void getTimestamp() {
|
2016-01-12 13:44:44 +01:00
|
|
|
@@ -374,6 +376,7 @@ public class VncViewer extends javax.swi
|
2015-07-15 16:13:40 +02:00
|
|
|
if (embed.getValue() && nViewers == 0) {
|
|
|
|
alwaysShowServerDialog.setParam(false);
|
|
|
|
Configuration.global().readAppletParams(this);
|
|
|
|
+ Configuration.viewer().readAppletParams(this);
|
|
|
|
fullScreen.setParam(false);
|
|
|
|
scalingFactor.setParam("100");
|
|
|
|
String host = getCodeBase().getHost();
|