diff options
author | lloyd <[email protected]> | 2006-08-23 03:57:32 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2006-08-23 03:57:32 +0000 |
commit | 8a8e8c6d725c23ab575c04e22603915824466dcf (patch) | |
tree | 9c1ce5749cb67e63669a7abe7ce069a342b6701b /misc/python/test.py | |
parent | 38bb757a31100c6370b3f32ad7683d2b3fc0fc0a (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/test.py')
-rwxr-xr-x | misc/python/test.py | 23 |
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()) |