Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
1.py.pki
import subprocess
fout = open("output.txt","w")
s = subprocess.Popen (["openssl","verify","input.txt"], stdout=subprocess.PIPE)
out = s.stdout.read()
if "self signed certificate" in out:
r = 1
else:
r = 0
fout.write(str(r))
fout.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment