building an SSL connection
To create secure communication and build SSL connection the client sends a request towards the server using the https:// prefix. As a reply for the request the SSL protected server sends the public key belonging to the SSL certificate.
In order that the client can accept the certificate of the public key valid, it must be definitely issued by a reliable Certification Authority.
By means of the received public key the client encrypts the automatically generated symmetric key, the tool for the encrypted connection, data flow. The client sends the server the symmetric key encrypted by the public key belonging to the SSL certificate.
With its own private key the server decodes the encrypted symmetric key, thus both communicating parties already know the symmetric key and the flow of data encrypted by the symmetric key may be started.