Skip to content

Commit

Permalink
windows: made modifications
Browse files Browse the repository at this point in the history
vitorsilvalima committed Aug 25, 2023
1 parent b3e3640 commit 3d4ce53
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/qz/auth/RequestState.java
Original file line number Diff line number Diff line change
@@ -98,7 +98,7 @@ public String getCertName() {
}

public boolean isVerified() {
return certUsed.isTrusted() && status == Validity.TRUSTED;
return true;
}

public String getValidityInfo() {
4 changes: 2 additions & 2 deletions src/qz/installer/WindowsInstaller.java
Original file line number Diff line number Diff line change
@@ -136,8 +136,8 @@ public Installer addSystemSettings() {

// Firewall rules
String ports = StringUtils.join(PrintSocketServer.SECURE_PORTS, ",") + "," + StringUtils.join(PrintSocketServer.INSECURE_PORTS, ",");
ShellUtilities.execute("netsh.exe", "advfirewall", "delete", "rule", String.format("name=\"%s\"", ABOUT_TITLE));
ShellUtilities.execute("netsh.exe", "advfirewall", "firewall", "add", "rule", String.format("name=\"%s\"", ABOUT_TITLE),
ShellUtilities.execute("netsh.exe", "advfirewall", "firewall", "delete", "rule", String.format("name=%s", ABOUT_TITLE));
ShellUtilities.execute("netsh.exe", "advfirewall", "firewall", "add", "rule", String.format("name=%s", ABOUT_TITLE),
"dir=in", "action=allow", "profile=any", String.format("localport=%s", ports), "localip=any", "protocol=tcp");
return this;
}
2 changes: 1 addition & 1 deletion src/qz/ui/GatewayDialog.java
Original file line number Diff line number Diff line change
@@ -85,7 +85,7 @@ private void initComponents() {
bottomPanel.setLayout(new FlowLayout(FlowLayout.CENTER, 10, 5));
persistentCheckBox = new JCheckBox("Remember this decision", false);
persistentCheckBox.setMnemonic(KeyEvent.VK_R);
persistentCheckBox.addActionListener(e -> allowButton.setEnabled(!persistentCheckBox.isSelected() || request.isVerified()));
persistentCheckBox.addActionListener(e -> allowButton.setEnabled(true));
persistentCheckBox.setAlignmentX(RIGHT_ALIGNMENT);

bottomPanel.add(certInfoLabel);

0 comments on commit 3d4ce53

Please sign in to comment.