aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2007-10-09 19:18:11 +0000
committerRob Austein <sra@hactrn.net>2007-10-09 19:18:11 +0000
commitd0ef5e6204d5f357d14e20a8779e74d86bb8cab1 (patch)
treeff2d1bc8247d1acbafd5d7423f0c3b975847df3e
parente7b42b6d2210f8001637758012a24faa70b8aaac (diff)
Debug manifest encoding
svn path=/scripts/manifests.py; revision=1136
-rw-r--r--scripts/manifests.py6
-rw-r--r--scripts/rpki/manifest.py2
2 files changed, 4 insertions, 4 deletions
diff --git a/scripts/manifests.py b/scripts/manifests.py
index a48928f8..5ea6f924 100644
--- a/scripts/manifests.py
+++ b/scripts/manifests.py
@@ -14,14 +14,14 @@ now = time.time()
mani = rpki.manifest.Manifest()
mani.set((0, # version
17, # manifestNumber
- POW.pkix.time2utc(now), # thisUpdate
- POW.pkix.time2utc(now + 24*60*60), # nextUpdate
+ POW.pkix.time2gen(now), # thisUpdate
+ POW.pkix.time2gen(now + 24*60*60), # nextUpdate
(2, 16, 840, 1, 101, 3, 4, 2, 1), # id-sha256
[onefile(i) for i in glob.glob("resource-cert-samples/*.cer")]))
print mani.get()
-if False:
+if True:
f = open("manifests.out.der", "w")
f.write(mani.toString())
f.close()
diff --git a/scripts/rpki/manifest.py b/scripts/rpki/manifest.py
index 8b9e104b..c77f092b 100644
--- a/scripts/rpki/manifest.py
+++ b/scripts/rpki/manifest.py
@@ -12,7 +12,7 @@ from POW._der import *
class FileAndHash(Sequence):
def __init__(self, optional=0, default=''):
self.file = IA5String()
- self.hash = BitString()
+ self.hash = AltBitString()
contents = [ self.file, self.hash ]
Sequence.__init__(self, contents, optional, default)