Browse Source

Bug fixed and simplified requirements

Mike Richardson 5 years ago
parent
commit
3f617f728e
2 changed files with 9 additions and 73 deletions
  1. 9 18
      cli.py
  2. 0 55
      requirements.txt

+ 9 - 18
cli.py

@@ -3,18 +3,17 @@
 from certs import gencerts
 import os,sys,getopt
 
-## def gencerts(c,st,l,o,ou,cn,crldp,passphrase):
-
 def main(argv):
-  c=u'UK'
+  c=u'GB'
   st=u'England'
   l=u'Manchester'
-  o=u'Jisc'
-  ou=u'Govroam'
-  cn=u'something.somewhere.com'
-  crldp=u'http://something.somewhere.com/crldp'
+  o=u'WorkPlace'
+  ou=u'WorkUnit'
+  cn=u'Placeholder'
+  crldp=u'http://placeholder/crldp'
   passphrase=b'something'
-
+  directory=u'/tmp'
+  
   try:
     opts, args = getopt.getopt(argv,"c:s:l:o:u:n:r:p:d:")
   except getopt.GetoptError:
@@ -36,17 +35,13 @@ def main(argv):
     if opt == '-r':
       crldp=unicode(arg, "utf-8")
     if opt == '-p':
-      password=unicode(arg, "utf-8")
+      passphrase=arg
     if opt == '-d':
       directory=unicode(arg, "utf-8")
 
   if not os.path.exists(directory):
     os.makedirs(directory)
     
-## return csrsubject,output_cert(cacert),output_key_encrypted(cakey,passphrase),output_key_
-## encrypted(csrkey,passphrase),output_cert(servercert),output_cert(csrcert),output_cert(crlc
-## ert)
-
   csrsubject, cacert, cakey_enc, csrkey_enc, servercert, csrcert, crlcert = gencerts(c,st,l,o,ou,cn,crldp,passphrase)
 
   with open (directory + '/rootca.pem','w') as f:
@@ -57,16 +52,12 @@ def main(argv):
     f.write(cakey_enc)
     f.close
   
-  with open (directory + '/csrkey.pem','w') as f:
-    f.write(csrkey_enc)
-    f.close
-  
   with open (directory + '/server-cert.pem','w') as f:
     f.write(servercert)
     f.close
   
   with open (directory + '/server-key.pem','w') as f:
-    f.write(csrcert)
+    f.write(csrkey_enc)
     f.close
   
   with open (directory + '/list.crl','w') as f:

+ 0 - 55
requirements.txt

@@ -1,56 +1 @@
-backports.ssl-match-hostname==3.5.0.1
-cffi==1.6.0
-chardet==2.2.1
-configobj==4.7.2
 cryptography==1.7.2
-custodia==0.3.1
-decorator==3.4.0
-dnspython==1.12.0
-enum34==1.0.4
-gssapi==1.2.0
-idna==2.4
-iniparse==0.4
-ipaclient==4.6.4
-ipaddress==1.0.16
-ipalib==4.6.4
-ipaplatform==4.6.4
-ipapython==4.6.4
-IPy==0.75
-jwcrypto==0.4.2
-lxml==3.2.1
-MySQL-python==1.2.5
-netaddr==0.7.5
-netifaces==0.10.4
-perf==0.1
-ply==3.4
-policycoreutils-default-encoding==0.1
-pyasn1==0.1.9
-pyasn1-modules==0.0.8
-pycparser==2.14
-pycurl==7.19.0
-pygobject==3.22.0
-pygpgme==0.3
-pyliblzma==0.5.3
-pyOpenSSL==0.13.1
-pyparsing==1.5.6
-python-dateutil==1.5
-python-ldap==2.4.15
-python-linux-procfs==0.4.9
-python-nss==0.16.0
-python-yubico==1.2.3
-pyudev==0.15
-pyusb==1.0.0b1
-pyxattr==0.5.1
-qrcode==5.0.1
-requests==2.6.0
-schedutils==0.4
-seobject==0.1
-sepolicy==1.1
-six==1.9.0
-slip==0.4.0
-slip.dbus==0.4.0
-SSSDConfig==1.16.2
-urlgrabber==3.10
-urllib3==1.10.2
-virtualenv==16.0.0
-yum-metadata-parser==1.1.4