You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
662 B
C

#include "outbox.h"
#include "fs_list.h"
#include "model/crypto/keys.h"
#include "sha256/sha256.h"
#include <stdlib.h>
#include <stdio.h>
static void process_one()
{
int tail = fs_list_get("data/outbox/TAIL");
printf( "To handle: %d\n", tail );
}
void process_outbox()
{
struct crypto_keys* keys = crypto_keys_new();
if( !crypto_keys_load_private( keys, "data/owner/private.pem" ) ) {
printf( "Failed to load private key\n" );
}
char hash[32];
sha256_easy_hash( "Hello, World!", 13, hash );
char* signature = crypto_keys_sign( keys, hash, 32 );
printf( "signature = %s\n", signature );
free(signature);
crypto_keys_free(keys);
exit(0);
}