2017-05-31 13:59:52 +02:00
|
|
|
Index: tigervnc-1.8.0/java/com/tigervnc/rfb/CSecurityTLS.java
|
2016-01-12 13:44:44 +01:00
|
|
|
===================================================================
|
2017-05-31 13:59:52 +02:00
|
|
|
--- tigervnc-1.8.0.orig/java/com/tigervnc/rfb/CSecurityTLS.java
|
|
|
|
+++ tigervnc-1.8.0/java/com/tigervnc/rfb/CSecurityTLS.java
|
2016-01-12 13:44:44 +01:00
|
|
|
@@ -64,6 +64,9 @@ public class CSecurityTLS extends CSecur
|
2017-05-31 13:59:52 +02:00
|
|
|
public static StringParameter X509CRL
|
|
|
|
= new StringParameter("X509CRL",
|
2015-07-15 16:13:40 +02:00
|
|
|
"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();
|
2017-05-31 13:59:52 +02:00
|
|
|
cafile = X509CA.getData();
|
|
|
|
crlfile = X509CRL.getData();
|
2015-07-15 16:13:40 +02:00
|
|
|
+ certautoaccept = x509autoaccept.getData();
|
|
|
|
}
|
|
|
|
|
|
|
|
public static String getDefaultCA() {
|
2017-07-20 14:12:06 +02:00
|
|
|
@@ -270,6 +274,10 @@ public class CSecurityTLS extends CSecur
|
|
|
|
tm.checkServerTrusted(chain, authType);
|
|
|
|
} catch (java.lang.Exception e) {
|
|
|
|
if (e.getCause() instanceof CertPathBuilderException) {
|
2016-01-12 13:44:44 +01:00
|
|
|
+ if (certautoaccept != null && thumbprint.equalsIgnoreCase(certautoaccept)) {
|
|
|
|
+ return;
|
2015-07-15 16:13:40 +02:00
|
|
|
+ }
|
|
|
|
+
|
2017-07-20 14:12:06 +02:00
|
|
|
Object[] answer = {"YES", "NO"};
|
2016-01-12 13:44:44 +01:00
|
|
|
int ret = JOptionPane.showOptionDialog(null,
|
|
|
|
"This certificate has been signed by an unknown authority\n"+
|
2017-07-20 14:12:06 +02:00
|
|
|
@@ -466,7 +474,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;
|
|
|
|
|
2017-05-31 13:59:52 +02:00
|
|
|
Index: tigervnc-1.8.0/java/com/tigervnc/vncviewer/VncViewer.java
|
2016-01-12 13:44:44 +01:00
|
|
|
===================================================================
|
2017-05-31 13:59:52 +02:00
|
|
|
--- tigervnc-1.8.0.orig/java/com/tigervnc/vncviewer/VncViewer.java
|
|
|
|
+++ tigervnc-1.8.0/java/com/tigervnc/vncviewer/VncViewer.java
|
|
|
|
@@ -368,6 +368,8 @@ public class VncViewer extends javax.swi
|
|
|
|
// Called right after zero-arg constructor in applet mode
|
2015-07-15 16:13:40 +02:00
|
|
|
setLookAndFeel();
|
|
|
|
setBackground(Color.white);
|
|
|
|
+
|
|
|
|
+ SecurityClient.setDefaults();
|
2017-05-31 13:59:52 +02:00
|
|
|
applet = this;
|
|
|
|
vncServerName.put(loadAppletParameters(applet).toCharArray()).flip();
|
|
|
|
if (embed.getValue()) {
|