Skip to content

Instantly share code, notes, and snippets.

@spellancer
Created November 8, 2013 14:20
Show Gist options
  • Select an option

  • Save spellancer/7371670 to your computer and use it in GitHub Desktop.

Select an option

Save spellancer/7371670 to your computer and use it in GitHub Desktop.
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