From 966e3a591f582ffb6e461774341bee24f9fa1b8e Mon Sep 17 00:00:00 2001 From: Seth Schoen Date: Thu, 31 May 2012 12:30:02 -0700 Subject: [PATCH] we are going to need to use OpenSSL for a lot of stuff --- webserver/CSR.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 webserver/CSR.py diff --git a/webserver/CSR.py b/webserver/CSR.py new file mode 100644 index 000000000..27eaa704a --- /dev/null +++ b/webserver/CSR.py @@ -0,0 +1,31 @@ +#!/usr/bin/env python + +# use OpenSSL to provide CSR-related operations + +def parse(csr): + """Is this CSR syntactically valid?""" + return True + +def goodkey(csr): + """Does this CSR's public key comply with our CA policy?""" + return True + +def pubkey(csr): + """Get the public key from this CSR.""" + return "" + +def cn(csr): + """Get the common name from this CSR.""" + return "" + +def san(csr): + """Get the subject alternate names from this CSR.""" + return [] + +def verify(key, data): + """What string was validly signed by this public key? (or None)""" + return None + +def sign(key, data): + """Sign this data with this private key. For client-side use.""" + return ""