| 1 |
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ |
| 2 |
/* test-secret-fields.c: Test secret fields |
| 3 |
|
| 4 |
Copyright (C) 2009 Stefan Walter |
| 5 |
|
| 6 |
The Gnome Keyring Library is free software; you can redistribute it and/or |
| 7 |
modify it under the terms of the GNU Library General Public License as |
| 8 |
published by the Free Software Foundation; either version 2 of the |
| 9 |
License, or (at your option) any later version. |
| 10 |
|
| 11 |
The Gnome Keyring Library is distributed in the hope that it will be useful, |
| 12 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 |
Library General Public License for more details. |
| 15 |
|
| 16 |
You should have received a copy of the GNU Library General Public |
| 17 |
License along with the Gnome Library; see the file COPYING.LIB. If not, |
| 18 |
<http://www.gnu.org/licenses/>. |
| 19 |
|
| 20 |
Author: Stef Walter <[email protected]> |
| 21 |
*/ |
| 22 |
|
| 23 |
#include "config.h" |
| 24 |
|
| 25 |
#include "secret-store/gkm-secret-fields.h" |
| 26 |
|
| 27 |
#include "pkcs11/pkcs11i.h" |
| 28 |
|
| 29 |
#include <glib.h> |
| 30 |
|
| 31 |
#include <stdlib.h> |
| 32 |
#include <stdio.h> |
| 33 |
#include <string.h> |
| 34 |
|
| 35 |
static void |
| 36 |
test_new (void) |
| 37 |
{ |
| 38 |
GHashTable *fields = gkm_secret_fields_new (); |
| 39 |
g_hash_table_unref (fields); |
| 40 |
} |
| 41 |
|
| 42 |
static void |
| 43 |
test_boxed (void) |
| 44 |
{ |
| 45 |
GType boxed = gkm_secret_fields_boxed_type (); |
| 46 |
GType check = gkm_secret_fields_boxed_type (); |
| 47 |
g_assert (boxed == check); |
| 48 |
} |
| 49 |
|
| 50 |
static void |
| 51 |
test_add_get_values (void) |
| 52 |
{ |
| 53 |
GHashTable *fields = gkm_secret_fields_new (); |
| 54 |
const gchar *value; |
| 55 |
|
| 56 |
gkm_secret_fields_add (fields, "one", "value1"); |
| 57 |
gkm_secret_fields_take (fields, g_strdup ("two"), g_strdup ("value2")); |
| 58 |
gkm_secret_fields_add (fields, "three", NULL); |
| 59 |
|
| 60 |
value = gkm_secret_fields_get (fields, "one"); |
| 61 |
g_assert_cmpstr (value, ==, "value1"); |
| 62 |
|
| 63 |
value = gkm_secret_fields_get (fields, "two"); |
| 64 |
g_assert_cmpstr (value, ==, "value2"); |
| 65 |
|
| 66 |
value = gkm_secret_fields_get (fields, "three"); |
| 67 |
g_assert_cmpstr (value, ==, ""); |
| 68 |
|
| 69 |
g_hash_table_unref (fields); |
| 70 |
} |
| 71 |
|
| 72 |
static void |
| 73 |
test_parse (void) |
| 74 |
{ |
| 75 |
CK_ATTRIBUTE attr = { CKA_G_FIELDS, "one\0value1\0two\0value2\0three\0value3\0", 35 }; |
| 76 |
gchar *schema_name; |
| 77 |
GHashTable *fields; |
| 78 |
const gchar *value; |
| 79 |
CK_RV rv; |
| 80 |
|
| 81 |
rv = gkm_secret_fields_parse (&attr, &fields, &schema_name); |
| 82 |
g_assert (rv == CKR_OK); |
| 83 |
|
| 84 |
g_assert_cmpuint (g_hash_table_size (fields), ==, 3); |
| 85 |
value = g_hash_table_lookup (fields, "one"); |
| 86 |
g_assert_cmpstr (value, ==, "value1"); |
| 87 |
value = g_hash_table_lookup (fields, "two"); |
| 88 |
g_assert_cmpstr (value, ==, "value2"); |
| 89 |
value = g_hash_table_lookup (fields, "three"); |
| 90 |
g_assert_cmpstr (value, ==, "value3"); |
| 91 |
|
| 92 |
g_assert (schema_name == NULL); |
| 93 |
|
| 94 |
g_hash_table_unref (fields); |
| 95 |
} |
| 96 |
|
| 97 |
static void |
| 98 |
test_parse_schema (void) |
| 99 |
{ |
| 100 |
CK_ATTRIBUTE attr = { CKA_G_FIELDS, "one\0value1\0two\0valu\0xdg:schema\0xxx\0", 35 }; |
| 101 |
gchar *schema_name; |
| 102 |
GHashTable *fields; |
| 103 |
const gchar *value; |
| 104 |
CK_RV rv; |
| 105 |
|
| 106 |
rv = gkm_secret_fields_parse (&attr, &fields, &schema_name); |
| 107 |
g_assert (rv == CKR_OK); |
| 108 |
|
| 109 |
g_assert_cmpuint (g_hash_table_size (fields), ==, 3); |
| 110 |
value = g_hash_table_lookup (fields, "one"); |
| 111 |
g_assert_cmpstr (value, ==, "value1"); |
| 112 |
value = g_hash_table_lookup (fields, "two"); |
| 113 |
g_assert_cmpstr (value, ==, "valu"); |
| 114 |
value = g_hash_table_lookup (fields, GKM_SECRET_FIELD_SCHEMA); |
| 115 |
g_assert_cmpstr (value, ==, "xxx"); |
| 116 |
|
| 117 |
g_assert_cmpstr (schema_name, ==, "xxx"); |
| 118 |
|
| 119 |
g_free (schema_name); |
| 120 |
g_hash_table_unref (fields); |
| 121 |
} |
| 122 |
|
| 123 |
static void |
| 124 |
test_parse_empty (void) |
| 125 |
{ |
| 126 |
CK_ATTRIBUTE attr = { CKA_G_FIELDS, "", 0 }; |
| 127 |
GHashTable *fields; |
| 128 |
CK_RV rv; |
| 129 |
|
| 130 |
rv = gkm_secret_fields_parse (&attr, &fields, NULL); |
| 131 |
g_assert (rv == CKR_OK); |
| 132 |
|
| 133 |
g_assert_cmpuint (g_hash_table_size (fields), == , 0); |
| 134 |
|
| 135 |
g_hash_table_unref (fields); |
| 136 |
} |
| 137 |
|
| 138 |
static void |
| 139 |
test_parse_null_invalid (void) |
| 140 |
{ |
| 141 |
CK_ATTRIBUTE attr = { CKA_G_FIELDS, NULL, 5 }; |
| 142 |
GHashTable *fields; |
| 143 |
CK_RV rv; |
| 144 |
|
| 145 |
rv = gkm_secret_fields_parse (&attr, &fields, NULL); |
| 146 |
g_assert (rv == CKR_ATTRIBUTE_VALUE_INVALID); |
| 147 |
} |
| 148 |
|
| 149 |
static void |
| 150 |
test_parse_missing_value (void) |
| 151 |
{ |
| 152 |
CK_ATTRIBUTE attr = { CKA_G_FIELDS, "one", 3 }; |
| 153 |
GHashTable *fields; |
| 154 |
CK_RV rv; |
| 155 |
|
| 156 |
rv = gkm_secret_fields_parse (&attr, &fields, NULL); |
| 157 |
g_assert (rv == CKR_ATTRIBUTE_VALUE_INVALID); |
| 158 |
} |
| 159 |
|
| 160 |
static void |
| 161 |
test_parse_missing_terminator (void) |
| 162 |
{ |
| 163 |
CK_ATTRIBUTE attr = { CKA_G_FIELDS, "one\0value", 9 }; |
| 164 |
GHashTable *fields; |
| 165 |
CK_RV rv; |
| 166 |
|
| 167 |
rv = gkm_secret_fields_parse (&attr, &fields, NULL); |
| 168 |
g_assert (rv == CKR_ATTRIBUTE_VALUE_INVALID); |
| 169 |
} |
| 170 |
|
| 171 |
static void |
| 172 |
test_parse_not_utf8 (void) |
| 173 |
{ |
| 174 |
CK_ATTRIBUTE attr = { CKA_G_FIELDS, "one\0not\234utf8\0", 13 }; |
| 175 |
GHashTable *fields; |
| 176 |
CK_RV rv; |
| 177 |
|
| 178 |
rv = gkm_secret_fields_parse (&attr, &fields, NULL); |
| 179 |
g_assert (rv == CKR_ATTRIBUTE_VALUE_INVALID); |
| 180 |
} |
| 181 |
|
| 182 |
static void |
| 183 |
test_serialize (void) |
| 184 |
{ |
| 185 |
gchar buffer[32]; |
| 186 |
CK_ATTRIBUTE attr = { CKA_G_FIELDS, buffer, 32 }; |
| 187 |
GHashTable *fields; |
| 188 |
CK_RV rv; |
| 189 |
|
| 190 |
fields = gkm_secret_fields_new (); |
| 191 |
gkm_secret_fields_add (fields, "one", "value1"); |
| 192 |
|
| 193 |
rv = gkm_secret_fields_serialize (&attr, fields, NULL); |
| 194 |
g_assert (rv == CKR_OK); |
| 195 |
g_assert (attr.ulValueLen == 11); |
| 196 |
g_assert (memcmp (buffer, "one\0value1\0", 11) == 0); |
| 197 |
|
| 198 |
g_hash_table_unref (fields); |
| 199 |
} |
| 200 |
|
| 201 |
static void |
| 202 |
test_serialize_schema (void) |
| 203 |
{ |
| 204 |
gchar buffer[32]; |
| 205 |
CK_ATTRIBUTE attr = { CKA_G_FIELDS, buffer, 32 }; |
| 206 |
GHashTable *fields; |
| 207 |
CK_RV rv; |
| 208 |
|
| 209 |
fields = gkm_secret_fields_new (); |
| 210 |
gkm_secret_fields_add (fields, "one", "value1"); |
| 211 |
|
| 212 |
rv = gkm_secret_fields_serialize (&attr, fields, "xxx"); |
| 213 |
g_assert (rv == CKR_OK); |
| 214 |
g_assert_cmpint (attr.ulValueLen, ==, 26); |
| 215 |
g_assert (memcmp (buffer, "one\0value1\0xdg:schema\0xxx\0", 26) == 0); |
| 216 |
|
| 217 |
g_hash_table_unref (fields); |
| 218 |
} |
| 219 |
|
| 220 |
static void |
| 221 |
test_serialize_schema_already (void) |
| 222 |
{ |
| 223 |
gchar buffer[32]; |
| 224 |
CK_ATTRIBUTE attr = { CKA_G_FIELDS, buffer, 32 }; |
| 225 |
GHashTable *fields; |
| 226 |
CK_RV rv; |
| 227 |
|
| 228 |
fields = gkm_secret_fields_new (); |
| 229 |
gkm_secret_fields_add (fields, GKM_SECRET_FIELD_SCHEMA, "yyy"); |
| 230 |
|
| 231 |
rv = gkm_secret_fields_serialize (&attr, fields, "xxx"); |
| 232 |
g_assert (rv == CKR_OK); |
| 233 |
g_assert (attr.ulValueLen == 15); |
| 234 |
g_assert (memcmp (buffer, "xdg:schema\0yyy\0", 15) == 0); |
| 235 |
|
| 236 |
g_hash_table_unref (fields); |
| 237 |
} |
| 238 |
|
| 239 |
static void |
| 240 |
test_serialize_length (void) |
| 241 |
{ |
| 242 |
CK_ATTRIBUTE attr = { CKA_G_FIELDS, NULL, 0 }; |
| 243 |
GHashTable *fields; |
| 244 |
CK_RV rv; |
| 245 |
|
| 246 |
fields = gkm_secret_fields_new (); |
| 247 |
gkm_secret_fields_add (fields, "one", "value1"); |
| 248 |
|
| 249 |
rv = gkm_secret_fields_serialize (&attr, fields, NULL); |
| 250 |
g_assert (rv == CKR_OK); |
| 251 |
g_assert (attr.ulValueLen == 11); |
| 252 |
|
| 253 |
g_hash_table_unref (fields); |
| 254 |
} |
| 255 |
|
| 256 |
static void |
| 257 |
test_add_get_compat_uint32 (void) |
| 258 |
{ |
| 259 |
GHashTable *fields; |
| 260 |
gboolean ret; |
| 261 |
guint32 value; |
| 262 |
|
| 263 |
fields = gkm_secret_fields_new (); |
| 264 |
gkm_secret_fields_add_compat_uint32 (fields, "field", 992); |
| 265 |
|
| 266 |
ret = gkm_secret_fields_get_compat_uint32 (fields, "field", &value); |
| 267 |
g_assert (ret == TRUE); |
| 268 |
g_assert_cmpuint (value, ==, 992); |
| 269 |
|
| 270 |
g_hash_table_unref (fields); |
| 271 |
} |
| 272 |
|
| 273 |
static void |
| 274 |
test_get_compat_uint32_fail (void) |
| 275 |
{ |
| 276 |
GHashTable *fields; |
| 277 |
gboolean ret; |
| 278 |
guint32 value; |
| 279 |
|
| 280 |
fields = gkm_secret_fields_new (); |
| 281 |
gkm_secret_fields_add (fields, "test", "value"); |
| 282 |
|
| 283 |
ret = gkm_secret_fields_get_compat_uint32 (fields, "test", &value); |
| 284 |
g_assert (ret == FALSE); |
| 285 |
|
| 286 |
g_hash_table_unref (fields); |
| 287 |
} |
| 288 |
|
| 289 |
static void |
| 290 |
test_get_compat_hashed_string (void) |
| 291 |
{ |
| 292 |
GHashTable *fields; |
| 293 |
gboolean ret; |
| 294 |
gchar *value; |
| 295 |
|
| 296 |
fields = gkm_secret_fields_new (); |
| 297 |
gkm_secret_fields_add (fields, "test", "value"); |
| 298 |
|
| 299 |
ret = gkm_secret_fields_get_compat_hashed_string (fields, "test", &value); |
| 300 |
g_assert (ret == TRUE); /* Must be the same as the old gnome-keyring code */ |
| 301 |
g_assert_cmpstr (value, ==, "2063c1608d6e0baf80249c42e2be5804"); |
| 302 |
g_free (value); |
| 303 |
|
| 304 |
g_hash_table_unref (fields); |
| 305 |
} |
| 306 |
|
| 307 |
static void |
| 308 |
test_get_compat_hashed_already (void) |
| 309 |
{ |
| 310 |
GHashTable *fields; |
| 311 |
gboolean ret; |
| 312 |
gchar *value; |
| 313 |
|
| 314 |
fields = gkm_secret_fields_new (); |
| 315 |
gkm_secret_fields_add_compat_hashed_string (fields, "test", "e991664529cd0caeb6e9fce8fac3d611"); |
| 316 |
|
| 317 |
ret = gkm_secret_fields_get_compat_hashed_string (fields, "test", &value); |
| 318 |
g_assert (ret == TRUE); /* What went in comes out */ |
| 319 |
g_assert_cmpstr (value, ==, "e991664529cd0caeb6e9fce8fac3d611"); |
| 320 |
g_free (value); |
| 321 |
|
| 322 |
g_hash_table_unref (fields); |
| 323 |
} |
| 324 |
|
| 325 |
static void |
| 326 |
test_get_compat_hashed_uint32 (void) |
| 327 |
{ |
| 328 |
GHashTable *fields; |
| 329 |
gboolean ret; |
| 330 |
guint32 value; |
| 331 |
guint32 val = 992; |
| 332 |
|
| 333 |
fields = gkm_secret_fields_new (); |
| 334 |
gkm_secret_fields_add_compat_uint32 (fields, "test", val); |
| 335 |
|
| 336 |
ret = gkm_secret_fields_get_compat_hashed_uint32 (fields, "test", &value); |
| 337 |
g_assert (ret == TRUE); /* Must be the same as the old gnome-keyring code */ |
| 338 |
g_assert_cmpuint (value, ==, 0x18273645 ^ val ^ (val << 16 | val >> 16)); |
| 339 |
|
| 340 |
g_hash_table_unref (fields); |
| 341 |
} |
| 342 |
|
| 343 |
static void |
| 344 |
test_get_compat_hashed_uint32_already (void) |
| 345 |
{ |
| 346 |
GHashTable *fields; |
| 347 |
gboolean ret; |
| 348 |
guint32 value; |
| 349 |
guint32 val = 0x1bc735a5; |
| 350 |
|
| 351 |
fields = gkm_secret_fields_new (); |
| 352 |
gkm_secret_fields_add_compat_hashed_uint32 (fields, "test", val); |
| 353 |
|
| 354 |
ret = gkm_secret_fields_get_compat_hashed_uint32 (fields, "test", &value); |
| 355 |
g_assert (ret == TRUE); /* What went in comes out */ |
| 356 |
g_assert_cmpuint (value, ==, val); |
| 357 |
|
| 358 |
g_hash_table_unref (fields); |
| 359 |
} |
| 360 |
|
| 361 |
static void |
| 362 |
test_get_names (void) |
| 363 |
{ |
| 364 |
GHashTable *fields; |
| 365 |
GList *names, *l; |
| 366 |
|
| 367 |
fields = gkm_secret_fields_new (); |
| 368 |
|
| 369 |
gkm_secret_fields_add (fields, "one", "11111"); |
| 370 |
gkm_secret_fields_add_compat_uint32 (fields, "two", 2); |
| 371 |
gkm_secret_fields_add_compat_hashed_string (fields, "test", "2063c1608d6e0baf80249c42e2be5804"); |
| 372 |
|
| 373 |
names = gkm_secret_fields_get_names (fields); |
| 374 |
g_assert_cmpuint (g_list_length (names), ==, 3); |
| 375 |
|
| 376 |
for (l = names; l; l = g_list_next (l)) { |
| 377 |
g_assert (l->data); |
| 378 |
if (!g_str_equal (l->data, "one") && |
| 379 |
!g_str_equal (l->data, "two") && |
| 380 |
!g_str_equal (l->data, "test")) |
| 381 |
g_assert_not_reached (); |
| 382 |
} |
| 383 |
|
| 384 |
g_list_free (names); |
| 385 |
g_hash_table_unref (fields); |
| 386 |
} |
| 387 |
|
| 388 |
static void |
| 389 |
test_match (void) |
| 390 |
{ |
| 391 |
GHashTable *haystack; |
| 392 |
GHashTable *needle; |
| 393 |
gboolean ret; |
| 394 |
|
| 395 |
haystack = gkm_secret_fields_new (); |
| 396 |
gkm_secret_fields_add (haystack, "one", "11111"); |
| 397 |
gkm_secret_fields_add_compat_uint32 (haystack, "two", 2); |
| 398 |
gkm_secret_fields_add_compat_hashed_string (haystack, "test", "2063c1608d6e0baf80249c42e2be5804"); /* Hashed 'value' */ |
| 399 |
gkm_secret_fields_add_compat_hashed_uint32 (haystack, "number", 0x1bc735a5); /* Hashed 992 */ |
| 400 |
gkm_secret_fields_add (haystack, "extra", "an extra value"); |
| 401 |
|
| 402 |
needle = gkm_secret_fields_new (); |
| 403 |
gkm_secret_fields_add (needle, "one", "11111"); |
| 404 |
gkm_secret_fields_add (needle, "two", "2"); |
| 405 |
gkm_secret_fields_add (needle, "test", "value"); |
| 406 |
gkm_secret_fields_add (needle, "number", "992"); |
| 407 |
|
| 408 |
ret = gkm_secret_fields_match (haystack, needle); |
| 409 |
g_assert (ret == TRUE); |
| 410 |
|
| 411 |
g_hash_table_unref (haystack); |
| 412 |
g_hash_table_unref (needle); |
| 413 |
} |
| 414 |
|
| 415 |
static void |
| 416 |
test_match_mismatch_value (void) |
| 417 |
{ |
| 418 |
GHashTable *haystack; |
| 419 |
GHashTable *needle; |
| 420 |
gboolean ret; |
| 421 |
|
| 422 |
haystack = gkm_secret_fields_new (); |
| 423 |
gkm_secret_fields_add (haystack, "field", "value"); |
| 424 |
|
| 425 |
needle = gkm_secret_fields_new (); |
| 426 |
gkm_secret_fields_add (needle, "field", "another"); |
| 427 |
|
| 428 |
ret = gkm_secret_fields_match (haystack, needle); |
| 429 |
g_assert (ret == FALSE); |
| 430 |
|
| 431 |
g_hash_table_unref (haystack); |
| 432 |
g_hash_table_unref (needle); |
| 433 |
} |
| 434 |
|
| 435 |
static void |
| 436 |
test_match_mismatch_field (void) |
| 437 |
{ |
| 438 |
GHashTable *haystack; |
| 439 |
GHashTable *needle; |
| 440 |
gboolean ret; |
| 441 |
|
| 442 |
haystack = gkm_secret_fields_new (); |
| 443 |
gkm_secret_fields_add (haystack, "test", "value"); |
| 444 |
|
| 445 |
needle = gkm_secret_fields_new (); |
| 446 |
gkm_secret_fields_add (needle, "field", "value"); |
| 447 |
|
| 448 |
ret = gkm_secret_fields_match (haystack, needle); |
| 449 |
g_assert (ret == FALSE); |
| 450 |
|
| 451 |
g_hash_table_unref (haystack); |
| 452 |
g_hash_table_unref (needle); |
| 453 |
} |
| 454 |
|
| 455 |
static void |
| 456 |
test_match_wrong_hashed (void) |
| 457 |
{ |
| 458 |
GHashTable *haystack; |
| 459 |
GHashTable *needle; |
| 460 |
gboolean ret; |
| 461 |
|
| 462 |
haystack = gkm_secret_fields_new (); |
| 463 |
gkm_secret_fields_add_compat_hashed_uint32 (haystack, "number", 0x1bc735a5); /* Hashed 992 */ |
| 464 |
|
| 465 |
needle = gkm_secret_fields_new (); |
| 466 |
gkm_secret_fields_add (needle, "number", "1000"); |
| 467 |
|
| 468 |
ret = gkm_secret_fields_match (haystack, needle); |
| 469 |
g_assert (ret == FALSE); |
| 470 |
|
| 471 |
g_hash_table_unref (haystack); |
| 472 |
g_hash_table_unref (needle); |
| 473 |
} |
| 474 |
|
| 475 |
int |
| 476 |
main (int argc, char **argv) |
| 477 |
{ |
| 478 |
#if !GLIB_CHECK_VERSION(2,35,0) |
| 479 |
g_type_init (); |
| 480 |
#endif |
| 481 |
g_test_init (&argc, &argv, NULL); |
| 482 |
|
| 483 |
g_test_add_func ("/secret-store/fields/new", test_new); |
| 484 |
g_test_add_func ("/secret-store/fields/boxed", test_boxed); |
| 485 |
g_test_add_func ("/secret-store/fields/add_get_values", test_add_get_values); |
| 486 |
g_test_add_func ("/secret-store/fields/parse", test_parse); |
| 487 |
g_test_add_func ("/secret-store/fields/parse_schema", test_parse_schema); |
| 488 |
g_test_add_func ("/secret-store/fields/parse_empty", test_parse_empty); |
| 489 |
g_test_add_func ("/secret-store/fields/parse_null_invalid", test_parse_null_invalid); |
| 490 |
g_test_add_func ("/secret-store/fields/parse_missing_value", test_parse_missing_value); |
| 491 |
g_test_add_func ("/secret-store/fields/parse_missing_terminator", test_parse_missing_terminator); |
| 492 |
g_test_add_func ("/secret-store/fields/parse_not_utf8", test_parse_not_utf8); |
| 493 |
g_test_add_func ("/secret-store/fields/serialize", test_serialize); |
| 494 |
g_test_add_func ("/secret-store/fields/serialize_schema", test_serialize_schema); |
| 495 |
g_test_add_func ("/secret-store/fields/serialize_schema_already", test_serialize_schema_already); |
| 496 |
g_test_add_func ("/secret-store/fields/serialize_length", test_serialize_length); |
| 497 |
g_test_add_func ("/secret-store/fields/add_get_compat_uint32", test_add_get_compat_uint32); |
| 498 |
g_test_add_func ("/secret-store/fields/get_compat_uint32_fail", test_get_compat_uint32_fail); |
| 499 |
g_test_add_func ("/secret-store/fields/get_compat_hashed_string", test_get_compat_hashed_string); |
| 500 |
g_test_add_func ("/secret-store/fields/get_compat_hashed_already", test_get_compat_hashed_already); |
| 501 |
g_test_add_func ("/secret-store/fields/get_compat_hashed_uint32", test_get_compat_hashed_uint32); |
| 502 |
g_test_add_func ("/secret-store/fields/get_compat_hashed_uint32_already", test_get_compat_hashed_uint32_already); |
| 503 |
g_test_add_func ("/secret-store/fields/get_names", test_get_names); |
| 504 |
g_test_add_func ("/secret-store/fields/match", test_match); |
| 505 |
g_test_add_func ("/secret-store/fields/match_mismatch_value", test_match_mismatch_value); |
| 506 |
g_test_add_func ("/secret-store/fields/match_mismatch_field", test_match_mismatch_field); |
| 507 |
g_test_add_func ("/secret-store/fields/match_wrong_hashed", test_match_wrong_hashed); |
| 508 |
|
| 509 |
return g_test_run (); |
| 510 |
} |