diff options
author | Rob Austein <sra@hactrn.net> | 2012-10-01 15:32:26 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2012-10-01 15:32:26 +0000 |
commit | c2781c794973be3839950dcab949bc6f151543b2 (patch) | |
tree | 69d118679fba9d7e632d1b61064447c6c4c24f08 /rpkid/rpki/x509.py | |
parent | e0b5f33f8a3b1f4ae23cb6448c450d84aeac1264 (diff) |
Convert CRL creation to use POW rather than POW.pkix.
svn path=/branches/tk274/; revision=4748
Diffstat (limited to 'rpkid/rpki/x509.py')
-rw-r--r-- | rpkid/rpki/x509.py | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/rpkid/rpki/x509.py b/rpkid/rpki/x509.py index 20013316..c65fbb72 100644 --- a/rpkid/rpki/x509.py +++ b/rpkid/rpki/x509.py @@ -1775,22 +1775,19 @@ class CRL(DER_object): return self.get_POW().getCRLNumber() @classmethod - def generate(cls, keypair, issuer, serial, thisUpdate, nextUpdate, revokedCertificates, version = 1, digestType = "sha256WithRSAEncryption"): + def generate(cls, keypair, issuer, serial, thisUpdate, nextUpdate, revokedCertificates, version = 1): """ Generate a new CRL. """ - crl = rpki.POW.pkix.CertificateList() + crl = rpki.POW.CRL() crl.setVersion(version) - crl.setIssuer(issuer.get_POWpkix().getSubject()) - crl.setThisUpdate(thisUpdate.toASN1tuple()) - crl.setNextUpdate(nextUpdate.toASN1tuple()) - if revokedCertificates: - crl.setRevokedCertificates(revokedCertificates) - crl.setExtensions( - ((rpki.oids.name2oid["authorityKeyIdentifier"], False, (issuer.get_SKI(), (), None)), - (rpki.oids.name2oid["cRLNumber"], False, serial))) - crl.sign(keypair.get_POW(), digestType) - return cls(POWpkix = crl) + crl.setIssuer(issuer.getSubject().get_POW()) + crl.setThisUpdate(thisUpdate.toGeneralizedTime()) + crl.setNextUpdate(nextUpdate.toGeneralizedTime()) + crl.setAKI(issuer.get_SKI()) + crl.setCRLNumber(serial) + crl.sign(keypair.get_POW()) + return cls(POW = crl) @property def creation_timestamp(self): |