Categories
Mastering Development System & Network

https communication principle between client and server based on self-signed certificate

I have known traditional https communication principle between browser and server. Now I have configured a https communication demo between client and server based on self signed certificate, the demo is shown below. The code in server is show below, import socket import ssl serv = socket.socket(socket.AF_INET, socket.SOCK_STREAM) serv = ssl.wrap_socket(serv, keyfile=’./privkey.pem’, certfile=’./certificate.pem’, server_side=True) serv.bind((“127.0.0.1”, […]