|
Revision 488
(checked in by rachel, 6 years ago)
|
Finally managed to get GPG to produce SE IP packets (secret: don't use --openpgp)
Minor refactoring.
|
| 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 1024 |
|---|
| 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 |
ops_parse_cb_return_t |
|---|
| 32 |
callback_pk_session_key(const ops_parser_content_t *content_,ops_parse_cb_info_t *cbinfo); |
|---|
| 33 |
|
|---|
| 34 |
void reset_vars(); |
|---|
| 35 |
int file_compare(char* file1, char* file2); |
|---|
| 36 |
|
|---|
| 37 |
ops_keyring_t pub_keyring; |
|---|
| 38 |
ops_keyring_t sec_keyring; |
|---|
| 39 |
unsigned char* literal_data; |
|---|
| 40 |
size_t sz_literal_data; |
|---|
| 41 |
char* alpha_user_id; |
|---|
| 42 |
char* bravo_user_id; |
|---|
| 43 |
const ops_key_data_t *decrypter; |
|---|
| 44 |
#endif |
|---|
| 45 |
|
|---|