what is HTTPS
HTTPS = HTTP + TSL
TLS (Transport Layer Security)
TLS handshaking procedure
1. Client sends hello message to server
2. Server sends hello message and certificate (public key is in certificate) to client
3. Client authenticate server's certificate by checking if received certificate subject name actually matches the name of server being contacted, if the issuer of the certificate is a trusted
certificate authority (e.g. VeriSign/Microsoft/etc. which are pre-installed in browser)
4. Using all data generated in the handshake thus far, client creates the shared session key and encrypts it with server's public key, and then sends the encrypted session key to server
5. The client sends a message to server informing it that future messages from client will be encrypted with the session key, it then sends a separate message (encrypted) indicating that the client portion of handshake is finished.
6. The server does the same to client
How can i trust you
CA - Certificate Authority
CA is an entity that issues
digital certificates. The digital certificate certifies the ownership of a public key by the named subject of the certificate and it is a
trusted third party that is trusted by both the subject (owner) of the certificate and the party relying upon the certificate.
CA Providers
Java HTTPS support
Use HttpsURLConnection
Use Apache AHC (Asynchronous Http Client)
參考:
版權聲明:本文爲博主原創文章,未經博主容許不得轉載。html