aboutsummaryrefslogtreecommitdiffstats
path: root/misc/python
diff options
context:
space:
mode:
authorlloyd <[email protected]>2006-08-23 03:57:32 +0000
committerlloyd <[email protected]>2006-08-23 03:57:32 +0000
commit8a8e8c6d725c23ab575c04e22603915824466dcf (patch)
tree9c1ce5749cb67e63669a7abe7ce069a342b6701b /misc/python
parent38bb757a31100c6370b3f32ad7683d2b3fc0fc0a (diff)
Revert back to the original test script (which is still crashing, presumably
due to reference counting bugs in the wrapper code)
Diffstat (limited to 'misc/python')
-rwxr-xr-xmisc/python/test.py23
1 files changed, 9 insertions, 14 deletions
diff --git a/misc/python/test.py b/misc/python/test.py
index 2876f7667..c73cc9369 100755
--- a/misc/python/test.py
+++ b/misc/python/test.py
@@ -2,23 +2,18 @@
import sys, botan
-class FindDOD(botan.X509_Store.Search_Func):
- def match(self, cert):
- return ("PythonCA" in cert.subject_info("Name"))
+def do_hash(input):
+ pipe = botan.Pipe(botan.Filter("MD5"), botan.Filter("Hex_Encoder"))
-def main():
- cert = botan.X509_Certificate("cert.pem")
+ print pipe
+ pipe.start_msg()
+ pipe.write(input)
+ pipe.end_msg()
- stor = botan.X509_Store()
- stor.add_cert(botan.X509_Certificate("cert.pem"), True)
- stor.add_cert(botan.X509_Certificate("cert2.pem"))
- stor.add_cert(botan.X509_Certificate("cert.crt"))
- matcher = FindDOD()
- certs = stor.get_certs(matcher)
+ return pipe.read_all()
- for cert in certs:
- print cert.subject_info("Email")
- print cert.subject_key_id()
+def main():
+ print do_hash("foo")
if __name__ == "__main__":
sys.exit(main())