diff options
Diffstat (limited to 'smime/tests')
-rw-r--r-- | smime/tests/Makefile.am | 1 | ||||
-rw-r--r-- | smime/tests/import-cert.c | 12 |
2 files changed, 4 insertions, 9 deletions
diff --git a/smime/tests/Makefile.am b/smime/tests/Makefile.am index c07d048824..0fd1064b00 100644 --- a/smime/tests/Makefile.am +++ b/smime/tests/Makefile.am @@ -7,6 +7,7 @@ INCLUDES= \ TEST_LIBS= \ $(top_builddir)/smime/lib/libessmime.la \ + -L/home/toshok/src/mozilla/mozilla/dist/lib \ $(CERT_UI_LIBS) diff --git a/smime/tests/import-cert.c b/smime/tests/import-cert.c index 63eb5a63f3..76e8dc6ccd 100644 --- a/smime/tests/import-cert.c +++ b/smime/tests/import-cert.c @@ -1,4 +1,5 @@ +#include <libgnomeui/gnome-ui-init.h> #include "e-cert-db.h" int @@ -6,19 +7,12 @@ main (int argc, char **argv) { ECertDB *db; - g_type_init (); - - if (SECSuccess != NSS_InitReadWrite ("/home/toshok/.mozilla/default/xuvq7jx3.slt")) { - g_error ("NSS_InitReadWrite failed"); - } + gnome_program_init (); - STAN_LoadDefaultNSS3TrustDomain(); + g_type_init (); db = e_cert_db_peek (); - printf ("default_trust_domain = %p\n", STAN_GetDefaultTrustDomain()); - printf ("default_crypto_context = %p\n", STAN_GetDefaultCryptoContext()); - if (!e_cert_db_import_certs_from_file (db, "ca.crt", E_CERT_CA, NULL /* XXX */)) { g_warning ("CA cert import failed"); } |