diff options
author | Rob Austein <sra@hactrn.net> | 2007-10-09 21:50:47 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2007-10-09 21:50:47 +0000 |
commit | 45d983d07592f972d02ea7998293ea47768ed382 (patch) | |
tree | 2db4dbacfb10bf67e3e2a219bb7813a42f0e3665 /scripts/rpki/x509.py | |
parent | 26ad31d454fa12cc12f744c206f2e04440ce56bd (diff) |
Signed manifests almost working. ASN.1 encoding problem with
manifest.version.
svn path=/scripts/manifests.py; revision=1144
Diffstat (limited to 'scripts/rpki/x509.py')
-rw-r--r-- | scripts/rpki/x509.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/rpki/x509.py b/scripts/rpki/x509.py index e89d0f2c..4bcb20b4 100644 --- a/scripts/rpki/x509.py +++ b/scripts/rpki/x509.py @@ -548,7 +548,10 @@ class SignedManifest(DER_object): self.DER = rpki.cms.sign(self.content.toString(), keypair, certs) def verify(self, ta): - self.content = rpki.cms.verify(self.get_DER(), ta) + m = rpki.manifest.Manifest() + s = rpki.cms.verify(self.get_DER(), ta) + m.fromString(s) + self.content = m def build(self, serial, nextUpdate, names_and_objs): filelist = [] @@ -557,6 +560,7 @@ class SignedManifest(DER_object): d.update(obj.get_DER()) filelist.append((name.rpartition("/")[2], d.digest())) m = rpki.manifest.Manifest() + m.version.set(0) m.manifestNumber.set(serial) m.thisUpdate.set(POW.pkix.time2gen(time.time())) m.nextUpdate.set(POW.pkix.time2gen(nextUpdate)) |