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

Can't select uploaded certificate for TLS handshake

(Apologies if this should be in the Site-to-Site VPN forum, but it's also related to Mail)

I had a signed certificate for SMTP traffic expire recently, so I deleted it from my Certificates list in my ASG220. I created a new certificate, gave it the same name as before, selected PEM as the file type, and uploaded the file I was given by the CA (in CRT format, but it came over fine). The basic information in the certificate is displayed properly in the list (start and expiration dates, for instance), but when I go to SMTP/Advanced, in the TLS handshake drop-down box I cannot select this new certificate. Back in the Certificates list, it shows the "non secure" icon next to the name, the picture of the card without the golden key at the bottom, and I can't download the certificate either. I assume this is the root of the problem but I can't find anything in Astaro documentation for how to resolve it. 

Any help much appreciated.


This thread was automatically locked due to age.
  • My first thought was that I would have thought you would need the private key, and so would have needed a PKCS#12 package instead of a PEM.  What does SupportUS say?

    Cheers - Bob
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • What is the file extension of the PKCS#12? Can I make the package myself? I have the private key along with the CA's certificate, as well as their Intermediate certificate, which I added as a Verification CA to the Astaro just in case. But they're all individual files.
  • I've never done it, but, apparently, you can use openssl and do the following:
    # export mycert.pem as PKCS#12 file, mycert.pfx
    openssl pkcs12 -export \
      -out mycert.pfx -in mycert.pem \
      -name "My Certificate"


    Let us know if that works.

    Cheers - Bob
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • Thanks Bob. I am using OpenSSL so that helps. I get this message after completing the commands:

    unable to load private key
    unable to write 'random state'

    It almost seems like I should be able to select both the crt and key files in this script rather than just the crt. (we're running Apache so certificates are in .crt not .pem, but that shouldn't matter). I know I'm missing something here...
  • Sorry to bump this, but this is becoming a serious issue for me because everyone is getting certification errors in their email clients and I'm starting to become public enemy #1! Not a fun way to lead into the weekend. Looks like our support contract with Astaro expired and by the time I have it renewed, several days will have passed. So any help in the interim would be great. I
  • Is there a reason you need to use an uploaded cert?  Why not just generate one inside the Astaro?

    Cheers - Bob
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • Because signed certificates work in all email clients - the self-signed certs do not, from my experience. I don't know if the encryption strength is necessarily stronger in the purchased certificate than something I create in the Astaro, but the compatibility thing is a huge issue for me since everyone uses whatever email program they prefer.
  • Here's a good example - I generated a certificate on the Astaro and assigned it to the TLS handshake. In the program Apple Mail, which the majority of people here use, the following message appears every time a connection to SMTP is attempted:

    "Mail can't verifiy the identity of ****"
    The Certificate for this server was signed by an unknown certifying authority. 

    This never happened with a signed certificate from any of the major CA's, because everyone already has those roots in their operating system (with a few exceptions, but there is always the intermediate/cross-root workaround for those newer roots). 

    If there's a way to have every client see the Astaro as a trusted CA without installing anything then great, but I've never been able to figure that out.
  • All I can say is that I've never created a cert for TLS,  assigned a cert for TLS or ever had a problem with any customer using Mail Security, but I don't think we have any customers on Apple Mail.  Does anyone know what the default cert is for TLS?  I guess it's the "Local X509 Certificate", but I don't know that for a fact.

    I wonder if the issue isn't a conflict in your basic configuration.  Is the hostname of your Astaro a publically-resolvable FQDN like mail.domain.com?  One idea would be to create a new cert (caution, to generate a good cert, you must fill in all of the fields) with 'VPNId' = "Hostname" and then putting the content of your primary MX record as the ID and also into 'SMTP hostname' in 'Advanced' settings.  Does selecting that cert solve the problem?

    Cheers - Bob
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • Yes, that's how I generated the certificate - the certificate's VPNID & common name and the Astaro's SMTP Hostname are identical, but the common name of this certificate (in this case smtp.domain.com) is different than the public name of the Astaro. 

    I tried the Local X509 Cert and it didn't change the behavior of email clients still prompting for security exceptions. 

    This configuration - using our mail server for IMAP/POP processing and the Astaro for SMTP, with one SSL certificate on each machine - has worked fine in the past for us. But seeing as how I didn't do the initial configuration and this is the first time I've had to buy new certificates for mail, I'm a little stumped. I assume that the previous sysadmin used the PCKS#12 package to get a signed certificate onto the Astaro, but I can't get that to work in openssl for whatever reason.