[Commits] (heikki) Save private key encrypted.

commits at osafoundation.org commits at osafoundation.org
Wed Apr 14 21:26:00 PDT 2004


Commit by: heikki
Modified files:
osaf/chandler/m2crypto/demo/x509/ca.py 1.7 1.8

Log message:
Save private key encrypted.


ViewCVS links:
http://cvs.osafoundation.org/index.cgi/osaf/chandler/m2crypto/demo/x509/ca.py.diff?r1=text&tr1=1.7&r2=text&tr2=1.8

Index: osaf/chandler/m2crypto/demo/x509/ca.py
diff -u osaf/chandler/m2crypto/demo/x509/ca.py:1.7 osaf/chandler/m2crypto/demo/x509/ca.py:1.8
--- osaf/chandler/m2crypto/demo/x509/ca.py:1.7	Wed Apr 14 16:30:16 2004
+++ osaf/chandler/m2crypto/demo/x509/ca.py	Wed Apr 14 21:25:29 2004
@@ -87,12 +87,13 @@
 
 if __name__ == '__main__':
     Rand.load_file('../randpool.dat', -1)
-    key = generateRSAKey()
-    pkey = makePKey(key)
+    rsa = generateRSAKey()
+    pkey = makePKey(rsa)
     req = makeRequest(pkey)
     print req.as_text()
     cert = makeCert(req, pkey)
     print cert.as_text()
     print cert.as_pem()
     cert.save_pem('my_ca_cert.pem')
+    rsa.save_key('my_key.pem', 'aes_256_cbc')
     Rand.save_file('../randpool.dat')



More information about the Commits mailing list