mirror of
https://codeberg.org/scip/pcp.git
synced 2025-12-17 12:00:56 +01:00
removed unused vars
This commit is contained in:
14
TODO
14
TODO
@@ -25,10 +25,20 @@ Symmetric decrypt mode tries to open vault
|
|||||||
|
|
||||||
pcp_find_primary_secret() makes a copy ???
|
pcp_find_primary_secret() makes a copy ???
|
||||||
|
|
||||||
sym encrypt mac => mac, mac => freebsd and freebsd => mac doesnt work
|
|
||||||
|
|
||||||
c++ destructor double free mess
|
c++ destructor double free mess
|
||||||
|
|
||||||
|
size_t 32bit/64bit:
|
||||||
|
buffer.c: In function 'buffer_info':
|
||||||
|
buffer.c:268:3: error: format '%ld' expects argument of type 'long int', but argument 3 has type 'size_t' [-Werror=format]
|
||||||
|
buffer.c:268:3: error: format '%ld' expects argument of type 'long int', but argument 3 has type 'size_t' [-Werror=format]
|
||||||
|
buffer.c:269:3: error: format '%ld' expects argument of type 'long int', but argument 3 has type 'size_t' [-Werror=format]
|
||||||
|
buffer.c:269:3: error: format '%ld' expects argument of type 'long int', but argument 3 has type 'size_t' [-Werror=format]
|
||||||
|
buffer.c:270:3: error: format '%ld' expects argument of type 'long int', but argument 3 has type 'size_t' [-Werror=format]
|
||||||
|
buffer.c:270:3: error: format '%ld' expects argument of type 'long int', but argument 3 has type 'size_t' [-Werror=format]
|
||||||
|
buffer.c:271:3: error: format '%ld' expects argument of type 'long int', but argument 3 has type 'size_t' [-Werror=format]
|
||||||
|
buffer.c:271:3: error: format '%ld' expects argument of type 'long int', but argument 3 has type 'size_t' [-Werror=format]
|
||||||
|
http://stackoverflow.com/questions/2426113/i-have-having-following-warning-in-gcc-compilation-in-32-bit-architecture-but-no
|
||||||
|
|
||||||
Python binding, e.g.:
|
Python binding, e.g.:
|
||||||
py % cdll.LoadLibrary("libsodium.so.8")
|
py % cdll.LoadLibrary("libsodium.so.8")
|
||||||
<CDLL 'libsodium.so.8', handle 800776c00 at 80192a3d0>
|
<CDLL 'libsodium.so.8', handle 800776c00 at 80192a3d0>
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ extern "C" {
|
|||||||
#include "pcp/config.h"
|
#include "pcp/config.h"
|
||||||
#include "pcp/base85.h"
|
#include "pcp/base85.h"
|
||||||
#include "pcp/buffer.h"
|
#include "pcp/buffer.h"
|
||||||
#include "pcp/config.h"
|
|
||||||
#include "pcp/crypto.h"
|
#include "pcp/crypto.h"
|
||||||
#include "pcp/defines.h"
|
#include "pcp/defines.h"
|
||||||
#include "pcp/digital_crc32.h"
|
#include "pcp/digital_crc32.h"
|
||||||
|
|||||||
@@ -163,7 +163,6 @@ byte *pcp_box_decrypt(pcp_key_t *secret, pcp_pubkey_t *pub,
|
|||||||
|
|
||||||
size_t pcp_decrypt_stream(Pcpstream *in, Pcpstream* out, pcp_key_t *s, byte *symkey, int verify) {
|
size_t pcp_decrypt_stream(Pcpstream *in, Pcpstream* out, pcp_key_t *s, byte *symkey, int verify) {
|
||||||
pcp_pubkey_t *cur = NULL;
|
pcp_pubkey_t *cur = NULL;
|
||||||
pcp_pubkey_t *sender = NULL;
|
|
||||||
byte *reccipher = NULL;
|
byte *reccipher = NULL;
|
||||||
int recmatch, self;
|
int recmatch, self;
|
||||||
uint32_t lenrec;
|
uint32_t lenrec;
|
||||||
@@ -244,7 +243,6 @@ size_t pcp_decrypt_stream(Pcpstream *in, Pcpstream* out, pcp_key_t *s, byte *sym
|
|||||||
if(recipient != NULL && rec_size == crypto_secretbox_KEYBYTES) {
|
if(recipient != NULL && rec_size == crypto_secretbox_KEYBYTES) {
|
||||||
/* found a match */
|
/* found a match */
|
||||||
recmatch = 1;
|
recmatch = 1;
|
||||||
sender = cur;
|
|
||||||
symkey = ucmalloc(crypto_secretbox_KEYBYTES);
|
symkey = ucmalloc(crypto_secretbox_KEYBYTES);
|
||||||
memcpy(symkey, recipient, crypto_secretbox_KEYBYTES);
|
memcpy(symkey, recipient, crypto_secretbox_KEYBYTES);
|
||||||
free(recipient);
|
free(recipient);
|
||||||
@@ -289,7 +287,6 @@ size_t pcp_encrypt_stream(Pcpstream *in, Pcpstream *out, pcp_key_t *s, pcp_pubke
|
|||||||
uint32_t lenrec;
|
uint32_t lenrec;
|
||||||
size_t rec_size, out_size;
|
size_t rec_size, out_size;
|
||||||
byte head[1];
|
byte head[1];
|
||||||
byte rs[1];
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
6[1]|temp_keypair.pubkey|len(recipients)[4]|(recipients...)|(secretboxes...)
|
6[1]|temp_keypair.pubkey|len(recipients)[4]|(recipients...)|(secretboxes...)
|
||||||
@@ -304,7 +301,6 @@ size_t pcp_encrypt_stream(Pcpstream *in, Pcpstream *out, pcp_key_t *s, pcp_pubke
|
|||||||
/* B, encrypt it asymetrically for each recipient */
|
/* B, encrypt it asymetrically for each recipient */
|
||||||
recipient_count = HASH_COUNT(p);
|
recipient_count = HASH_COUNT(p);
|
||||||
rec_size = PCP_ASYM_RECIPIENT_SIZE;
|
rec_size = PCP_ASYM_RECIPIENT_SIZE;
|
||||||
rs[0] = PCP_ASYM_RECIPIENT_SIZE - crypto_secretbox_NONCEBYTES;
|
|
||||||
recipients_cipher = ucmalloc(rec_size * recipient_count);
|
recipients_cipher = ucmalloc(rec_size * recipient_count);
|
||||||
nrec = 0;
|
nrec = 0;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user