Commit 66ccdd41 authored by yids's avatar yids

forgot some

parent 665bd466
# Edit this file to configure the AVRNaCl build system
# Do not put spaces before or after the '=' character.
TARGET_DEVICE=atmega2560
TARGET_DEVICE=atmega328p
CPUFREQ=16000000
CC=/usr/bin/avr-gcc
OBJCOPY=/usr/bin/avr-objcopy
......
......@@ -37,7 +37,7 @@ extern "C"
#define DBM
#endif
typedef enum { false, true } bool;
//typedef enum { false, true } bool;
/*
* List of all the available keypairs
......@@ -58,8 +58,8 @@ typedef struct list_kp {
*/
typedef struct list_public_key {
uint32_t id;
char public_key[crypto_box_PUBLICKEYBYTES];
bool is_group;
unsigned char public_key[crypto_box_PUBLICKEYBYTES];
//bool is_group;
char alias[32];
struct list_public_key *prev;
struct list_public_key *next;
......@@ -85,7 +85,7 @@ typedef struct list_inbox {
struct pl_ctx
{
// contains the message that will be send or is received
char clear_message[MSG_SIZE];
// char clear_message[MSG_SIZE];
char decryptbuffer[PLAIN_MSG_SIZE];
struct pl_keypair *kp; // my (currently used ) keypair
struct list_kp *keypairs; // keypair list (all available keypairs)
......@@ -93,15 +93,17 @@ struct pl_ctx
int msgcount;
struct list_inbox *inbox;
struct list_inbox *inbox_curr;
char receiver_public_key[crypto_box_PUBLICKEYBYTES];
#ifndef RX
unsigned char receiver_public_key[crypto_box_PUBLICKEYBYTES];
struct list_public_key *public_keys;
#endif
uint8_t err;
};
struct pl_ctx * pl_init();
struct pl_keypair * pl_create_keypair(struct pl_ctx*);
int pl_set_receiver(struct pl_ctx *ctx, char *public_key);
int pl_set_receiver(struct pl_ctx *ctx, unsigned char *public_key);
int pl_set_receiver_by_address(struct pl_ctx *ctx, uint32_t addr);
int pl_send_message(struct pl_ctx *);
......@@ -115,7 +117,7 @@ int pl_save_public_key(char pubkey[crypto_box_PUBLICKEYBYTES], char *filename);
char *pl_load_public_key(char *filename);
int pl_print_keylist(struct pl_ctx *ctx);
int pl_load_key_in_list(struct pl_ctx *ctx, struct pl_keypair *key);
int pl_load_public_key_in_list(struct pl_ctx *ctx, char *public_key, char *alias);
int pl_load_public_key_in_list(struct pl_ctx *ctx, unsigned char *public_key, char *alias);
int pl_print_public_keylist(struct pl_ctx *ctx);
int pl_load_public_keys_from_folder(struct pl_ctx *ctx, char const *folder);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment