|
|
|
@ -1,5 +1,14 @@
|
|
|
|
|
#!/usr/bin/python
|
|
|
|
|
|
|
|
|
|
################################
|
|
|
|
|
# Configuration starts here
|
|
|
|
|
|
|
|
|
|
cert_path = '/home/sven/ssl/cert'
|
|
|
|
|
key_path = '/home/sven/ssl/private'
|
|
|
|
|
|
|
|
|
|
# Configuration ends here
|
|
|
|
|
################################
|
|
|
|
|
|
|
|
|
|
import socket, ssl
|
|
|
|
|
|
|
|
|
|
client_list = []
|
|
|
|
@ -30,8 +39,8 @@ while True:
|
|
|
|
|
newsocket, fromaddr = bindsocket.accept()
|
|
|
|
|
connstream = ssl.wrap_socket(newsocket,
|
|
|
|
|
server_side=True,
|
|
|
|
|
certfile="/home/sven/ssl/cert",
|
|
|
|
|
keyfile="/home/sven/ssl/private",
|
|
|
|
|
certfile=cert_path,
|
|
|
|
|
keyfile=key_path,
|
|
|
|
|
ssl_version=ssl.PROTOCOL_TLSv1)
|
|
|
|
|
try:
|
|
|
|
|
client_list.append(Client(connstream))
|
|
|
|
|