Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
  • Loading branch information
theseal committed Jun 18, 2024
1 parent 93d21dd commit 216aad1
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions ocsp-server.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@

import mariadb
from cryptography.hazmat.primitives import hashes, serialization
from cryptography.x509 import (OCSPNonce, ReasonFlags, extensions,
load_pem_x509_certificate, ocsp)
from cryptography.x509 import (
OCSPNonce,
ReasonFlags,
extensions,
load_pem_x509_certificate,
ocsp,
)
from flask import Flask, Response, request

app = Flask(__name__)
Expand All @@ -20,13 +25,14 @@


config = {
'host': os.getenv("SQLHOST", "127.0.0.1"),
'port': os.getenv("SQLPORT", 3306),
'user': os.getenv("SQLUSER", "AzureDiamond"),
'password': os.getenv("SQLPASSWORD", "hunter2"),
'database': os.getenv("SQLDB", "geteduroam"),
"host": os.getenv("SQLHOST", "127.0.0.1"),
"port": os.getenv("SQLPORT", 3306),
"user": os.getenv("SQLUSER", "AzureDiamond"),
"password": os.getenv("SQLPASSWORD", "hunter2"),
"database": os.getenv("SQLDB", "geteduroam"),
}


@app.route("/<realm>/", methods=["GET", "POST"])
def ocsp_server(realm):
if request.method == "GET":
Expand Down Expand Up @@ -117,6 +123,5 @@ def ocsp_server(realm):
return Response(response_bytes, mimetype="application/ocsp-response")



if __name__ == "__main__":
app.run(host="0.0.0.0")

0 comments on commit 216aad1

Please sign in to comment.