From a2a3782efb386f18689faf35a069c4da1085e87d Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Tue, 26 Apr 2011 16:45:19 -0400 Subject: Require an imported certificate's issuer to match our issuer. The goal is to not import foreign certificates. This caused a bunch of tests to fail because we had a hardcoded server certificate. Instead a developer will need to run make-testcert to create a server certificate generated by the local CA to test against. ticket 1134 --- tests/test_xmlrpc/xmlrpc_test.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/test_xmlrpc/xmlrpc_test.py') diff --git a/tests/test_xmlrpc/xmlrpc_test.py b/tests/test_xmlrpc/xmlrpc_test.py index 7543fdee..7b6a7417 100644 --- a/tests/test_xmlrpc/xmlrpc_test.py +++ b/tests/test_xmlrpc/xmlrpc_test.py @@ -44,6 +44,12 @@ fuzzy_netgroupdn = Fuzzy( 'ipauniqueid=[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12},cn=ng,cn=alt,%s' % api.env.basedn ) +# Matches a hash signature, not enforcing length +fuzzy_hash = Fuzzy('^([a-f0-9][a-f0-9]:)+[a-f0-9][a-f0-9]$', type=basestring) + +# Matches a date, like Tue Apr 26 17:45:35 2016 UTC +fuzzy_date = Fuzzy('^[a-zA-Z]{3} [a-zA-Z]{3} \d{2} \d{2}:\d{2}:\d{2} \d{4} UTC$') + try: if not api.Backend.xmlclient.isconnected(): api.Backend.xmlclient.connect(fallback=False) -- cgit