Commit Graph

17 Commits

Author SHA1 Message Date
Ales Bregar aa030e3f36 system test t12_api sends empty keyRef string, making gpg fail 2026-01-24 10:55:15 +01:00
Ales Bregar 9a90038dd2 - #309 adding gpgKeys config key, accepting array of keyRef, cli args has precedence
- #691 adding handling of multiple keyRefs when signing with gpg
2026-01-24 10:55:15 +01:00
André Roth f7057a9517 go1.24: fix lint, unit and system tests
- development env: base on debian trixie with go1.24
- lint: run with default config
- fix lint errors
- fix unit tests
- fix system test
2025-04-26 13:29:50 +02:00
André Roth c1f7e5fe96 handle GpgDisableVerify and ignore-signatures consistently
and be less verbose
2024-07-03 18:08:58 +02:00
Markus Muellner 352f4e8772 update golangci-lint and replace deprecated calls to io/ioutil 2022-12-12 10:21:39 +01:00
Vítězslav Dvořák 174943cd0f Proposed keyserver changed to functional one #990 2021-11-02 15:01:17 +01:00
Stephan Eicher aa02c5cbe9 Fix #827 - passhprase typos 2019-09-02 23:26:37 +03:00
Andrey Smirnov bb1def2910 Try Travis on xenial workers 2019-07-11 00:16:20 +03:00
Andrey Smirnov 1b2fccb615 Compatibility with GnuPG 1.x and 2.x, auto-detect GnuPG version
* aptly can sign and verify without issues with GnuPG 1.x and 2.x
* aptly auto-detects GnuPG version and adapts accordingly
* aptly automatically finds suitable GnuPG version

Majority of the work was to get unit-tests which can work with GnuPG 1.x & 2.x.
Locally I've verified that aptly supports GnuPG 1.4.x & 2.2.x. Travis CI
environment is based on trusty, so it runs gpg2 tests with GnuPG 2.0.x.

Configuration parameter gpgProvider now supports three values for GnuPG:

* gpg (same as before, default): use GnuPG 1.x if available (checks gpg, gpg1),
otherwise uses GnuPG 2.x; for aptly users who already have GnuPG 1.x
environment (as it was the only supported version) nothing should change; new
users might start with GnuPG 2.x if that's their installed version

* gpg1 looks for GnuPG 1.x only, fails otherwise

* gpg2 looks for GnuPG 2.x only, fails otherwise
2018-10-10 01:34:00 +03:00
Andrey Smirnov 58c7358113 Unit tests for PGP signing/verification
These unit-tests cover operations via both PGP providers:
built-in `openpgp` and external `gpg`.

Next step is to run these tests for gpg1 & gpg2
as separate entities.
2018-07-11 01:07:13 +03:00
Andrey Smirnov e5acf22285 Skip GPG version check APTLY_SKIP_GPG_VERSION_CHECK=1 is set in the environment
This allows to force using GnuPG 2.x even if aptly is not 100% ready
to use it.
2018-05-25 00:23:50 +03:00
Harald Sitter 5a713534c6 fix gpg setting
Init is actually never called and I have no clue why it is there if it is
not called.
Take this opportunity to introduce a New function which only does the
helper lookup and panics iff that fails. Panic may be a bit too aggressive,
but seems the most certain way to get out of not finding a suitable gpg1
binary.
2018-04-26 09:18:06 +02:00
Harald Sitter cd6075ba94 introduce a gpg and gpgv version compatibility check and fall back to v1
Newer versions of debian and ubuntu come with gpg pointing to gpg2.
We can currently only handle gpg1 CLIs though. Luckily the old gpg is still
available in the package gnupg1 (providing bin/gpg1).

As a bit of a stop-gap, until #657 can be resolved properly, we'll detect
the version of bin/gpg. If it is unsuitable we'll fall back and try
bin/gpg1. If neither is found to be suitable the signer/verifier will
not work.

Same applies to gpgv/gpgv1.
2018-04-25 15:05:53 +02:00
Andrey Smirnov aa3a2ab595 New signing key for aptly repo, and small fixes
Build on Go 1.10, drop Go 1.7

Remove references to now defunct pgp.mit.edu, fix system test
2018-03-16 01:27:57 +03:00
Andrey Smirnov 5e9515a912 Add --batch in batch mode (fixes #519) 2017-07-21 01:01:58 +03:00
Andrey Smirnov 07fde3177b GoVerifier implementation 2017-07-21 01:01:58 +03:00
Andrey Smirnov 1be8d39105 Refactor GPG signer/verifier
Goal is to make it easier to plug in another implementation.
2017-05-23 02:54:56 +03:00