Esempio n. 1
0
 def show_ca_detail(self):
     self.show_ca()
     if SSL.check_ca_exist():
         print "##################################################"
         print "### Detail"
         SSL.display_cert(SSL.get_ca())
     else:
         print "Cannot get details. CA not created yet"
Esempio n. 2
0
 def show_ca(self):
     for name in Config().config.options("ca"):
         value = Config().config.get("ca", name)
         print '  %-12s : %s' % (name.title(), value)
     if SSL.check_ca_exist():
         print "Status : OK"
     else:
         print "Status : Not Created"
Esempio n. 3
0
 def do_create(self, line):
     if not SSL.check_ca_exist():
         self.create_ca()
     else:
         if raw_input("Do you want to erase current CA ? (y/n) :").lower() == "y":
             print "All sub certificates will be resigned"
             self.create_ca(force=True)
         else:
             print "*** CA already created !"
Esempio n. 4
0
 def show_ca_raw(self):
     if SSL.check_ca_exist():
         print crypto.dump_certificate(crypto.FILETYPE_PEM, SSL.get_ca())
     else:
         print "Cannot get details. CA not created yet"