root/openpgpsdk/trunk/tests/tests.h

Revision 485 (checked in by rachel, 6 years ago)

RSA encryption produces packets which can be decrypted by GPG.
MDC error still to fix.
Some refactoring to re-use common code in tests.

Line 
1 #ifndef __TESTS__
2 #define __TESTS_
3
4 #include <assert.h>
5 #include <stdio.h>
6 #include <string.h>
7 #include <stdlib.h>
8 #include <unistd.h>
9 #include <fcntl.h>
10 #include <sys/stat.h>
11 #include <sys/types.h>
12
13 #include <openpgpsdk/memory.h>
14 #include <openpgpsdk/create.h>
15
16 int mktmpdir();
17 extern char dir[];
18 void create_testtext(const char *text, char *buf, const int maxlen);
19 void create_testdata(const char *text, unsigned char *buf, const int maxlen);
20 void create_testfile(const char *name);
21 #define MAXBUF 128
22
23 ops_parse_cb_return_t
24 callback_general(const ops_parser_content_t *content_,ops_parse_cb_info_t *cbinfo);
25 ops_parse_cb_return_t
26 callback_cmd_get_secret_key(const ops_parser_content_t *content_,ops_parse_cb_info_t *cbinfo);
27 ops_parse_cb_return_t
28 callback_cmd_get_secret_key_passphrase(const ops_parser_content_t *content_,ops_parse_cb_info_t *cbinfo);
29 ops_parse_cb_return_t
30 callback_literal_data(const ops_parser_content_t *content_,ops_parse_cb_info_t *cbinfo);
31
32 void reset_vars();
33
34 ops_keyring_t pub_keyring;
35 ops_keyring_t sec_keyring;
36 unsigned char* literal_data;
37 size_t sz_literal_data;
38 char* alpha_user_id;
39 #endif
40
Note: See TracBrowser for help on using the browser.