QZ-Tray showing website as untrusted on the pop-up when trying to connect and print

737 Views Asked by At

I am trying to use QZ-Tray to print labels at a terminal in my workshop. I have all of the program working however I want to remove the annoying '... wants to connect to QZ Tray Untrusted Website' pop-up. I have installed the certificate and the private key in the signing script. However I still get the pop-up, the information from the certificate is showing i.e. Organization, Common Name etc but it is showing under the Certificate section that Trusted = Untrusted Website and then under the Request section Validity = Invalid Certificate.

Below is the details box that appears when trying to complete an action.

Request

Call connect
Parameters {}
Signature Not Required
Timestamp 1686732120276
Validity Invalid Certificate

Certificate

Organization CloudFlare, Inc.
Common Name CloudFlare Origin Certificate
Trusted Untrusted Website
Valid From 2023-06-14 08:22:00
Valid To 2038-06-10-08:22:00
Fingerprint Omitted
1

There are 1 best solutions below

0
tresf On

This indicates you never overrode the default certificate.

In order to use QZ Tray in a self-signed fashion, you will need to:

  1. Override the built-in trusted root certificate
    Note: QZ can do this for you using the DEMO Keys feature.
  2. Setup setCertificatePromise() using JavaScript
  3. Setup setSignaturePromise() using JavaScript and a back-end language
    ⚠️ Warning: If you decide to use pure front-end JavaScript for signing, it can leak your private key to the browser.