The security aspect of SSL is based on the certificate's "chain of trust". When the communication starts, the client examines the server's SSL certificate and checks if the received certificate is trusted by the Trusted Root CA store or other user-trusted certificates.