1. 18 Sep, 2021 1 commit
  2. 23 Aug, 2021 5 commits
  3. 20 Aug, 2021 5 commits
  4. 24 Jun, 2021 3 commits
  5. 22 Jun, 2021 2 commits
    • Ingo Klöcker's avatar
      qt: Extend SignKeyJob to create signatures with expiration date · ac453699
      Ingo Klöcker authored
      * lang/qt/src/signkeyjob.h (SignKeyJob::setExpirationDate): New.
      * lang/qt/src/qgpgmesignkeyjob.h, lang/qt/src/qgpgmesignkeyjob.cpp
      (QGpgMESignKeyJob::setExpirationDate): New.
      * lang/qt/src/qgpgmesignkeyjob.cpp (QGpgMESignKeyJob::Private): Add
      member m_expiration.
      (sign_key): Handle expiration date.
      (QGpgMESignKeyJob::start): Pass expiration date to sign_key.
      
      * lang/qt/tests/t-various.cpp
      (TestVarious::testSignKeyWithoutExpiration,
      TestVarious::testSignKeyWithExpiration): New.
      (TestVarious::initTestCase): Add "allow-weak-key-signatures" to
      gpg.conf.
      --
      
      This allows Kleopatra (and other users of QGpgme) to create key
      signatures with expiration date.
      
      GnuPG-bug-id: 5336, 5506
      ac453699
    • Ingo Klöcker's avatar
      core: Allow specifying an expiration date for key signatures · 34d9defc
      Ingo Klöcker authored
      * src/context.h (struct gpgme_context): Add 'cert_expire'.
      * src/engine-gpg.c (append_args_from_cert_expire): New.
      (gpg_edit): Set option according to the new flag.
      * src/gpgme.c (gpgme_release): Free 'cert_expire'.
      (gpgme_set_ctx_flag, gpgme_get_ctx_flag): Add "cert-expire".
      
      * tests/gpg/Makefile.am (c_tests): Add new test.
      (gpg.conf): Write "allow-weak-key-signatures" to gpg.conf.
      * tests/gpg/t-edit-sign.c: New.
      --
      
      The new context flag "cert-expire" allows setting the expiration date
      for key signatures created with gpgme_op_interact.
      
      GnuPG-bug-id: 5336, 5505
      34d9defc
  6. 21 Jun, 2021 1 commit
    • Ingo Klöcker's avatar
      Update NEWS. · ab1d4ef5
      Ingo Klöcker authored
      * NEWS: Add news for recent changes
      --
      
      GnuPG-bug-id: 5421, 5217
      ab1d4ef5
  7. 18 Jun, 2021 1 commit
  8. 17 Jun, 2021 3 commits
    • Ingo Klöcker's avatar
      qt: Add some error logging · 72de0641
      Ingo Klöcker authored
      * lang/qt/src/qgpgmenewcryptoconfig.cpp (setURLValueList): Log error
      if setting config value failed.
      --
      
      GnuPG-bug-id: 5465
      72de0641
    • Ingo Klöcker's avatar
      qt: Do not set empty base DN as query of keyserver URL · 1dca8c2b
      Ingo Klöcker authored
      * lang/qt/src/qgpgmenewcryptoconfig.cpp (parseURL): Only set non-empty
      base DN as URL query.
      --
      
      This makes it possible to differentiate an unset query from an empty
      query.
      
      GnuPG-bug-id: 5465
      1dca8c2b
    • Ingo Klöcker's avatar
      qt: Fix API documentation · 0d03f31e
      Ingo Klöcker authored
      * lang/qt/src/signkeyjob.h (SignKeyJob::start,
      SignKeyJob::setUserIDsToSign, SignKeyJob::setCheckLevel): Fix
      documentation of parameters.
      --
      
      GnuPG-bug-id: 5245
      0d03f31e
  9. 14 Jun, 2021 2 commits
    • Werner Koch's avatar
      core: New data flags "io-buffer-size" and "sensitive". · fde20940
      Werner Koch authored
      
      
      * src/data.c (_gpgme_data_release): Free buffers.
      (gpgme_data_seek): Adjust from renamed fields.
      (gpgme_data_set_flag): Implement new flags.
      (_gpgme_data_inbound_handler): Allow the use of a malloced buffer.
      (_gpgme_data_outbound_handler): Ditto.
      * src/data.h (BUFFER_SIZE): Move out of the struct definition.
      (struct gpgme_data): Remove pending filed and introduce inbound and
      outbound fields.
      
      * src/conversion.c (_gpgme_wipememory): New.  Taken from GnuPG.
      * src/cJSON.c (wipememory): Use this here too.
      
      * tests/run-decrypt.c (main): Add options "--large-buffers" and
      "--sensitive".
      --
      
      GnuPG-bug-id: 5478
      Signed-off-by: default avatarWerner Koch <wk@gnupg.org>
      fde20940
    • Werner Koch's avatar
      core: Also detect AuthEnvelopedData (AEAD for CMS) · ea290108
      Werner Koch authored
      
      
      * src/data-identify.c (basic_detection): Add OID.
      
      Signed-off-by: default avatarWerner Koch <wk@gnupg.org>
      ea290108
  10. 10 Jun, 2021 2 commits
    • Andre Heinecke's avatar
      qt: Flush output after write for QProcess output · b3b75c37
      Andre Heinecke authored
      * lang/qt/src/dataprovider.cpp (QIODeviceDataProvider::write): Call
      waitForBytesWritten.
      
      --
      The problem here is that QProcess writes into an internal buffer
      which is written to stdin of the process triggered by a
      signal/slot connection. That connection is broken when we move
      the QProcess into our GPGME thread and only restablished when
      our Job is finished. This caused Kleopatra to basically keep
      everything when decrypting a large archive in memory and
      only write it out to the unpack process once the decryption
      was finished.
      
      GnuPG-Bug-Id: T5475
      b3b75c37
    • Andre Heinecke's avatar
      core,w32: Increase BUFFER_SIZE to 4096 · ceb83874
      Andre Heinecke authored
      * src/data.h (BUFFER_SIZE): Increase to 4096 for Windows.
      
      --
      This brings it in line to the PIPE_BUF size on desktop Linux
      systems. This should increase performance when working with
      large files on Windows a bit.
      
      GnuPG-Bug-Id: T5478
      ceb83874
  11. 09 Jun, 2021 2 commits
    • Andre Heinecke's avatar
      qt: Explicitly link libgpg-error · e6095e54
      Andre Heinecke authored
      * lang/qt/src/Makefile.am (libqgpgme_la_LIBADD): Explicitly link
      gpg-error.
      
      --
      Previously this was implicit from the libassuan flags.
      e6095e54
    • Andre Heinecke's avatar
      core: Explicitly add GPG_ERROR_CFLAGS · 4041e2c6
      Andre Heinecke authored
      * src/Makefile.am (AM_CFLAGS): Add GPG_ERROR_CFLAGS
      
      --
      This fixes the include directory for libgpg error if
      it is installed in a different prefix then libassuan. Previously
      libassuan provided the include directory also implicitly.
      4041e2c6
  12. 02 Jun, 2021 2 commits
    • Ingo Klöcker's avatar
      qt: Add separate logging category for result of config loading · 5bc4e23a
      Ingo Klöcker authored
      * lang/qt/src/qgpgme_debug.h: Make include guard match file name.
      * lang/qt/src/qgpgme_debug.h, lang/qt/src/qgpgme_debug.cpp
      (QGPGME_CONFIG_LOADING_LOG): New.
      * lang/qt/src/qgpgmenewcryptoconfig.cpp
      (QGpgMENewCryptoConfig::reloadConfiguration): Use new logging category.
      --
      
      Use a separate logging category for the extremely noisy logging of
      the result of config loading to make debug logging more useful.
      
      GnuPG-bug-id: 5217
      5bc4e23a
    • Ingo Klöcker's avatar
      core: Fix a few checks for number of fields in keylist result parser. · 5512133d
      Ingo Klöcker authored
      * src/keylist.c (keylist_colon_handler): Check for correct number of
      fields.
      --
      
      This prevents NULL pointer dereferencing with older versions of gpg
      that may output less fields.
      5512133d
  13. 01 Jun, 2021 1 commit
    • Ingo Klöcker's avatar
      qt: Add support for flags in LDAP server options · 27aa7c4a
      Ingo Klöcker authored
      * lang/qt/src/qgpgmenewcryptoconfig.cpp (parseURL): Handle extended
      LDAP server option syntax.
      (portToString): New.
      (splitURL): Append flags to LDAP server option.
      --
      
      This adds support for the extended syntax of LDAP server options
      introduced in gpg 2.2.18/2.3. The flags are stored as fragment of a
      QUrl.
      
      GnuPG-bug-id: 5217
      27aa7c4a
  14. 28 May, 2021 1 commit
    • Werner Koch's avatar
      tests: Improve the output of the run-keylist helper. · 31eb45f0
      Werner Koch authored
      * tests/run-keylist.c (main): Print all infos from the primary key.
      --
      
      The test tool printed only the computed infos for the key and not the
      detailed one fro the primary key.  The new output better reflects the
      data structure.
      
      Related to
      GnuPG-bug-id: 5454
      31eb45f0
  15. 27 May, 2021 2 commits
  16. 12 May, 2021 2 commits
    • Werner Koch's avatar
      core: Allow for older compilers. · aa980813
      Werner Koch authored
      * tests/run-verify.c (main): Remove C99-only syntax.
      * tests/run-threaded.c (start_keylistings): Ditto.
      --
      
      Older gcc's do not grok this and there is no real need for it.
      
        run-verify.c:324: error: ‘for’ loop initial declarations are only
        allowed in C99 mode
        run-verify.c:324: note: use option -std=c99 or -std=gnu99 to compile
        your code
      
      Reported-by: Lars Hecking
      aa980813
    • Werner Koch's avatar
      core: Make sure to stay ABI compatible. · 88db69e1
      Werner Koch authored
      * src/gpgme.h.in (struct _gpgme_key_sig): Move trust_scope to the end
      of the struct.
      --
      
      Fixes-commit: 276187f6
      
      Note that we assume that splitting a reserved 28 bit field into 3
      fields does not change the ABI.
      88db69e1
  17. 06 May, 2021 1 commit
    • Ingo Klöcker's avatar
      cpp: Do not close stdout/stderr when destroying EditInteractor · 58a217b1
      Ingo Klöcker authored
      * lang/cpp/src/editinteractor.cpp (EditInteractor::Private): Initialize
      members 'state' and 'debug' in-class. Add member 'debugNeedsClosing'.
      (EditInteractor::Private::Private): Remove members initializers.
      Remember if 'debug' needs to be closed.
      (EditInteractor::Private::~Private): Only close 'debug' if it needs to
      be closed.
      --
      
      This fixes the problem that after destroying an edit interactor all
      debug output went to /dev/null instead of stderr (or stdout) if one
      enabled debugging of the edit interactors with GPGMEPP_INTERACTOR_DEBUG
      set to stderr (or stdout).
      58a217b1
  18. 05 May, 2021 4 commits
    • Ingo Klöcker's avatar
      qt: Extend SignKeyJob to create trust signatures · f0858e45
      Ingo Klöcker authored
      * lang/qt/src/signkeyjob.h (SignKeyJob::setTrustSignature): New.
      * lang/qt/src/qgpgmesignkeyjob.h, lang/qt/src/qgpgmesignkeyjob.cpp
      (QGpgMESignKeyJob::setTrustSignature): New.
      * lang/qt/src/qgpgmesignkeyjob.cpp (sign_key): Handle trust signatures.
      (QGpgMESignKeyJob::start): Pass trust signature attributes to sign_key.
      (QGpgMESignKeyJob::setTrustSignature): New.
      --
      
      This allows Kleopatra to create trust signatures for trusted
      introducers.
      
      GnuPG-bug-id: 5245, 5421
      f0858e45
    • Ingo Klöcker's avatar
      qt: Pimpl QGpgMESignKeyJob · dae01f81
      Ingo Klöcker authored
      * lang/qt/src/qgpgmesignkeyjob.h: Remove unneeded includes. Include
      <memory>.
      (QGpgMESignKeyJob): Remove all member variables. Add pimpl pointer.
      * lang/qt/src/qgpgmesignkeyjob.cpp: Include <QString>. Don't include
      <memory>.
      (QGpgMESignKeyJob::Private): New.
      (QGpgMESignKeyJob::QGpgMESignKeyJob): Remove initialization of removed
      members. Initialize d.
      (QGpgMESignKeyJob::start, QGpgMESignKeyJob::setUserIDsToSign,
      QGpgMESignKeyJob::setCheckLevel, QGpgMESignKeyJob::setExportable,
      QGpgMESignKeyJob::setSigningKey, QGpgMESignKeyJob::setNonRevocable,
      QGpgMESignKeyJob::setRemark, QGpgMESignKeyJob::setDupeOk): Adapt to move
      of member variables to pimpl.
      --
      
      GnuPG-bug-id: 5245, 5421
      dae01f81
    • Ingo Klöcker's avatar
      cpp: Add support for trust signatures to sign key edit interactor · a8d7b9d1
      Ingo Klöcker authored
      * lang/cpp/src/gpgsignkeyeditinteractor.h,
      lang/cpp/src/gpgsignkeyeditinteractor.cpp
      (GpgSignKeyEditInteractor::setTrustSignatureTrust): New.
      (GpgSignKeyEditInteractor::setTrustSignatureDepth): New.
      (GpgSignKeyEditInteractor::setTrustSignatureScope): New.
      * lang/cpp/src/gpgsignkeyeditinteractor.cpp
      (GpgSignKeyEditInteractor::Private::Private): Initialize new member.
      (makeTable): Add new transition. Fix typos in existing transitions.
      (GpgSignKeyEditInteractor::action): Handle SET_TRUST_VALUE,
      SET_TRUST_DEPTH, and SET_TRUST_REGEXP.
      --
      
      GnuPG-bug-id: 5245, 5421
      a8d7b9d1
    • Ingo Klöcker's avatar
      cpp: Add getters for the attributes of a trust signature · e391a08c
      Ingo Klöcker authored
      * lang/cpp/src/key.h (TrustSignatureTrust): New enum.
      * lang/cpp/src/key.h, lang/cpp/src/key.cpp
      (UserID::Signature::isTrustSignature): New.
      (UserID::Signature::trustValue): New.
      (UserID::Signature::trustDepth): New.
      (UserID::Signature::trustScope): New.
      --
      
      GnuPG-bug-id: 5245, 5420
      e391a08c