diff options
Diffstat (limited to 'camel/tests/smime/pgp-mime.c')
-rw-r--r-- | camel/tests/smime/pgp-mime.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/camel/tests/smime/pgp-mime.c b/camel/tests/smime/pgp-mime.c index 578baac938..566ab6661f 100644 --- a/camel/tests/smime/pgp-mime.c +++ b/camel/tests/smime/pgp-mime.c @@ -28,6 +28,7 @@ #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> @@ -139,7 +140,11 @@ int main (int argc, char **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 ("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"); |