Server authentication with certificates happens similarly to server authentication with public keys, except that the possibility of a man-in-the-middle attack during the first connection to a particular server is eliminated. The signature of a certification authority in the server certificate guarantees the authenticity of the server certificate even in the first connection.
A short outline of the server authentication process with certificates is detailed below:
The server sends its certificate (which contains a public key) to the client. The packet also contains random data unique to the session, signed by the server's private key.
As the server certificate is signed with the private key of a certification authority (CA), the client can verify the validity of the server certificate by using the CA certificate.
The client checks that the certificate matches the name of the server. This check can be disabled by setting the
end-point-identity-checkattribute of the
cert-validationelement in the client configuration file to
The client verifies that the server has a valid private key by checking the signature in the initial packet.
During authentication the system checks that the certificate has not been revoked. This can be done either by using the Online Certificate Status Protocol (OCSP) or a certificate revocation list (CRL), which can be published either in an LDAP or HTTP repository.
OCSP is automatically used if the certificate contains a valid Authority Info Access extension, or an OCSP responder has been separately configured. If no OCSP responder is defined or the OCSP connection fails, CRLs are used. If LDAP is used as the CRL publishing method, the LDAP repository location can also be defined in the