#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <sys/wait.h>
#include <camel/camel-gpg-context.h>
#include <camel/camel-multipart-signed.h>
#include <camel/camel-multipart-encrypted.h>
setenv ("GNUPGHOME", "/tmp/camel-test/.gnupg", 1);
/* import the gpg keys */
- system ("gpg > /dev/null 2>&1"); /* creates gpg directory and stuff */
+ if ((ret = system ("gpg > /dev/null 2>&1")) == -1)
+ return 77;
+ else if (WEXITSTATUS (ret) == 127)
+ return 127;
+
system ("gpg --import camel-test.gpg.pub > /dev/null 2>&1");
system ("gpg --import camel-test.gpg.sec > /dev/null 2>&1");
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <sys/wait.h>
#include <camel/camel-gpg-context.h>
#include <camel/camel-stream-mem.h>
GPtrArray *recipients;
GByteArray *buf;
char *before, *after;
+ int ret;
camel_test_init (argc, argv);
setenv ("GNUPGHOME", "/tmp/camel-test/.gnupg", 1);
/* import the gpg keys */
- system ("gpg > /dev/null 2>&1"); /* creates gpg directory and stuff */
+ if ((ret = system ("gpgfoo > /dev/null 2>&1")) == -1)
+ return 77;
+ else if (WEXITSTATUS (ret) == 127)
+ return 77;
+
system ("gpg --import ../data/camel-test.gpg.pub > /dev/null 2>&1");
system ("gpg --import ../data/camel-test.gpg.sec > /dev/null 2>&1");