[Erp5-report] r42408 luke - /erp5/trunk/products/Vifib/Tool/CertificateAuthorityTool.py

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Jan 18 11:41:43 CET 2011


Author: luke
Date: Tue Jan 18 11:41:43 2011
New Revision: 42408

URL: http://svn.erp5.org?rev=42408&view=rev
Log:
 - do not mangle id to CN, as it shall be used in it clean, lowercased
   form

Modified:
    erp5/trunk/products/Vifib/Tool/CertificateAuthorityTool.py

Modified: erp5/trunk/products/Vifib/Tool/CertificateAuthorityTool.py
URL: http://svn.erp5.org/erp5/trunk/products/Vifib/Tool/CertificateAuthorityTool.py?rev=42408&r1=42407&r2=42408&view=diff
==============================================================================
--- erp5/trunk/products/Vifib/Tool/CertificateAuthorityTool.py [utf8] (original)
+++ erp5/trunk/products/Vifib/Tool/CertificateAuthorityTool.py [utf8] Tue Jan 18 11:41:43 2011
@@ -36,7 +36,6 @@ from zLOG import LOG, INFO
 
 import os
 import subprocess
-import base64
 
 def popenCommunicate(command_list, input=None, **kwargs):
   kwargs.update(stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
@@ -185,14 +184,13 @@ class CertificateAuthorityTool(BaseTool)
     self._lockCertificateAuthority()
     try:
       new_id = open(self.serial, 'r').read().strip().lower()
-      cn = base64.encodestring(str(new_id) + ':')
       key = os.path.join(self.certificate_authority_path, 'private', new_id+'.key')
       csr = os.path.join(self.certificate_authority_path, new_id + '.csr')
       cert = os.path.join(self.certificate_authority_path, 'certs', new_id + '.crt')
       try:
         popenCommunicate([self.openssl_binary, 'req', '-nodes', '-config',
           self.openssl_config, '-new', '-keyout', key, '-out', csr, '-days',
-          '3650'], '%s\n' % cn, stdin=subprocess.PIPE)
+          '3650'], '%s\n' % new_id, stdin=subprocess.PIPE)
         popenCommunicate([self.openssl_binary, 'ca', '-batch', '-config',
           self.openssl_config, '-out', cert, '-infiles', csr])
         os.unlink(csr)



More information about the Erp5-report mailing list