What does an HTTPS request look like?

What additional changes are needed so that this simple HTTP header can talk to a server that supports HTTPS.

GET /index.php HTTP/1.1
Host: localhost
[CR]
[CR]

EDIT
To add some context, all I am trying to do is open the TCP port (443) and read the index page, but the server seems to return a 400-Bad request along with the message that goes “You say a simple HTTP code to the server with SSL support. " I thought this probably meant a change in title in some way.

+6
source share
2 answers

HTTP runs on top of a secure channel. No configuration is required at all at the HTTP level. You need to encrypt all traffic going to the socket (after it leaves the HTTP client code) and decrypt the traffic coming from the socket before it reaches the HTTP client.

+3
source

You are encrypting the payload with information from the server for encryption. This is done by shaking hands on the server by server, so you cannot just fake it if it works everywhere.

The payload includes the query string, cookies, form, etc.

+2
source

Source: https://habr.com/ru/post/887470/


All Articles