IOSAD-103 merge in sync IOSAD-103
authorDirk Zimmermann <dz@pep.security>
Thu, 22 Nov 2018 13:34:38 +0100
branchIOSAD-103
changeset 31519a6e62340dab
parent 3148 faf47cc68597
parent 3150 a99c04f1eee7
child 3155 2a82fde0f661
IOSAD-103 merge in sync
     1.1 --- a/src/pgp_netpgp.c	Wed Nov 21 08:35:41 2018 +0100
     1.2 +++ b/src/pgp_netpgp.c	Thu Nov 22 13:34:38 2018 +0100
     1.3 @@ -778,10 +778,9 @@
     1.4      pgp_keyring_t *snrs;
     1.5  
     1.6      PEP_STATUS result;
     1.7 -    const stringlist_t *_keylist;
     1.8  
     1.9      assert(session);
    1.10 -    assert(keylist);
    1.11 +    assert(fpr);
    1.12      assert(ptext);
    1.13      assert(psize);
    1.14      assert(stext);
    1.15 @@ -797,14 +796,13 @@
    1.16      *stext = NULL;
    1.17      *ssize = 0;
    1.18  
    1.19 -    if ((snrs = calloc(1, sizeof(*rcpts))) == NULL) {
    1.20 +    if ((snrs = calloc(1, sizeof(*snrs))) == NULL) {
    1.21          result = PEP_OUT_OF_MEMORY;
    1.22          goto unlock_netpgp;
    1.23      }
    1.24      
    1.25      assert(fpr && fpr[0]);
    1.26  
    1.27 -    const pgp_key_t *key;
    1.28      uint8_t uint_fpr[PGP_FINGERPRINT_SIZE];
    1.29      size_t fprlen;
    1.30      unsigned from = 0;
    1.31 @@ -847,7 +845,6 @@
    1.32  
    1.33      const char *_stext;
    1.34      size_t _ssize;
    1.35 -    unsigned encrypt_raw_packet;
    1.36     
    1.37      // Sign data
    1.38      signedmem = pgp_sign_buf(netpgp.io, ptext, psize, seckey,
    1.39 @@ -873,7 +870,7 @@
    1.40          goto free_signedmem;
    1.41      }
    1.42  
    1.43 -    memcpy(_buffer, pgp_mem_data(_stext), _ssize);
    1.44 +    memcpy(_buffer, _stext, _ssize);
    1.45      *stext = _buffer;
    1.46      *ssize = _ssize;
    1.47      (*stext)[*ssize] = 0; // safeguard for naive users