root/openpgpsdk/trunk/tests/tests_gpg.c

Revision 523 (checked in by rachel, 5 years ago)

Signature/verification now interoperates with GPG

Line 
1 #include <assert.h>
2 #include <stdio.h>
3 #include <string.h>
4 #include <stdlib.h>
5 #ifndef WIN32
6 #include <unistd.h>
7 #endif
8 #include <sys/stat.h>
9
10 #include "CUnit/Basic.h"
11 #include "openpgpsdk/readerwriter.h"
12 // \todo remove the need for this
13 #include "../src/advanced/parse_local.h"
14
15 #include "tests.h"
16
17 int main()
18     {
19
20     mem_literal_data=ops_memory_new();
21     setup();
22
23     if (CUE_SUCCESS != CU_initialize_registry())
24         return CU_get_error();
25
26     if (NULL == suite_rsa_encrypt_GPGtest())
27         {
28         CU_cleanup_registry();
29         return CU_get_error();
30         }
31
32     if (NULL == suite_rsa_signature_GPGtest())
33         {
34         CU_cleanup_registry();
35         return CU_get_error();
36         }
37
38     if (NULL == suite_rsa_verify_GPGtest())
39         {
40         CU_cleanup_registry();
41         return CU_get_error();
42         }
43
44 #ifdef TODO
45
46     if (NULL == suite_rsa_decrypt_GPGtest())
47         {
48         CU_cleanup_registry();
49         return CU_get_error();
50         }
51
52     if (NULL == suite_rsa_create_key_GPGtest())
53         {
54         CU_cleanup_registry();
55         return CU_get_error();
56         }
57
58     if (NULL == suite_rsa_sign_key_GPGtest())
59         {
60         CU_cleanup_registry();
61         return CU_get_error();
62         }
63
64     if (NULL == suite_rsa_verify_key_GPGtest())
65         {
66         CU_cleanup_registry();
67         return CU_get_error();
68         }
69  #endif
70
71     // Run tests
72     CU_basic_set_mode(CU_BRM_VERBOSE);
73     CU_basic_run_tests();
74     CU_cleanup_registry();
75
76     cleanup();
77
78     return CU_get_error();
79     }
80
81 // EOF
82
Note: See TracBrowser for help on using the browser.