Skip to main content
HS08
Visitor III
June 15, 2026
Solved

Persistent Agent with Wilcard SSL

  • June 15, 2026
  • 4 replies
  • 123 views

Can we use wildcard certificate for persistent agent? I have this log from the client when the Persisten Agent using valid wildcard certificate.

Wildcard cert!

Peername “nac.mydomain.com” matches wilcard “*.mydomain.com”

Refusing to connect to trust_DISTRUST nac.mydomain.com|*.mydomain.com

Connection failed! 1

SslStreamtransport::disconnect()

SslStreamtransport::disconnect() NOT joined rxBoostThread because this IS the receive thread

SslStreamtransport::disconnect() joined threads, free-ing the SSL State

Best answer by ndumaj

The certificate communication flow is like this:

When a wildcard certificate is used for the FortiNAC Persistent Agent (PA) service, proper certificate deployment and trust-chain validation are required to establish secure communication between the Persistent Agent and the FortiNAC server.
1. On FortiNAC side as Service provider for PA

The wildcard certificate assigned to the Persistent Agent service must be installed on the FortiNAC Persistent Agent Certificate Target. The complete certificate chain should be uploaded, including:

    The wildcard server certificate.
    Any Intermediate CA certificate(s).
    The corresponding private key.

This allows the FortiNAC Persistent Agent service running on TCP port 4568 to present a valid certificate chain to connecting clients.

2. On Persistent Agent Clients

Each endpoint running the Persistent Agent must trust the Certificate Authority (CA) that issued the wildcard certificate. This typically means that:

    The Root CA certificate must exist in the client's Trusted Root Certification Authorities store.
    Any required Intermediate CA certificates must also be available to complete the trust chain.

Without a trusted Root CA, the client cannot validate the server certificate and the TLS handshake will fail.
3. Certificate Validation Process

When the Persistent Agent starts communication with FortiNAC:

    The client connects to the FortiNAC Fully Qualified Domain Name (FQDN) on port 4568.
    The FortiNAC Persistent Agent service presents its configured wildcard certificate and certificate chain.
    The Persistent Agent validates:

  •         The certificate is issued for the requested hostname.
  •         The certificate is within its validity period.
  •         The certificate chain can be traced back to a trusted Root CA.
  •         The certificate has not been revoked and uses an acceptable signature algorithm.

    If validation succeeds, the TLS handshake is completed successfully.
    A secure, encrypted communication channel is established between the Persistent Agent and FortiNAC. 

4 replies

AEK
SuperUser
SuperUser
June 15, 2026

Yes you can. I usually do it and never had an issue.

The error you see is probably due to something else, e.g.: probably the CA is not recognized by the client.

AEK
HS08
HS08Author
Visitor III
June 16, 2026

Hi..

I think this is not CA issue because the client can open the captive portal with no ssl warning. The PA and cpative portal is use same ssl wildcard certificate.

ndumaj
Staff
Staff
June 16, 2026

The PA is complaining that is missing the Intermediate Certificate to complete the chain.
You need to upload the intermediate certificate along with PA certificate under the PA certificate Target on Fortinac.
 



Article:
Troubleshooting tip : Persistent Agent not communi... - Fortinet Community
Technical Tip: Persistent Agent fails to communic... - Fortinet Community

AEK
SuperUser
SuperUser
June 17, 2026

In case Dumaj’s suggestion doesn’t fix the issue, following some research it appears that DISTRUST means that the signing authority may be forced to not be trusted by the client host. Check in your cert manager (mmc) if you can find the CA implicitly mentioned in some banned folder (if I’m not wrong).

AEK
HS08
HS08Author
Visitor III
June 18, 2026

Now the PA is working normally, what i do is install the wildcard to the machine then export the certificate and root ca from that machine and upload to the fortinac.

ndumaj
Staff
ndumajAnswer
Staff
June 18, 2026

The certificate communication flow is like this:

When a wildcard certificate is used for the FortiNAC Persistent Agent (PA) service, proper certificate deployment and trust-chain validation are required to establish secure communication between the Persistent Agent and the FortiNAC server.
1. On FortiNAC side as Service provider for PA

The wildcard certificate assigned to the Persistent Agent service must be installed on the FortiNAC Persistent Agent Certificate Target. The complete certificate chain should be uploaded, including:

    The wildcard server certificate.
    Any Intermediate CA certificate(s).
    The corresponding private key.

This allows the FortiNAC Persistent Agent service running on TCP port 4568 to present a valid certificate chain to connecting clients.

2. On Persistent Agent Clients

Each endpoint running the Persistent Agent must trust the Certificate Authority (CA) that issued the wildcard certificate. This typically means that:

    The Root CA certificate must exist in the client's Trusted Root Certification Authorities store.
    Any required Intermediate CA certificates must also be available to complete the trust chain.

Without a trusted Root CA, the client cannot validate the server certificate and the TLS handshake will fail.
3. Certificate Validation Process

When the Persistent Agent starts communication with FortiNAC:

    The client connects to the FortiNAC Fully Qualified Domain Name (FQDN) on port 4568.
    The FortiNAC Persistent Agent service presents its configured wildcard certificate and certificate chain.
    The Persistent Agent validates:

  •         The certificate is issued for the requested hostname.
  •         The certificate is within its validity period.
  •         The certificate chain can be traced back to a trusted Root CA.
  •         The certificate has not been revoked and uses an acceptable signature algorithm.

    If validation succeeds, the TLS handshake is completed successfully.
    A secure, encrypted communication channel is established between the Persistent Agent and FortiNAC. 

HS08
HS08Author
Visitor III
June 18, 2026

Nice Info, thanks