From 57697eda68a3343c2e54e5f8f3f4ce65a99383f5 Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Wed, 31 Jan 2018 14:07:51 +0100 Subject: trust: Filter out duplicate extensions The trust policy module keeps all the objects in the database, while PKIX doesn't allow multiple extensions identified by the same OID can be attached to a certificate. Add a check to C_FindObjects to exclude any duplicates and only return the first matching object. It would be better if the module rejects such duplicates when loading, but it would make startup slower. https://bugzilla.redhat.com/show_bug.cgi?id=1141241 --- trust/test-token.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'trust/test-token.c') diff --git a/trust/test-token.c b/trust/test-token.c index 3e7d735..0206bc1 100644 --- a/trust/test-token.c +++ b/trust/test-token.c @@ -102,7 +102,7 @@ test_token_load (void *path) int count; count = p11_token_load (test.token); - assert_num_eq (6, count); + assert_num_eq (8, count); /* A certificate and trust object for each parsed object */ index = p11_token_index (test.token); -- cgit v1.1