diff options
Diffstat (limited to 'smime/tests')
-rw-r--r-- | smime/tests/Makefile.am | 9 | ||||
-rw-r--r-- | smime/tests/import-cert.c | 15 |
2 files changed, 18 insertions, 6 deletions
diff --git a/smime/tests/Makefile.am b/smime/tests/Makefile.am index 0fd1064b00..2c0c54a88e 100644 --- a/smime/tests/Makefile.am +++ b/smime/tests/Makefile.am @@ -3,12 +3,15 @@ noinst_PROGRAMS=import-cert INCLUDES= \ -I$(top_srcdir)/smime/lib \ + $(EVOLUTION_ADDRESSBOOK_CFLAGS) \ $(CERT_UI_CFLAGS) TEST_LIBS= \ - $(top_builddir)/smime/lib/libessmime.la \ - -L/home/toshok/src/mozilla/mozilla/dist/lib \ - $(CERT_UI_LIBS) + $(top_builddir)/smime/lib/libessmime.la \ + -L/home/toshok/src/mozilla/mozilla/dist/lib \ + $(CERT_UI_LIBS) \ + $(top_builddir)/e-util/libeutil.la \ + $(GNOME_FULL_LIBS) import_cert_LDADD=$(TEST_LIBS)
\ No newline at end of file diff --git a/smime/tests/import-cert.c b/smime/tests/import-cert.c index 76e8dc6ccd..e30b085317 100644 --- a/smime/tests/import-cert.c +++ b/smime/tests/import-cert.c @@ -1,15 +1,17 @@ +#include <gtk/gtk.h> #include <libgnomeui/gnome-ui-init.h> + #include "e-cert-db.h" +#include "e-pkcs12.h" int main (int argc, char **argv) { ECertDB *db; + EPKCS12 *pkcs12; - gnome_program_init (); - - g_type_init (); + gnome_program_init("import-cert-test", "0.0", LIBGNOMEUI_MODULE, argc, argv, NULL); db = e_cert_db_peek (); @@ -25,5 +27,12 @@ main (int argc, char **argv) g_warning ("server cert import failed"); } + pkcs12 = e_pkcs12_new (); + if (!e_pkcs12_import_from_file (pkcs12, "newcert.p12", NULL /* XXX */)) { + g_warning ("PKCS12 import failed"); + } + e_cert_db_shutdown (); + + return 0; } |