src/pgp_netpgp.c
changeset 184 da3973ecb7b6
parent 183 e83ac06e2d6d
child 185 f3142e40d9e7
     1.1 --- a/src/pgp_netpgp.c	Wed Apr 08 22:22:59 2015 +0200
     1.2 +++ b/src/pgp_netpgp.c	Wed Apr 08 22:51:03 2015 +0200
     1.3 @@ -138,7 +138,8 @@
     1.4      }
     1.5  
     1.6      if (result == PEP_DECRYPTED &&
     1.7 -        vresult->validc && !vresult->invalidc && !vresult->unknownc ) {
     1.8 +        vresult->validc && vresult->valid_sigs &&
     1.9 +        !vresult->invalidc && !vresult->unknownc ) {
    1.10          unsigned	n;
    1.11          stringlist_t *k;
    1.12          _keylist = new_stringlist(NULL);
    1.13 @@ -151,7 +152,7 @@
    1.14          for (n = 0; n < vresult->validc; ++n) {
    1.15              int i;
    1.16              static const char *hexes = "0123456789abcdef";
    1.17 -	        char id[MAX_ID_LENGTH + 1];
    1.18 +            char id[MAX_ID_LENGTH + 1];
    1.19              const uint8_t *userid = vresult->valid_sigs[n].signer_id;
    1.20  
    1.21              for (i = 0; i < 8 ; i++) {
    1.22 @@ -173,6 +174,7 @@
    1.23              goto free_ptext;
    1.24          } else {
    1.25              // only unknown sigs
    1.26 +            // or valid sig not provided in result
    1.27              result = PEP_DECRYPT_WRONG_FORMAT;
    1.28              goto free_ptext;
    1.29          }