Changeset 2157


Ignore:
Timestamp:
13/02/07 14:08:20 (12 years ago)
Author:
pjkersha
Message:

ca/init.py: experimented with M2Crypto.X509.Request.sign for SimpleCA.sign method. Not
complete.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/ca/__init__.py

    r2151 r2157  
    605605                                               self.__prop['certTmpDir']) 
    606606 
     607        import pdb;pdb.set_trace() 
     608        req = X509.load_request(certReqFilePath) 
     609        priKeyFilePath = self.__openSSLConfig.get('CA_default', 'private_key') 
     610        pwdCallback = lambda *ar, **kw: self.__caPassphrase 
     611        priKey = EVP.load_key(priKeyFilePath, callback=pwdCallback) 
     612 
     613        try: 
     614            cert = req.sign(priKey, 'sha1') 
     615        except Exception, e: 
     616            raise SimpleCAError, str(e) 
     617 
    607618        gridCASignCmd = [ 
    608619            self.__prop['signExe'], 
Note: See TracChangeset for help on using the changeset viewer.