ENGINE-479: fixed compilation errors ENGINE-479
authorKrista Bennett <krista@pep-project.org>
Mon, 12 Nov 2018 09:43:57 +0100
branchENGINE-479
changeset 313316fa0ec5951d
parent 3131 44dbae32fe45
child 3134 6e96b0c77b91
ENGINE-479: fixed compilation errors
src/cryptotech.c
src/cryptotech.h
src/pgp_gpg.c
src/pgp_gpg_internal.h
     1.1 --- a/src/cryptotech.c	Mon Nov 12 08:35:57 2018 +0100
     1.2 +++ b/src/cryptotech.c	Mon Nov 12 09:43:57 2018 +0100
     1.3 @@ -37,7 +37,7 @@
     1.4          cryptotech[PEP_crypt_OpenPGP].decrypt_and_verify = pgp_decrypt_and_verify;
     1.5          cryptotech[PEP_crypt_OpenPGP].encrypt_and_sign = pgp_encrypt_and_sign;
     1.6          cryptotech[PEP_crypt_OpenPGP].encrypt_only = pgp_encrypt_only;
     1.7 -        cryptotech[PEP_crypt_OpenPGP].encrypt_only = pgp_sign_only;        
     1.8 +        cryptotech[PEP_crypt_OpenPGP].sign_only = pgp_sign_only;        
     1.9          cryptotech[PEP_crypt_OpenPGP].verify_text = pgp_verify_text;
    1.10          cryptotech[PEP_crypt_OpenPGP].delete_keypair = pgp_delete_keypair;
    1.11          cryptotech[PEP_crypt_OpenPGP].export_key = pgp_export_keydata;
     2.1 --- a/src/cryptotech.h	Mon Nov 12 08:35:57 2018 +0100
     2.2 +++ b/src/cryptotech.h	Mon Nov 12 09:43:57 2018 +0100
     2.3 @@ -39,7 +39,7 @@
     2.4      );
     2.5  
     2.6  typedef PEP_STATUS (*sign_only_t)(
     2.7 -        PEP_SESSION session, const stringlist_t *keylist, const char *ptext,
     2.8 +        PEP_SESSION session, const char* fpr, const char *ptext,
     2.9          size_t psize, char **stext, size_t *ssize
    2.10      );
    2.11  
    2.12 @@ -104,6 +104,7 @@
    2.13      verify_text_t verify_text;
    2.14      encrypt_and_sign_t encrypt_and_sign;
    2.15      encrypt_only_t encrypt_only;
    2.16 +    sign_only_t sign_only;    
    2.17      delete_keypair_t delete_keypair;
    2.18      export_key_t export_key;
    2.19      find_keys_t find_keys;
     3.1 --- a/src/pgp_gpg.c	Mon Nov 12 08:35:57 2018 +0100
     3.2 +++ b/src/pgp_gpg.c	Mon Nov 12 09:43:57 2018 +0100
     3.3 @@ -1,4 +1,4 @@
     3.4 -ssizessizessizessizesigner_key// This file is under GNU General Public License 3.0
     3.5 +// This file is under GNU General Public License 3.0
     3.6  // see LICENSE.txt
     3.7  
     3.8  #include "platform.h"
     3.9 @@ -991,7 +991,8 @@
    3.10                                      signer_key_ptr, 0);
    3.11      gpgme_error = _GPGERR(gpgme_error);
    3.12      assert(gpgme_error != GPG_ERR_ENOMEM);
    3.13 -
    3.14 +    gpgme_error_t _gpgme_error;
    3.15 +    
    3.16      switch (gpgme_error) {
    3.17      case GPG_ERR_ENOMEM:
    3.18          gpg.gpgme_key_unref(*signer_key_ptr);
    3.19 @@ -1000,7 +1001,7 @@
    3.20          gpg.gpgme_data_release(signed_text);
    3.21          return PEP_OUT_OF_MEMORY;
    3.22      case GPG_ERR_NO_ERROR:
    3.23 -        gpgme_error_t _gpgme_error = gpg.gpgme_signers_add(session->ctx, *signer_key_ptr);
    3.24 +        _gpgme_error = gpg.gpgme_signers_add(session->ctx, *signer_key_ptr);
    3.25          _gpgme_error = _GPGERR(_gpgme_error);
    3.26          assert(_gpgme_error == GPG_ERR_NO_ERROR);
    3.27          break;
     4.1 --- a/src/pgp_gpg_internal.h	Mon Nov 12 08:35:57 2018 +0100
     4.2 +++ b/src/pgp_gpg_internal.h	Mon Nov 12 09:43:57 2018 +0100
     4.3 @@ -46,6 +46,8 @@
     4.4  typedef gpgme_error_t(*gpgme_op_encrypt_t)(gpgme_ctx_t CTX,
     4.5          gpgme_key_t RECP[], gpgme_encrypt_flags_t FLAGS, gpgme_data_t PLAIN,
     4.6          gpgme_data_t CIPHER);
     4.7 +typedef gpgme_error_t(*gpgme_op_sign_t)(gpgme_ctx_t CTX,
     4.8 +        gpgme_data_t PLAIN, gpgme_data_t SIG, gpgme_sig_mode_t MODE);        
     4.9  typedef gpgme_verify_result_t(*gpgme_op_verify_result_t)(gpgme_ctx_t CTX);
    4.10  typedef void(*gpgme_signers_clear_t)(gpgme_ctx_t CTX);
    4.11  typedef gpgme_error_t(*gpgme_signers_add_t)(gpgme_ctx_t CTX, const gpgme_key_t KEY);
    4.12 @@ -122,6 +124,7 @@
    4.13      gpgme_op_decrypt_result_t gpgme_op_decrypt_result;
    4.14      gpgme_op_encrypt_sign_t gpgme_op_encrypt_sign;
    4.15      gpgme_op_encrypt_t gpgme_op_encrypt;
    4.16 +    gpgme_op_sign_t gpgme_op_sign;    
    4.17      gpgme_op_verify_result_t gpgme_op_verify_result;
    4.18      gpgme_signers_clear_t gpgme_signers_clear;
    4.19      gpgme_signers_add_t gpgme_signers_add;