19 lines
334 B
Python
19 lines
334 B
Python
#!/usr/bin/env python3
|
|
|
|
import os, sys, cgitb
|
|
|
|
# Log errors to disk only
|
|
cgitb.enable(display=0, logdir="/var/log/gemini", format="plain")
|
|
|
|
# Load CGI vars
|
|
cert_fp = os.getenv("TLS_CLIENT_HASH")
|
|
|
|
if None == cert_fp :
|
|
# Prompt for client cert
|
|
print("60 Cert required\r")
|
|
else :
|
|
print("20 text/plain\r")
|
|
print( cert_fp )
|
|
|
|
|