Compare commits
No commits in common. "22be3bdf62cd1fb2ede77d3cfe4753a65d884d38" and "379e161aa1bd5924a9926b53fe31f6090890c717" have entirely different histories.
22be3bdf62
...
379e161aa1
1 changed files with 3 additions and 15 deletions
|
@ -1,22 +1,10 @@
|
|||
from flask import *
|
||||
import ssl
|
||||
import OpenSSL as ssl
|
||||
import requests
|
||||
from Crypto.PublicKey import RSA
|
||||
|
||||
def resetKeys(privateKeyFile, publicKeyFile):
|
||||
keys = RSA.generate(1024)
|
||||
public_serv= open("./server/ssl.public.key")
|
||||
data='Hello World !'
|
||||
|
||||
with open("ssl/" + privateKeyFile, 'wb') as privHandle:
|
||||
privHandle.write(keys.export_key())
|
||||
|
||||
with open("ssl/" + publicKeyFile, 'wb') as pubHandle:
|
||||
pubHandle.write(keys.publickey().export_key())
|
||||
|
||||
resetKeys("private.key", "public.key")
|
||||
|
||||
with open("ssl/public.key", 'r') as pubHandle:
|
||||
public_serv = pubHandle.read()
|
||||
|
||||
print(public_serv)
|
||||
|
||||
data = 'Hello World !'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue