aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2007-11-01 22:09:48 +0000
committerRob Austein <sra@hactrn.net>2007-11-01 22:09:48 +0000
commit4298f47f8bf028cd952c0e67d5c5f5d5da229ac6 (patch)
treedf070d077ed03960f06d428c6c4b830ed239455e /scripts
parent325ae3e879fee2a847b61a94b799aae5ce29fdfc (diff)
Checkpoint
svn path=/scripts/rpki/x509.py; revision=1228
Diffstat (limited to 'scripts')
-rw-r--r--scripts/rpki/x509.py2
-rwxr-xr-xscripts/testroot.py6
2 files changed, 6 insertions, 2 deletions
diff --git a/scripts/rpki/x509.py b/scripts/rpki/x509.py
index 430c0165..16ca17e9 100644
--- a/scripts/rpki/x509.py
+++ b/scripts/rpki/x509.py
@@ -466,7 +466,7 @@ class PKCS10(DER_object):
req.certificationRequestInfo.subject.set((((POW.pkix.obj2oid("commonName"),
("printableString", cn)),),))
if exts is not None:
- req.setExtension(exts)
+ req.setExtensions(exts)
req.sign(keypair.get_POW(), POW.SHA256_DIGEST)
return cls(POWpkix = req)
diff --git a/scripts/testroot.py b/scripts/testroot.py
index a3b644d0..ba6cf809 100755
--- a/scripts/testroot.py
+++ b/scripts/testroot.py
@@ -20,11 +20,15 @@ root_cert = root_base + "testroot.cer"
def get_subject_cert():
try:
- return rpki.x509.X509(Auto_file = rpki_subject_filename)
+ x = rpki.x509.X509(Auto_file = rpki_subject_filename)
+ print "Read subject cert"
+ return x
except IOError:
+ print "No subject cert"
return None
def set_subject_cert(cert):
+ print "Writing subject cert"
f = open(rpki_subject_filename, "wb")
f.write(cert.get_DER())
f.close()