]> granicus.if.org Git - p11-kit/commitdiff
Fix distcheck and documentation
authorStef Walter <stefw@gnome.org>
Fri, 15 Mar 2013 19:50:17 +0000 (20:50 +0100)
committerStef Walter <stefw@gnome.org>
Fri, 15 Mar 2013 19:50:45 +0000 (20:50 +0100)
common/tests/test-dict.c
doc/manual/p11-kit-devel.xml
trust/tests/Makefile.am
trust/tests/test-module.c

index 316d9f567466ec05cb2a5a8be549dfa48839a8f2..fc40b07436000818d7e5fa29b08adda81dba0d07 100644 (file)
@@ -144,12 +144,12 @@ test_iterate (CuTest *tc)
 }
 
 static int
-compar_pointers (const void *one,
-                 const void *two)
+compar_strings (const void *one,
+                const void *two)
 {
        char **p1 = (char **)one;
        char **p2 = (char **)two;
-       return *p1 - *p2;
+       return strcmp (*p1, *p2);
 }
 
 static void
@@ -157,14 +157,14 @@ test_iterate_remove (CuTest *tc)
 {
        p11_dict *map;
        p11_dictiter iter;
-       char *keys[] = { "one", "two", "three" };
-       char *values[] = { "four", "eight", "twelve" };
+       char *keys[] = { "111", "222", "333" };
+       char *values[] = { "444", "555", "666" };
        void *okeys[3];
        void *ovalues[3];
        bool ret;
        int i;
 
-       map = p11_dict_new (p11_dict_direct_hash, p11_dict_direct_equal, NULL, NULL);
+       map = p11_dict_new (p11_dict_str_hash, p11_dict_str_equal, NULL, NULL);
        CuAssertPtrNotNull (tc, map);
 
        for (i = 0; i < 3; i++) {
@@ -191,8 +191,8 @@ test_iterate_remove (CuTest *tc)
        CuAssertIntEquals (tc, 2, p11_dict_size (map));
        p11_dict_free (map);
 
-       qsort (okeys, 3, sizeof (void *), compar_pointers);
-       qsort (ovalues, 3, sizeof (void *), compar_pointers);
+       qsort (okeys, 3, sizeof (void *), compar_strings);
+       qsort (ovalues, 3, sizeof (void *), compar_strings);
 
        for (i = 0; i < 3; i++) {
                CuAssertStrEquals (tc, keys[i], okeys[i]);
index bbe6c0a434b6ee85590dac98e2da5474c6be71d0..52535d355cdd87638657ad7da7fac84fe9f7f662 100644 (file)
@@ -204,16 +204,11 @@ $ make install
                                        listed in a module config file with a relative path.</para></listitem>
                                </varlistentry>
                                <varlistentry>
-                                       <term><option>--with-system-anchors</option></term>
-                                       <listitem><para>Specify the files or directories to look for system
-                                       certificate anchors. Multiple files and/or directories are specified with
-                                       a <literal>:</literal> in between them.</para></listitem>
-                               </varlistentry>
-                               <varlistentry>
-                                       <term><option>--with-system-certificates</option></term>
-                                       <listitem><para>Specify the files or directories to look for other
-                                       non-anchor system certificates. Multiple files and/or directories are
-                                       specified with a <literal>:</literal> in between them.</para></listitem>
+                                       <term><option>--with-trust-paths</option></term>
+                                       <listitem><para>Specify the files or directories to look for certificate
+                                       anchors and blacklists. Multiple files and/or directories are specified with
+                                       a <literal>:</literal> in between them. The first path has the highest
+                                       priority when searching for certificates.</para></listitem>
                                </varlistentry>
                                <varlistentry>
                                        <term><option>--with-system-config</option></term>
index fa7012090e0f06b9e66b99cd530a2f994061dc7b..a96494854519b6533ddcd9df959db58234a5f694 100644 (file)
@@ -47,7 +47,6 @@ frob_nss_trust_LDADD = \
 TESTS = $(CHECK_PROGS:=$(EXEEXT))
 
 EXTRA_DIST = \
-       anchors \
-       certificates \
+       input \
        files \
        $(NULL)
index 52eafe0e533cc1aea02480fae8e2cfaa52b1320f..45af62ad4d945ac1ac4397948d23faea56b69088 100644 (file)
@@ -148,6 +148,7 @@ test_get_slot_info (CuTest *cu)
        CK_SLOT_INFO info;
        char description[64];
        CK_ULONG count;
+       size_t length;
        CK_RV rv;
        int i;
 
@@ -170,8 +171,10 @@ test_get_slot_info (CuTest *cu)
                CuAssertIntEquals (cu, CKR_OK, rv);
 
                memset (description, ' ', sizeof (description));
-               assert (strlen (paths[i]) <= sizeof (description));
-               memcpy (description, paths[i], strlen (paths[i]));
+               length = strlen(paths[i]);
+               if (length > sizeof (description))
+                       length = sizeof (description);
+               memcpy (description, paths[i], length);
                CuAssertTrue (cu, memcmp (info.slotDescription, description, sizeof (description)) == 0);
        }