summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorStef Walter <stefw@gnome.org>2013-03-20 09:33:04 +0100
committerStef Walter <stefw@gnome.org>2013-03-20 10:54:00 +0100
commitf45942a4fc3e1c5219e9b5201b82203337ee7280 (patch)
treef83313676d1c8de9dbc48d161e16c13264bc8049 /tools
parent1dc227b4fce16fcc721276925492f4ba4db00b4f (diff)
hash: Add the murmur2 hash and start using it
Add implementation of the murmur2 hash function, and start using it for our dictionaries. Our implementation is incremental like our other hash functions. Also remove p11_oid_hash() which wasn't being used. In addition fix several tests whose success was based on the way that the dictionary hashed. This was a hidden testing bug.
Diffstat (limited to 'tools')
-rw-r--r--tools/tests/files/cacert3-trusted-multiple.pem4
-rw-r--r--tools/tests/files/cacert3-trusted-server-alias.pem (renamed from tools/tests/files/cacert3-trusted-client-server-alias.pem)4
-rw-r--r--tools/tests/test-openssl.c14
-rw-r--r--tools/tests/test.h5
4 files changed, 13 insertions, 14 deletions
diff --git a/tools/tests/files/cacert3-trusted-multiple.pem b/tools/tests/files/cacert3-trusted-multiple.pem
index 5f8071b..e56a58f 100644
--- a/tools/tests/files/cacert3-trusted-multiple.pem
+++ b/tools/tests/files/cacert3-trusted-multiple.pem
@@ -38,8 +38,8 @@ hbNc09+4ufLKxw0BFKxwWMWMjTPUnWajGlCVI/xI4AZDEtnNp4Y5LzZyo4AQ5OHz
0ctbGsDkgJp8E3MGT9ujayQKurMcvEp4u+XjdTilSKeiHq921F73OIZWWonO1sOn
ebJSoMbxhbQljPI/lrMQ2Y1sVzufb4Y6GIIiNsiwkTjbKqGTqoQ/9SdlrnPVyNXT
d+pLncdBu8fA46A/5H2kjXPmEkvfoXNzczqA6NXLji/L6hOn1kGLrPo8idck9U60
-4GGSt/M3mMS+lqO3ijAwMBQGCCsGAQUFBwMCBggrBgEFBQcDAaAKBggrBgEFBQcD
-BAwMQ3VzdG9tIExhYmVs
+4GGSt/M3mMS+lqO3ijAmMAoGCCsGAQUFBwMBoAoGCCsGAQUFBwMEDAxDdXN0b20g
+TGFiZWw=
-----END TRUSTED CERTIFICATE-----
-----BEGIN TRUSTED CERTIFICATE-----
MIIHWTCCBUGgAwIBAgIDCkGKMA0GCSqGSIb3DQEBCwUAMHkxEDAOBgNVBAoTB1Jv
diff --git a/tools/tests/files/cacert3-trusted-client-server-alias.pem b/tools/tests/files/cacert3-trusted-server-alias.pem
index c767eff..55593ec 100644
--- a/tools/tests/files/cacert3-trusted-client-server-alias.pem
+++ b/tools/tests/files/cacert3-trusted-server-alias.pem
@@ -38,6 +38,6 @@ hbNc09+4ufLKxw0BFKxwWMWMjTPUnWajGlCVI/xI4AZDEtnNp4Y5LzZyo4AQ5OHz
0ctbGsDkgJp8E3MGT9ujayQKurMcvEp4u+XjdTilSKeiHq921F73OIZWWonO1sOn
ebJSoMbxhbQljPI/lrMQ2Y1sVzufb4Y6GIIiNsiwkTjbKqGTqoQ/9SdlrnPVyNXT
d+pLncdBu8fA46A/5H2kjXPmEkvfoXNzczqA6NXLji/L6hOn1kGLrPo8idck9U60
-4GGSt/M3mMS+lqO3ijAwMBQGCCsGAQUFBwMCBggrBgEFBQcDAaAKBggrBgEFBQcD
-BAwMQ3VzdG9tIExhYmVs
+4GGSt/M3mMS+lqO3ijAmMAoGCCsGAQUFBwMBoAoGCCsGAQUFBwMEDAxDdXN0b20g
+TGFiZWw=
-----END TRUSTED CERTIFICATE-----
diff --git a/tools/tests/test-openssl.c b/tools/tests/test-openssl.c
index 4c39b07..dc68c19 100644
--- a/tools/tests/test-openssl.c
+++ b/tools/tests/test-openssl.c
@@ -114,10 +114,10 @@ static CK_ATTRIBUTE cacert3_authority_attrs[] = {
{ CKA_INVALID },
};
-static CK_ATTRIBUTE extension_eku_client_server[] = {
+static CK_ATTRIBUTE extension_eku_server[] = {
{ CKA_CLASS, &extension_class, sizeof (extension_class) },
{ CKA_OBJECT_ID, (void *)P11_OID_EXTENDED_KEY_USAGE, sizeof (P11_OID_EXTENDED_KEY_USAGE) },
- { CKA_VALUE, (void *)test_eku_client_and_server, sizeof (test_eku_client_and_server) },
+ { CKA_VALUE, (void *)test_eku_server, sizeof (test_eku_server) },
{ CKA_INVALID },
};
@@ -167,7 +167,7 @@ test_file (CuTest *tc)
setup (tc);
setup_objects (cacert3_authority_attrs,
- extension_eku_client_server,
+ extension_eku_server,
extension_reject_email,
NULL);
@@ -182,7 +182,7 @@ test_file (CuTest *tc)
CuAssertIntEquals (tc, true, ret);
test_check_file (tc, test.directory, "extract.pem",
- SRCDIR "/files/cacert3-trusted-client-server-alias.pem");
+ SRCDIR "/files/cacert3-trusted-server-alias.pem");
teardown (tc);
}
@@ -327,7 +327,7 @@ test_file_multiple (CuTest *tc)
setup (tc);
setup_objects (cacert3_authority_attrs,
- extension_eku_client_server,
+ extension_eku_server,
extension_reject_email,
NULL);
@@ -579,7 +579,7 @@ test_directory (CuTest *tc)
setup (tc);
setup_objects (cacert3_authority_attrs,
- extension_eku_client_server,
+ extension_eku_server,
extension_reject_email,
NULL);
@@ -604,7 +604,7 @@ test_directory (CuTest *tc)
#endif
NULL));
test_check_file (tc, test.directory, "Custom_Label.pem",
- SRCDIR "/files/cacert3-trusted-client-server-alias.pem");
+ SRCDIR "/files/cacert3-trusted-server-alias.pem");
test_check_file (tc, test.directory, "Custom_Label.1.pem",
SRCDIR "/files/cacert3-trusted-alias.pem");
#ifdef OS_UNIX
diff --git a/tools/tests/test.h b/tools/tests/test.h
index 82b8b2c..de2bdc1 100644
--- a/tools/tests/test.h
+++ b/tools/tests/test.h
@@ -193,9 +193,8 @@ static const char test_eku_server_and_client[] = {
0x01, 0x05, 0x05, 0x07, 0x03, 0x02,
};
-static const char test_eku_client_and_server[] = {
- 0x30, 0x14, 0x06, 0x08, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, 0x03, 0x02, 0x06, 0x08, 0x2b, 0x06,
- 0x01, 0x05, 0x05, 0x07, 0x03, 0x01,
+static const char test_eku_server[] = {
+ 0x30, 0x0a, 0x06, 0x08, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, 0x03, 0x01,
};
static const char test_eku_email[] = {