Update server.py
This commit is contained in:
parent
c234e01bf4
commit
c361d1eda3
1 changed files with 6 additions and 1 deletions
|
@ -39,7 +39,12 @@ def loadcert_backend():
|
|||
if allowed_file(cert.filename) and allowed_file(privkey.filename):
|
||||
for i in os.listdir(homefolder + "/certs/"):
|
||||
thisname = "-".join(i.split("-")[:-1])
|
||||
if open(homefolder + "/certs/" + thisname + "-privkey.pem").read() == privkey.read() and open(homefolder + "/certs/" + thisname + "-chain.pem").read() == cert.read():
|
||||
print("thisname")
|
||||
print([open(homefolder + "/certs/" + thisname + "-privkey.pem").read()])
|
||||
print([privkey.read()])
|
||||
print([open(homefolder + "/certs/" + thisname + "-chain.pem").read()])
|
||||
print([cert.read()])
|
||||
if (open(homefolder + "/certs/" + thisname + "-privkey.pem").read() == privkey.read()) and (open(homefolder + "/certs/" + thisname + "-chain.pem").read() == cert.read()):
|
||||
resp = make_response('<meta name="viewport" content="width=device-width, initial-scale=1.0"><link rel="stylesheet" href="/style.css">The certificate seems to already exist, loading the used file.<br><br><p><a href="/" class=go style="color: white;">Go home</a></p>')
|
||||
resp.set_cookie('certname',thisname)
|
||||
return resp
|
||||
|
|
Loading…
Add table
Reference in a new issue