This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

No Luck Using a SSL Certificate with WebAdmin/User Portal

Short Version:
————————
I am unable to successfully install a publicly signed SSL certificate and along with it’s intermediate certificate for use in WebAdmin and the User Portal. 

After installation only some browsers (Safari & Chrome on OS X) show it as trusted. Others (Firefox on OS X, Safari on iOS, Chrome on Android, etc.) show it as untrusted.

Can anyone provide guidance?


Long Version:
————————
Following the KB articles at:
Create and Import a Public Signed Certificate for UTM Web Application Security
How to import and use your own certificate for WebAdmin in Astaro Security Gateway

I created a private key and corresponding CSR and submitted it for a UCC certificate with 20 SAN’s.

Using openssl I combined the resulting certificate and my private key in to a [FONT="Courier New"]p12[/FONT] file.  I uploaded it to the UTM (Remote Access > Certificate Management > Certificate > + New certificate), along with the Intermediate certificate previously converted from a crt to pem using openssl (Remote Access > Certificate Management > Certificate > Certificate Authority).  

I then selected the cert (Managment > WebAdmin Settings HTTPS Certificate > Choose WebAdmin/User Portal Certificate).

When testing across browsers Safari and Chrome show the certificate as trusted/verified.  However, iOS, Android, Firefox, etc. do not.

When verifying via openssl with the command:

[FONT="Courier New"]openssl s_client -showcerts -connect mywebadmin.mydomain.com.au:443[/FONT]

I get the error:

[FONT="Courier New"]Verify return code: 21 (unable to verify the first certificate)[/FONT]

Only the primary domain certificate is listed; not the intermediate or the root, so there appears to be no chain of trust.  It would appear that most likely the browsers that work are assembling the chain of trust from their own keystones???

Using the exact same [FONT="Courier New"]p12[/FONT] on other servers works perfectly fine.  Browsers accept and openssl (which I am assuming does not have  a keystore) verify it as fine displaying the full chain of trust.  I have tried adding the complete trust chain (primary domain + intermediate CA + root CA)  to the certificate to no avail.  From what I can tell the intermediate CA is not being presented to clients, only the primary.  But I'm a noob when it comes to SSL.

Any suggestions on fixing?


This thread was automatically locked due to age.
Parents Reply Children
  • Hi,


    Please use the shell to solve the problem.

    Check the configuration in  /var/sec/chroot-httpd/etc/httpd.

    In WEB-Interface you can see, that the UTM uses the right certificate. But in the config file you see the different! UTM uses an different certificate!

    In case of using intermediate certificates you have to edit the configuration in  /var/sec/chroot-httpd/etc/httpd/vhost/httpd-portal.conf

    SSLCertificateFile /etc/httpd/WebAdminCert.pem
    SSLCertificateKeyFile /etc/httpd/WebAdminKey.pem
    SSLCertificateChainFile /etc/httpd/intermediate1.pem
    SSLCACertificateFile /etc/httpd/intermediate2.pem

    MfG Stefan

  • The issue is occurring due to improper certificate etiquette... Whenever an Intermediate CA is involved, the Intermediate CA and CA must be concatenated into a single PEM in order to maintain hierarchy.

    • cat "./IntermediateCA.crt.pem" "./CA.crt.pem" > "./Intermediate-CA-Chain.crt.pem"
      • The Intermediate CA is still used to sign the certs it issues; however, the CA - Intermediate CA chain cert must be exported with the client cert & key to maintain the certificate chain of trust of Certificate -> Intermediate CA -> CA. This allows for the certificate path of the client cert to show a hierarchy of CA -> Intermediate CA -> Client

    Correct Layout

    -----BEGIN CERTIFICATE-----

       ### Intermediate CA ###

    -----END CERTIFICATE-----

    -----BEGIN CERTIFICATE-----

                  ### CA ###

    -----END CERTIFICATE-----

     Once concatenated, the Intermediate-CA-Chain.crt.pem must be used in lieu of the signing certificate when creating the p12.

    Windows will not be able to show both certificates in the PEM in gui form (it will only show the first listed, the Intermediate CA), however, if opened in a *nix OS, it will display both certs in gui form

    Please note, Intermediate CAs and Certs cannot be utilized for Sophos VPNs due to the way in which Sophos authenticates the certificates.

    SilverStone DS380 | AsRock C2750D4I | Alienware 18 In Win Chopin | SuperMicro A1SRi-2758F
    2.4gHz 8C C2750 ; 32GB ECC | 2.5gHz 4C i7 4710MQ ; 32GB 2.4gHz 8C C2758 ; 32GB ECC
    Vantec 4C USB3 PCIe UGT-PCE430-4C | 8GB AMD SLI R9 M290x |
    SSD  | 850 EVO: 120GB | 1TB ; mSATA: 1TB (2) | 850 Pro: 128GB ; 850 EVO: 1TB
    HDD | Seagate: { ST4000VN000 (8) } Z2 ; { HGST HTS721010A (3) } Z2 |
    FreeNAS 11.2 | { PNY Turbo USB3 32GB (2) } Mirror | Win 10 Pro | ESXi 6.7: Sophos UTM 9.6

    Various Wikis, Scripts, & Configs | Prebuilt OpenSSL Config

  • Could someone please do an ELI5 version? I'm not really sure what to do here.

    I have a GeoTrust RapidSSL installed and used by my web portal. However, I have some mobile client browsers (Android 4.2, I believe) that are showing the certificate as untrusted. Furthermore, when I test the cert using a tool like https://cryptoreport.rapidssl.com/checker/views/certCheck.jsp, it notifies me of a missing intermediate certificate.

    I first tried uploading the intermediate cert as a PEM, to Certificate Authority. No change.

    I then loaded the intermediate cert into a PEM file with my main cert, re-did the openSSL pks export, then re-installed that to my UTM. Both certs are listed (one under Certificates, the other under Certificate Authority). No joy. Test results are exactly as before.

    If I SSH in, and look at WebAdminCertCA.pem, this is the original self-signed cert, not my freshly-uploaded intermediate cert.

    Help me, Obi Wan...

    -----------------------
    SG210/UTM 9.407-3

  • It's generally best to read the last page/last 10 posts on a thread prior to posting.  Please see the last reply prior to your post 

    SilverStone DS380 | AsRock C2750D4I | Alienware 18 In Win Chopin | SuperMicro A1SRi-2758F
    2.4gHz 8C C2750 ; 32GB ECC | 2.5gHz 4C i7 4710MQ ; 32GB 2.4gHz 8C C2758 ; 32GB ECC
    Vantec 4C USB3 PCIe UGT-PCE430-4C | 8GB AMD SLI R9 M290x |
    SSD  | 850 EVO: 120GB | 1TB ; mSATA: 1TB (2) | 850 Pro: 128GB ; 850 EVO: 1TB
    HDD | Seagate: { ST4000VN000 (8) } Z2 ; { HGST HTS721010A (3) } Z2 |
    FreeNAS 11.2 | { PNY Turbo USB3 32GB (2) } Mirror | Win 10 Pro | ESXi 6.7: Sophos UTM 9.6

    Various Wikis, Scripts, & Configs | Prebuilt OpenSSL Config

  • JW0914 said:

    It's generally best to read the last page/last 10 posts on a thread prior to posting.  Please see the last reply prior to your post 

    You are assuming (incorrectly) that I have not. I have seen your post about the solution, but found it difficult to parse. Perhaps you could rephrase. Pretend I am 5.

    -----------------------
    SG210/UTM 9.407-3

  • Matthew said:
     
    JW0914

    It's generally best to read the last page/last 10 posts on a thread prior to posting.  Please see the last reply prior to your post  

     

    You are assuming (incorrectly) that I have not. I have seen your post about the solution, but found it difficult to parse. Perhaps you could rephrase. Pretend I am 5.

     

    The Intermediate CA and CA certificate must be concatenated into a single pem.  This is done easiest on a Linux/BSD distro, as both will display the two certificates in hierarchy when the concatenated pem is opened (utilize the cat command in my previous post to do so [concatenate]).

    Windows [cmd, not ps, terminal]: type '.\ICA.crt.pem' '.\CA.crt.pem' > '.\ICA-CA-Chain.crt.pem'

    While Windows won't display the concatenated cert correctly, you can still verify it with: openssl x509 -in ICA-CA-Chain.crt.pem -text -noout

    *nix/BSD: cat './ICA.crt.pem' './CA.crt.pem' > './ICA-CA-Chain.crt.pem'

    Once you've done the above, the concatenated CA needs to be uploaded to WebGUI, as well as installed on any devices accessing the WebGUI/User Portal.  If either the CA or the Intermediate CA is not signed by a central public CA, Android will throw a warning toast upon every boot.  This can be easily removed if the device is rooted, as the certificate needs to be moved from userland to system trusted (takes only ~3 min to accomplish).

    SilverStone DS380 | AsRock C2750D4I | Alienware 18 In Win Chopin | SuperMicro A1SRi-2758F
    2.4gHz 8C C2750 ; 32GB ECC | 2.5gHz 4C i7 4710MQ ; 32GB 2.4gHz 8C C2758 ; 32GB ECC
    Vantec 4C USB3 PCIe UGT-PCE430-4C | 8GB AMD SLI R9 M290x |
    SSD  | 850 EVO: 120GB | 1TB ; mSATA: 1TB (2) | 850 Pro: 128GB ; 850 EVO: 1TB
    HDD | Seagate: { ST4000VN000 (8) } Z2 ; { HGST HTS721010A (3) } Z2 |
    FreeNAS 11.2 | { PNY Turbo USB3 32GB (2) } Mirror | Win 10 Pro | ESXi 6.7: Sophos UTM 9.6

    Various Wikis, Scripts, & Configs | Prebuilt OpenSSL Config

  • Thank you for taking the time to repost! I believe I have followed your instructions, but am still unable to clear the intermediate certificate warnings.

    To recount, my GeoTrust RapidSSL is installed on the UTM.

    I obtained the recommended intermediate certificate bundle from https://knowledge.rapidssl.com/support/ssl-certificate-support/index?page=content&actp=CROSSLINK&id=SO28836, which I understand is the required concatenation of intermediate CA and root CA. I saved this as a .pem file (I am on Windows), then uploaded it from the web GUI.

    Retested at https://cryptoreport.rapidssl.com/checker/views/certCheck.jsp.

    Still tells me the intermediate cert is missing. Could I have missed any steps?

    Thanks, in advance.

    -----------------------
    SG210/UTM 9.407-3

  • I have the exact same symptom, and I have tried the suggested answer involving concatenating the two files into a single one.  I have tried re-generating the PKCS#12 file, I've tried uploading the concatenated CA (intermediate cert first) into the Certificate Authority tab, and just about every combo I can think of when generating the PKCS#12 file.  I can't get it to send the intermediate certificate out.

    I'm currently using certs from StartSSL and I have this same symptom on two different UTMs with two different domains and certs.  Both are software UTMs but I don't think that plays a factor, does it?

  • What certificates are you including in the p12?  

    • It should contain the following three files:  the concatenated ICA & CA [CA-Chain.crt.pem], the webadmin cert [webadmin.crt.pem], and the webadmin key [webadmin.key].

    What do you mean by "...I have tried re-generating the PKCS#12 file, uploading the concatenated CA nto the Certificate Authority tab, and just about every combo I can think of when generating the PKCS#12 file. " &  "...I can't get it to send the intermediate certificate out."

    • Sophos cannot utilize ICAs to issue certs.  I don't know why, however my guess is it has to do with security issues. 
    • I believe an ICA signed WebAdmin cert can be utilized, but I'm not 100%.

    Have you tried simply issuing the openssl command manually to create a p12?

    • openssl pkcs12 -export -out '.\WebAdmin.p12' -inkey '.\WebAdmin.key.pem' -in '.\WebAdmin.crt.pem' -certfile '.\Sophos VPN CA Chain.crt.pem' 
      • The Intermediate CA is still used to sign the certs it issues, however, the CA - Intermediate CA chain cert must be exported with the client cert & key to maintain the certificate chain of trust of Certificate -> Intermediate CA -> CA.  This allows for the certificate path of the client cert to show a hierarchy of CA -> Intermediate CA -> Client 
    • The OpenSSL utility can be downloaded for Windows or Linux/BSD.  If you need a preconfigured openssl.cnf, one can be found on my GitHub with all commands required at the bottom of the file, starting at line 546

    SilverStone DS380 | AsRock C2750D4I | Alienware 18 In Win Chopin | SuperMicro A1SRi-2758F
    2.4gHz 8C C2750 ; 32GB ECC | 2.5gHz 4C i7 4710MQ ; 32GB 2.4gHz 8C C2758 ; 32GB ECC
    Vantec 4C USB3 PCIe UGT-PCE430-4C | 8GB AMD SLI R9 M290x |
    SSD  | 850 EVO: 120GB | 1TB ; mSATA: 1TB (2) | 850 Pro: 128GB ; 850 EVO: 1TB
    HDD | Seagate: { ST4000VN000 (8) } Z2 ; { HGST HTS721010A (3) } Z2 |
    FreeNAS 11.2 | { PNY Turbo USB3 32GB (2) } Mirror | Win 10 Pro | ESXi 6.7: Sophos UTM 9.6

    Various Wikis, Scripts, & Configs | Prebuilt OpenSSL Config

  • Thanks for the reply.

    Your suggested process to issue the pkcs12 is exactly what I have attempted in every way.  

    • - The file listing you mention is exactly what I have used.  
    • - The openssl command you listed is exactly what I have been using to create PKCS12 files.  
    • - I have also attempted adding an additional -certfile command with each pem listed individually rather than in a concatenated file.  No change.  I've tried every combo I can think of with the same result in Firefox.
    • - I've also tried downloading the CA and ICA files directly from Start SSL's site rather than using the bundled ones provided when the certs were issued to me.

    At this stage, my belief is that the Sophos SG UTM does not send intermediate files to the client.  This is based on my results from multiple SSL test sites who state the intermediate or root certificate is not being sent with the response.

    At this time, I do not know of an additional troubleshooting item I can attempt.