Commit Graph

248 Commits

Author SHA1 Message Date
Adam Weinberger 2b2d7f29bb security/gnupg: Update to 2.2.27
* gpg: Fix regression in 2.2.24 for gnupg_remove function under
   Windows.  [#5230]

 * gpgconf: Fix case with neither local nor global gpg.conf.  [9f37d3e6f3]

 * gpgconf: Fix description of two new options.  [#5221]

 * Build Windows installer without timestamps.  Note that the
   Authenticode signatures still carry a timestamp.

  Release-info: https://dev.gnupg.org/T5234
2021-01-12 04:50:55 +00:00
Adam Weinberger dec4affe78 security/gnupg: Update to 2.2.26
Note that this release removes bin/symcryptrun which had essentially no
expected current use-case.

 * gpg: New AKL method "ntds".
 * gpg: Fix --trusted-key with fingerprint arg.
 * scd: Fix writing of ECC keys to an OpenPGP card.  [#5163]
 * scd: Make an USB error fix specific to SPR532 readers.  [#5167]
 * dirmngr: With new LDAP keyservers store the new attributes.  Never
   store the useless pgpSignerID.  Fix a long standing bug storing
   some keys on an ldap server.
 * dirmngr: Support the new Active Direcory LDAP schema for
   keyservers.
 * dirmngr: Allow LDAP OpenPGP searches via fingerprint.
 * dirmngr: Do not block other threads during keyserver LDAP calls.
 * Support global configuration files.  [#4788]
 * Fix the iconv fallback handling to UTF-8.  [#5038]
 Release-info: https://dev.gnupg.org/T5153
2020-12-22 09:14:53 +00:00
Adam Weinberger 4c1a5e4c97 security/gnupg: Update to 2.2.25
* scd: Fix regression in 2.2.24 requiring gpg --card-status before
    signing or decrypting.  [#5065]

  * gpgsm: Using Libksba 1.5.0 signatures with a rarely used
    combination of attributes can now be verified.  [#5146]

  Release-info: https://dev.gnupg.org/T5140
2020-11-24 15:55:01 +00:00
Adam Weinberger 860d7ad91d security/gnupg: Update to 2.2.24
* Allow Unicode file names on Windows almost everywhere.  Note that
    it is still not possible to use Unicode strings on the command
    line.  This change also fixes a regression in 2.2.22 related to
    non-ascii file names.  [#5098]

  * Fix localized time printing on Windows.  [#5073]

  * gpg: New command --quick-revoke-sig.  [#5093]

  * gpg: Do not use weak digest algos if selected by recipient
    preference during sign+encrypt.  [4c181d51a6]

  * gpg: Switch to AES256 for symmetric encryption in de-vs mode.
    [166e779634]

  * gpg: Silence weak digest warnings with --quiet.  [#4893]

  * gpg: Print new status line CANCELED_BY_USER for a cancel during
    symmetric encryption.  [f05d1772c4]

  * gpg: Fix the encrypt+sign hash algo preference selection for
    ECDSA.  This is in particular needed for keys created from
    existing smartcard based keys.  [aeed0b93ff]

  * agent: Fix secret key import of GnuPG 2.3 generated Ed25519 keys.
    [#5114]

  * agent: Keep some permissions of private-keys-v1.d.  [#2312]

  * dirmngr: Align sks-keyservers.netCA.pem use between ntbtls and
    gnutls builds.  [e4f3b74c91]

  * dirmngr: Fix the pool keyserver case for a single host in the
    pool.  [72e04b03b1a7]

  * scd: Fix the use case of verify_chv2 by CHECKPIN.  [61aea64b3c]

  * scd: Various improvements to the ccid-driver.  [#4616,#5065]

  * scd: Minor fixes for Yubikey [25bec16d0b]

  * gpgconf: New option --show-versions.

  * w32: Install gpg-check-pattern and example profiles.  Install
    Windows subsystem variant of gpgconf (gpgconf-w32).

  * i18n: Complete overhaul and completion of the Italian translation.
    Thanks to Denis Renzi.

  * Require Libgcrypt 1.8 because 1.7 has long reached end-of-life.

  Release-info: https://dev.gnupg.org/T5052
2020-11-17 14:12:10 +00:00
Adam Weinberger f916fe70dd security/gnupg: Update to 2.2.23
Importing an OpenPGP key having a preference list for AEAD algorithms
will lead to an array overflow and thus often to a crash or other
undefined behaviour.

Importing an arbitrary key can often easily be triggered by an attacker
and thus triggering this bug.  Exploiting the bug aside from crashes is
not trivial but likely possible for a dedicated attacker.  The major
hurdle for an attacker is that only every second byte is under their
control with every first byte having a fixed value of 0x04.

Software distribution verification should not be affected by this bug
because such a system uses a curated list of keys.

MFH:		2020Q3
Security:	CVE-2020-25125
2020-09-04 02:12:38 +00:00
Adam Weinberger c0fac3c2a0 security/gnupg: Update to 2.2.22
Also, sort plist. The new gpgsplit binary is getting installed as
gpgsplit2 to avoid a conflict with security/gnupg1.

Noteworthy changes in version 2.2.22
====================================

  * gpg: Change the default key algorithm to rsa3072.

  * gpg: Add regular expression support for Trust Signatures on all
    platforms.  [#4843]

  * gpg: Fix regression in 2.2.21 with non-default --passphrase-repeat
    option.  [#4991]

  * gpg: Ignore --personal-digest-prefs for ECDSA keys.  [#5021]

  * gpgsm: Make rsaPSS a de-vs compliant scheme.

  * gpgsm: Show also the SHA256 fingerprint in key listings.

  * gpgsm: Do not require a default keyring for --gpgconf-list.  [#4867]

  * gpg-agent: Default to extended key format and record the creation
    time of keys.  Add new option --disable-extended-key-format.

  * gpg-agent: Support the WAYLAND_DISPLAY envvar.  [#5016]

  * gpg-agent: Allow using --gpgconf-list even if HOME does not
    exist.  [#4866]

  * gpg-agent: Make the Pinentry work even if the envvar TERM is set
    to the empty string.  [#4137]

  * scdaemon: Add a workaround for Gnuk tokens <= 2.15 which wrongly
    incremented the error counter when using the "verify" command of
    "gpg --edit-key" with only the signature key being present.

  * dirmngr: Better handle systems with disabled IPv6.  [#4977]

  * gpgpslit: Install tool.  It was not installed in the past to avoid
    conflicts with the version installed by GnuPG 1.4.  [#5023]
    (We're installing it as gpgsplit2 to avoid conflict with security/gnupg1)

  * gpgtar: Handle Unicode file names on Windows correctly (requires
    libgpg-error 1.39).  [#4083]

  * gpgtar: Make --files-from and --null work as documented.  [#5027]

  * Build the Windows installer with the new Ntbtls 0.2.0 so that TLS
    connections succeed for servers demanding GCM.

  Release-info: https://dev.gnupg.org/T5030
2020-08-27 19:58:01 +00:00
Adam Weinberger 3cde3d49f3 Unmute some build commands 2020-07-15 07:28:28 +00:00
Adam Weinberger 7986bb03ee gnupg: Update to 2.2.21
* gpg: Improve symmetric decryption speed by about 25%.
   See commit 144b95cc9d.

 * gpg: Support decryption of AEAD encrypted data packets.

 * gpg: Add option --no-include-key-block. [#4856]

 * gpg: Allow for extra padding in ECDH.  [#4908]

 * gpg: Only a single pinentry is shown for symmetric encryption if
   the pinentry supports this.  [#4971]

 * gpg: Print a note if no keys are given to --delete-key.  [#4959]

 * gpg,gpgsm: The ridiculous passphrase quality bar is not anymore
   shown.  [#2103]

 * gpgsm: Certificates without a CRL distribution point are now
   considered valid without looking up a CRL.  The new option
   --enable-issuer-based-crl-check can be used to revert to the
   former behaviour.

 * gpgsm: Support rsaPSS signature verification.  [#4538]

 * gpgsm: Unless CRL checking is disabled lookup a missing issuer
   certificate using the certificate's authorityInfoAccess.  [#4898]

 * gpgsm: Print the certificate's serial number also in decimal
   notation.

 * gpgsm: Fix possible NULL-deref in messages of --gen-key.  [#4895]

 * scd: Support the CardOS 5 based D-Trust Card 3.1.

 * dirmngr: Allow http URLs with "LOOKUP --url".

 * wkd: Take name of sendmail from configure.  Fixes an OpenBSD
   specific bug.  [#4886]

 Release-info: https://dev.gnupg.org/T4897
2020-07-09 13:27:13 +00:00
Adam Weinberger b670249eee gnupg: Update to 2.2.20
Noteworthy changes in version 2.2.20
====================================

  * Protect the error counter against overflow to guarantee that the
    tools can't be tricked into returning success after an error.

  * gpg: Make really sure that --verify-files always returns an error.

  * gpg: Fix key listing --with-secret if a pattern is given.  [#4061]

  * gpg: Fix detection of certain keys used as default-key.  [#4810]

  * gpg: Fix default-key selection when a card is available.  [#4850]

  * gpg: Fix key expiration and key usage for keys created with a
    creation date of zero.  [#4670]

  * gpgsm: Fix import of some CR,LF terminated certificates.  [#4847]

  * gpg: New options --include-key-block and --auto-key-import to
    allow encrypted replies after an initial signed message.  [#4856]

  * gpg: Allow the use of a fingerprint with --trusted-key. [#4855]

  * gpg: New property "fpr" for use by --export-filter.

  * scdaemon: Disable the pinpad if a KDF DO is used.  [#4832]

  * dirmngr: Improve finding OCSP certificates.  [#4536]

  * Avoid build problems with LTO or gcc-10. [#4831]

Release-info: https://dev.gnupg.org/T4860
2020-03-20 18:51:34 +00:00
Adam Weinberger eec5d26580 gnupg: Update to 2.2.19
* gpg: Fix double free when decrypting for hidden recipients.
    Regression in 2.2.18.  [#4762].

  * gpg: Use auto-key-locate for encryption even for mail addressed
    given with angle brackets.  [#4726]

  * gpgsm: Add special case for certain expired intermediate
    certificates.  [#4696]

  Release-info: https://dev.gnupg.org/T4768
2019-12-07 17:14:28 +00:00
Adam Weinberger 9bca8d99e8 gnupg: Update to 2.2.18
* gpg: Changed the way keys are detected on a smartcards; this
    allows the use of non-OpenPGP cards.  In the case of a not very
    likely regression the new option --use-only-openpgp-card is
    available.  [#4681]

  * gpg: The commands --full-gen-key and --quick-gen-key now allow
    direct key generation from supported cards.  [#4681]

  * gpg: Prepare against chosen-prefix SHA-1 collisions in key
    signatures.  This change removes all SHA-1 based key signature
    newer than 2019-01-19 from the web-of-trust.  Note that this
    includes all key signature created with dsa1024 keys.  The new
    option --allow-weak-key-signatues can be used to override the new
    and safer behaviour.  [#4755,CVE-2019-14855]

  * gpg: Improve performance for import of large keyblocks.  [#4592]

  * gpg: Implement a keybox compression run.  [#4644]

  * gpg: Show warnings from dirmngr about redirect and certificate
    problems (details require --verbose as usual).

  * gpg: Allow to pass the empty string for the passphrase if the
    '--passphase=' syntax is used.  [#4633]

  * gpg: Fix printing of the KDF object attributes.

  * gpg: Avoid surprises with --locate-external-key and certain
    --auto-key-locate settings.  [#4662]

  * gpg: Improve selection of best matching key.  [#4713]

  * gpg: Delete key binding signature when deletring a subkey.
    [#4665,#4457]

  * gpg: Fix a potential loss of key sigantures during import with
    self-sigs-only active.  [#4628]

  * gpg: Silence "marked as ultimately trusted" diagnostics if
    option --quiet is used.  [#4634]

  * gpg: Silence some diagnostics during in key listsing even with
    option --verbose.  [#4627]

  * gpg, gpgsm: Change parsing of agent's pkdecrypt results.  [#4652]

  * gpgsm: Support AES-256 keys.

  * gpgsm: Fix a bug in triggering a keybox compression run if
    --faked-system-time is used.

  * dirmngr: System CA certificates are no longer used for the SKS
    pool if GNUTLS instead of NTBTLS is used as TLS library.  [#4594]

  * dirmngr: On Windows detect usability of IPv4 and IPv6 interfaces
    to avoid long timeouts.  [#4165]

  * scd: Fix BWI value for APDU level transfers to make Gemalto Ezio
    Shield and Trustica Cryptoucan work.  [#4654,#4566]

  * wkd: gpg-wks-client --install-key now installs the required policy
    file.

  Release-info: https://dev.gnupg.org/T4684
2019-11-26 03:21:46 +00:00
Alan Somers a6aa3c3cd7 security/gnupg: add the --shared-access option to scdaemon
gnupg's scdaemon opens smart cards in exclusive mode, which prevents other
applications (such as PKCS#11 libraries) from concurrently accessing the
card). Upstream refuses to fix the problem. This commit adds a
--shared-access option to scdaemon. When enabled, scdaemon will access the
smart card in shared mode, playing nicely with other applications. The
default behavior is unchanged.

See Also:
https://github.com/GPGTools/MacGPG2/commit/d6cb8039a0cdc74b9bdd89a3dfa93248aa2c4100
https://dev.gnupg.org/T3267
https://dev.gnupg.org/D320
https://github.com/OpenSC/OpenSC/issues/953

Reviewed by:	adamw
Approved by:	adamw (maintainer)
Obtained-from:	GPGTools
Sponsored by:	Axcient
Differential Revision:	https://reviews.freebsd.org/D22473
2019-11-25 23:49:31 +00:00
Adam Weinberger 3e6fa0701f gnupg: Fix building on 11.3
Submitted by:	asomers
Differential Revision:	https://reviews.freebsd.org/D22492
2019-11-22 03:46:55 +00:00
Pietro Cerutti 6875e077c9 security/gnupg: fix build, texinfo is required for man pages too 2019-11-21 09:32:32 +00:00
Alan Somers 9858bcf321 security/gnupg: rebuild man pages on every build
gnupg ships its man pages as texinfo files, precompiled into info files.
This change causes make to rebuild them every time.  There are two reasons:

* Rebuilding them automatically corrects several Linuxisms in paths (e.g.
  /etc => /usr/local/etc).

* Rebuilding them is a neccessary precondition for making any local changes
  that will affect the content of the man pages, which I intend to do in a
  future commit.

Reviewed by:	adamw
Approved by:	adamw (maintainer)
Sponsored by:	Axcient
Differential Revision:	https://reviews.freebsd.org/D22471
2019-11-21 01:49:27 +00:00
Adam Weinberger a202ea161e gnupg: Spell "_DESC" correctly. It was missing 5 characters. 2019-08-26 15:06:31 +00:00
Adam Weinberger 1eaf6724ff gnupg: Add WKS_SERVER option
Requested by:	koobs
2019-08-26 15:01:02 +00:00
Adam Weinberger 7684d5fde6 gnupg: enable the WKS server
Cristoph Lukas asked me why the WKS server was disabled, and I have
no idea. It was added r462573, and that commit message and associated
bug report don't list why --disable-wks-tools was added. (Folks,
please use commit messages for writing, you know, messages.)

We've been installing the gpg-wks-server manpage, so this commit
enables the WKS server and installs the binary, and bumps PORTREVISION
for it.

While here, sort the plist.
2019-08-26 14:41:22 +00:00
Gerald Pfeifer ea8c8ec7da Bump PORTREVISION for ports depending on the canonical version of GCC
as defined in Mk/bsd.default-versions.mk which has moved from GCC 8.3
to GCC 9.1 under most circumstances now after revision 507371.

This includes ports
 - with USE_GCC=yes or USE_GCC=any,
 - with USES=fortran,
 - using Mk/bsd.octave.mk which in turn features USES=fortran, and
 - with USES=compiler specifying openmp, nestedfct, c11, c++0x, c++11-lang,
   c++11-lib, c++14-lang, c++17-lang, or gcc-c++11-lib
plus, everything INDEX-11 shows with a dependency on lang/gcc9 now.

PR:		238330
2019-07-26 20:46:53 +00:00
Adam Weinberger ec81de8e63 gnupg: Update to 2.2.17, with security fixes
* gpg: Ignore all key-signatures received from keyservers.  This
   change is required to mitigate a DoS due to keys flooded with
   faked key-signatures.  The old behaviour can be achieved by adding
     keyserver-options no-self-sigs-only,no-import-clean
   to your gpg.conf.  [#4607]

 * gpg: If an imported keyblocks is too large to be stored in the
   keybox (pubring.kbx) do not error out but fallback to an import
   using the options "self-sigs-only,import-clean".  [#4591]

 * gpg: New command --locate-external-key which can be used to
   refresh keys from the Web Key Directory or via other methods
   configured with --auto-key-locate.

 * gpg: New import option "self-sigs-only".

 * gpg: In --auto-key-retrieve prefer WKD over keyservers.  [#4595]

 * dirmngr: Support the "openpgpkey" subdomain feature from
   draft-koch-openpgp-webkey-service-07. [#4590].

 * dirmngr: Add an exception for the "openpgpkey" subdomain to the
   CSRF protection.  [#4603]

 * dirmngr: Fix endless loop due to http errors 503 and 504.  [#4600]

 * dirmngr: Fix TLS bug during redirection of HKP requests.  [#4566]

 * gpgconf: Fix a race condition when killing components.  [#4577]

 Release-info: https://dev.gnupg.org/T4606

MFH:		2019Q3
2019-07-09 15:54:43 +00:00
Adam Weinberger d8dd2c3425 Update gnupg to 2.2.16 2019-05-29 14:43:18 +00:00
Sunpoet Po-Chuan Hsieh 40c9c7f7eb Update devel/readline to 8.0
- Bump PORTREVISION of dependent ports for shlib change

Changes:	https://tiswww.case.edu/php/chet/readline/CHANGES
PR:		236156
Exp-run by:	antoine
2019-04-09 14:04:49 +00:00
Adam Weinberger b526986409 Update gnupg to 2.2.15
* sm: Fix --logger-fd and --status-fd on Windows for non-standard
    file descriptors.

  * sm: Allow decryption even if expired keys are configured.  [#4431]

  * agent: Change command KEYINFO to print ssh fingerprints with other
    hash algos.

  * dirmngr: Fix build problems on Solaris due to the use of reserved
    symbol names.  [#4420]

  * wkd: New commands --print-wkd-hash and --print-wkd-url for
    gpg-wks-client.

  Release-info: https://dev.gnupg.org/T4434
2019-03-27 02:18:50 +00:00
Adam Weinberger 0cd3ae1ab4 Update gnupg to 2.2.14, pet portlint, and remove a redundant readline
dependency.

  * gpg: Allow import of PGP desktop exported secret keys.  Also avoid
   importing secret keys if the secret keyblock is not valid.  [#4392]

  * gpg: Do not error out on version 5 keys in the local keyring.

  * gpg: Make invalid primary key algo obvious in key listings.

  * sm: Do not mark a certificate in a key listing as de-vs compliant
    if its use for a signature will not be possible.

  * sm: Fix certificate creation with key on card.

  * sm: Create rsa3072 bit certificates by default.

  * sm: Print Yubikey attestation extensions with --dump-cert.

  * agent: Fix cancellation handling for scdaemon.

  * agent: Support --mode=ssh option for CLEAR_PASSPHRASE.  [#4340]

  * scd: Fix flushing of the CA-FPR DOs in app-openpgp.

  * scd: Avoid a conflict error with the "undefined" app.

  * dirmngr: Add CSRF protection exception for protonmail.

  * dirmngr: Fix build problems with gcc 9 in libdns.

  * gpgconf: New option --show-socket for use wity --launch.

  * gpgtar: Make option -C work for archive creation.

  Release-info: https://dev.gnupg.org/T4412

PR:		236777
Submitted by:	Yasuhiro Kimura
2019-03-26 00:05:12 +00:00
Adam Weinberger eda30d66ba Update gnupg to 2.2.13
* gpg: Implement key lookup via keygrip (using the & prefix).

  * gpg: Allow generating Ed25519 key from existing key.

  * gpg: Emit an ERROR status line if no key was found with -k.

  * gpg: Stop early when trying to create a primary Elgamal key.  [#4329]

  * gpgsm: Print the card's key algorithms along with their keygrips
    in interactive key generation.

  * agent: Clear bogus pinentry cache in the error case.  [#4348]

  * scd: Support "acknowledge button" feature.

  * scd: Fix for USB INTERRUPT transfer.  [#4308]

  * wks: Do no use compression for the the encrypted challenge and
    response.

  Release-info: https://dev.gnupg.org/T4290
2019-02-13 02:37:12 +00:00
Adam Weinberger 37bd10d8d7 Update gnupg to 2.2.12
* tools: New commands --install-key and --remove-key for
    gpg-wks-client.  This allows to prepare a Web Key Directory on a
    local file system for later upload to a web server.

  * gpg: New --list-option "show-only-fpr-mbox".  This makes the use
    of the new gpg-wks-client --install-key command easier on Windows.

  * gpg: Improve processing speed when --skip-verify is used.

  * gpg: Fix a bug where a LF was accidentally written to the console.

  * gpg: --card-status now shwos whether a card has the new KDF
    feature enabled.

  * agent: New runtime option --s2k-calibration=MSEC.  New configure
    option --with-agent-s2k-calibration=MSEC.
    [https://dev.gnupg.org/T3399]

  * dirmngr: Try another keyserver from the pool on receiving a 502,
    503, or 504 error.  [https://dev.gnupg.org/T4175]

  * dirmngr: Avoid possible CSRF attacks via http redirects.  A HTTP
    query will not anymore follow a 3xx redirect unless the Location
    header gives the same host.  If the host is different only the
    host and port is taken from the Location header and the original
    path and query parts are kept.

  * dirmngr: New command FLUSHCRL to flush all CRLS from disk and
    memory.  [https://dev.gnupg.org/T3967]

  * New simplified Chinese translation (zh_CN).

  Release-info: https://dev.gnupg.org/T4289
2018-12-14 20:01:43 +00:00
Gerald Pfeifer a9f015d155 Bump PORTREVISION for ports depending on the canonical version of GCC
defined via Mk/bsd.default-versions.mk which has moved from GCC 7.4 t
GCC 8.2 under most circumstances.

This includes ports
 - with USE_GCC=yes or USE_GCC=any,
 - with USES=fortran,
 - using Mk/bsd.octave.mk which in turn features USES=fortran, and
 - with USES=compiler specifying openmp, nestedfct, c11, c++0x, c++11-lang,
   c++11-lib, c++14-lang, c++17-lang, or gcc-c++11-lib
plus, as a double check, everything INDEX-11 showed depending on lang/gcc7.

PR:		231590
2018-12-12 01:35:33 +00:00
Baptiste Daroussin 7990f81066 Install texinfo files (GNU info) into ${PREFIX}/share/info
After a discussion on the mailing list on moving manpages to
${PREFIX}/share/man for consistency with base where it is
installed in usr/share/man, it appeared the same should happen
to GNU info files which were installed under share in base and
not in ports.

Now texinfo is not in base on any of the supported version of FreeBSD
it is possible to proceed to this move and it is easier to do than
the manpage change.

Other benefit than consistency are less patching: all build tools but
cmake are expecting info files to be under share/info and cmake (patched here)
was having an exception for BSD so the patch makes FreeBSD case less
specific for them

Bump revision of all impacted ports

PR:		232907
exp-run by:	antoine
Differential Revision:	https://reviews.freebsd.org/D17816
2018-11-10 18:12:57 +00:00
Adam Weinberger 7aa4ea3010 Update gnupg to 2.2.11
* gpgsm: Fix CRL loading when intermediate certicates are not yet
    trusted.

  * gpgsm: Fix an error message about the digest algo.  [#4219]

  * gpg: Fix a wrong warning due to new sign usage check introduced
    with 2.2.9.  [#4014]

  * gpg: Print the "data source" even for an unsuccessful keyserver
    query.

  * gpg: Do not store the TOFU trust model in the trustdb.  This
    allows to enable or disable a TOFO model without triggering a
    trustdb rebuild.  [#4134]

  * scd: Fix cases of "Bad PIN" after using "forcesig".  [#4177]

  * agent: Fix possible hang in the ssh handler.  [#4221]

  * dirmngr: Tack the unmodified mail address to a WKD request.  See
    commit a2bd4a64e5b057f291a60a9499f881dd47745e2f for details.

  * dirmngr: Tweak diagnostic about missing LDAP server file.

  * dirmngr: In verbose mode print the OCSP responder id.

  * dirmngr: Fix parsing of the LDAP port.  [#4230]

  * wks: Add option --directory/-C to the server.  Always build the
    server on Unix systems.

  * wks: Add option --with-colons to the client.  Support sites which
    use the policy file instead of the submission-address file.

  * Fix EBADF when gpg et al. are called by broken CGI scripts.

  * Fix some minor memory leaks and bugs.

  Release-info: https://dev.gnupg.org/T4233
2018-11-07 04:30:18 +00:00
Joseph Mingrone 476b4755b9 security/gnupg: Add pkg-message about potential connectivity issues
GnuPG, when run on hosts without IPv6 connectivity, may fail to connect to
dual-stack hkp servers [1].  Describe a workaround in pkg-message.

[1] https://dev.gnupg.org/rGecfc4db3a2f8bc2652ba4ac4de5ca1cd13bfcbec

Approved by:	adamw (maintainer)
Differential Revision:	https://reviews.freebsd.org/D17071
2018-09-08 00:05:02 +00:00
Adam Weinberger 236a5f0444 Update gnupg to 2.2.10 and add LARGE_RSA option
The LARGE_RSA option [1] enables 8192-bit keys, though GnuPG's lead
author does not recommend using it routinely.

Also, sort OPTIONS, and move an explanation of the SUID option from
the Makefile into pkg-help, where it belongs.

Major changes:
  gpg: Refresh expired keys originating from the WKD.
  gpg: Use a 256 KiB limit for a WKD imported key.
  gpg: New option --known-notation.
  scd: Add support for the Trustica Cryptoucan reader.
  agent: Speed up starting during on-demand launching.
  dirmngr: Validate SRV records in WKD queries.
  Release-info: https://dev.gnupg.org/T4112

PR:		230610 [1]
Submitted by:	Dmitri Goutnik
Reported by:	p5B2E9A8F t online de
2018-08-30 14:45:55 +00:00
Gerald Pfeifer 09f9633cb6 Bump PORTREVISION for ports depending on the canonical version of GCC
in the ports tree (via Mk/bsd.default-versions.mk and lang/gcc) which
has now moved from GCC 6 to GCC 7 by default.

This includes ports
 - featuring USE_GCC=yes or USE_GCC=any,
 - featuring USES=fortran,
 - using Mk/bsd.octave.mk which in turn features USES=fortran, and those
 - with USES=compiler specifying one of openmp, nestedfct, c11, c++0x,
   c++11-lib, c++11-lang, c++14-lang, c++17-lang, or gcc-c++11-lib.

PR:		222542
2018-07-29 22:18:44 +00:00
Adam Weinberger c2c08d70ce Update gnupg to 2.2.9
* dirmngr: Fix recursive resolver mode and other bugs in the libdns
    code.  [#3374,#3803,#3610]

  * dirmngr: When using libgpg-error 1.32 or later a GnuPG build with
    NTBTLS support (e.g. the standard Windows installer) does not
    anymore block for dozens of seconds before returning data.  If you
    still have problems on Windows, please consider to use one of the
    options disable-ipv4 or disable-ipv6.

  * gpg: Fix bug in --show-keys which actually imported revocation
    certificates.  [#4017]

  * gpg: Ignore too long user-ID and comment packets.  [#4022]

  * gpg: Fix crash due to bad German translation.  Improved printf
    format compile time check.

  * gpg: Handle missing ISSUER sub packet gracefully in the presence of
    the new ISSUER_FPR.  [#4046]

  * gpg: Allow decryption using several passphrases in most cases.
    [#3795,#4050]

  * gpg: Command --show-keys now enables the list options
    show-unusable-uids, show-unusable-subkeys, show-notations and
    show-policy-urls by default.

  * gpg: Command --show-keys now prints revocation certificates. [#4018]

  * gpg: Add revocation reason to the "rev" and "rvs" records of the
    option --with-colons.  [#1173]

  * gpg: Export option export-clean does now remove certain expired
    subkeys; export-minimal removes all expired subkeys.  [#3622]

  * gpg: New "usage" property for the drop-subkey filters.  [#4019]

MFH:		2018Q3
2018-07-12 17:34:12 +00:00
Adam Weinberger a6ed0773de Update gnupg to 2.2.8 (security release)
CVE-2018-12020:
The OpenPGP protocol allows to include the file name of the original
input file into a signed or encrypted message.  During decryption and
verification the GPG tool can display a notice with that file name.  The
displayed file name is not sanitized and as such may include line feeds
or other control characters.  This can be used inject terminal control
sequences into the out and, worse, to fake the so-called status
messages.  These status messages are parsed by programs to get
information from gpg about the validity of a signature and an other
parameters.  Status messages are created with the option "--status-fd N"
where N is a file descriptor.  Now if N is 2 the status messages and the
regular diagnostic messages share the stderr output channel.  By using a
made up file name in the message it is possible to fake status messages.
Using this technique it is for example possible to fake the verification
status of a signed mail.

Also:
  * gpg: Decryption of messages not using the MDC mode will now lead
    to a hard failure even if a legacy cipher algorithm was used.  The
    option --ignore-mdc-error can be used to turn this failure into a
    warning.  Take care: Never use that option unconditionally or
    without a prior warning.

  * gpg: The MDC encryption mode is now always used regardless of the
    cipher algorithm or any preferences.  For testing --rfc2440 can be
    used to create a message without an MDC.

  * gpg: Sanitize the diagnostic output of the original file name in
    verbose mode.  [#4012,CVE-2018-12020]

  * gpg: Detect suspicious multiple plaintext packets in a more
    reliable way.  [#4000]

  * gpg: Fix the duplicate key signature detection code.  [#3994]

  * gpg: The options --no-mdc-warn, --force-mdc, --no-force-mdc,
    --disable-mdc and --no-disable-mdc have no more effect.

  * agent: Add DBUS_SESSION_BUS_ADDRESS and a few other envvars to the
    list of startup environment variables.  [#3947]

MFH:		2018Q2
Security:	CVE-2018-12020
2018-06-08 14:18:19 +00:00
Adam Weinberger 4efd2703d7 Update gnupg to 2.2.7
Also, remove unnecessary USE_LDCONFIG.

  * gpg: New option --no-symkey-cache to disable the passphrase cache
    for symmetrical en- and decryption.

  * gpg: The ERRSIG status now prints the fingerprint if that is part
    of the signature.

  * gpg: Relax emitting of FAILURE status lines

  * gpg: Add a status flag to "sig" lines printed with --list-sigs.

  * gpg: Fix "Too many open files" when using --multifile.  [#3951]

  * ssh: Return an error for unknown ssh-agent flags.  [#3880]

  * dirmngr: Fix a regression since 2.1.16 which caused corrupted CRL
    caches under Windows.  [#2448,#3923]

  * dirmngr: Fix a CNAME problem with pools and TLS.  Also use a fixed
    mapping of keys.gnupg.net to sks-keyservers.net.  [#3755]

  * dirmngr: Try resurrecting dead hosts earlier (from 3 to 1.5 hours).

  * dirmngr: Fallback to CRL if no default OCSP responder is configured.

  * dirmngr: Implement CRL fetching via https.  Here a redirection to
    http is explictly allowed.

  * dirmngr: Make LDAP searching and CRL fetching work under Windows.
    This stopped working with 2.1.  [#3937]

  * agent,dirmngr: New sub-command "getenv" for "getinfo" to ease
    debugging.
2018-05-04 12:31:32 +00:00
Adam Weinberger 61653224fa Update gnupg to 2.2.6
* gpg,gpgsm: New option --request-origin to pretend requests coming
    from a browser or a remote site.

  * gpg: Fix race condition on trustdb.gpg updates due to too early
    released lock.  [#3839]

  * gpg: Emit FAILURE status lines in almost all cases.  [#3872]

  * gpg: Implement --dry-run for --passwd to make checking a key's
    passphrase straightforward.

  * gpg: Make sure to only accept a certification capable key for key
    signatures.  [#3844]

  * gpg: Better user interaction in --card-edit for the factory-reset
    sub-command.

  * gpg: Improve changing key attributes in --card-edit by adding an
    explicit "key-attr" sub-command.  [#3781]

  * gpg: Print the keygrips in the --card-status.

  * scd: Support KDF DO setup.  [#3823]

  * scd: Fix some issues with PC/SC on Windows.  [#3825]

  * scd: Fix suspend/resume handling in the CCID driver.

  * agent: Evict cached passphrases also via a timer.  [#3829]

  * agent: Use separate passphrase caches depending on the request
    origin.  [#3858]

  * ssh: Support signature flags.  [#3880]

  * dirmngr: Handle failures related to missing IPv6 support
    gracefully.  [#3331]

  * Fix corner cases related to specified home directory with
    drive letter on Windows.  [#3720]

  * Allow the use of UNC directory names as homedir.  [#3818]
2018-04-11 00:56:56 +00:00
Adam Weinberger 717498cc34 Update gnupg to 2.2.5
Changes: https://lists.gnupg.org/pipermail/gnupg-announce/2018q1/000420.html
2018-02-23 14:24:18 +00:00
Adam Weinberger 26554b315d Update gnupg to 2.2.4. Bump the libassuan requirement to 2.5.1.
* gpg: Change default preferences to prefer SHA512.

  * gpg: Print a warning when more than 150 MiB are encrypted using a
    cipher with 64 bit block size.

  * gpg: Print a warning if the MDC feature has not been used for a
    message.

  * gpg: Fix regular expression of domain addresses in trust
    signatures. [#2923]

  * agent: New option --auto-expand-secmem to help with high numbers
    of concurrent connections.  Requires libgcrypt 1.8.2 for having
    an effect.  [#3530]

  * dirmngr: Cache responses of WKD queries.

  * gpgconf: Add option --status-fd.

  * wks: Add commands --check and --remove-key to gpg-wks-server.

  * Increase the backlog parameter of the daemons to 64 and add
    option --listen-backlog.

  * New configure option --enable-run-gnupg-user-socket to first try a
    socket directory which is not removed by systemd at session end.
2017-12-21 01:16:14 +00:00
Adam Weinberger 5b577018d7 Update to 2.2.3
* gpgsm: Fix initial keybox creation on Windows. [#3507]

 * dirmngr: Fix crash in case of a CRL loading error. [#3510]

 * Fix the name of the Windows registry key. [Git#4f5afaf1fd]

 * gpgtar: Fix wrong behaviour of --set-filename. [#3500]

 * gpg: Silence AKL retrieval messages. [#3504]

 * agent: Use clock or clock_gettime for calibration. [#3056]

 * agent: Improve robustness of the shutdown pending
   state. [Git#7ffedfab89]
2017-11-22 02:04:36 +00:00
Adam Weinberger b980bd5e23 Update to 2.2.2
Also, improve COMMENT, which conflicted with the pkg-descr.

 * gpg: Avoid duplicate key imports by concurrently running gpg
   processes. [#3446]

 * gpg: Fix creating on-disk subkey with on-card primary key. [#3280]

 * gpg: Fix validity retrieval for multiple keyrings. [Debian#878812]

 * gpg: Fix --dry-run and import option show-only for secret keys.

 * gpg: Print "sec" or "sbb" for secret keys with import option
   import-show. [#3431]

 * gpg: Make import less verbose. [#3397]

 * gpg: Add alias "Key-Grip" for parameter "Keygrip" and new
   parameter "Subkey-Grip" to unattended key generation.  [#3478]

 * gpg: Improve "factory-reset" command for OpenPGP cards.  [#3286]

 * gpg: Ease switching Gnuk tokens into ECC mode by using the magic
   keysize value 25519.

 * gpgsm: Fix --with-colon listing in crt records for fields > 12.

 * gpgsm: Do not expect X.509 keyids to be unique.  [#1644]

 * agent: Fix stucked Pinentry when using --max-passphrase-days. [#3190]

 * agent: New option --s2k-count.  [#3276 (workaround)]

 * dirmngr: Do not follow https-to-http redirects. [#3436]

 * dirmngr: Reduce default LDAP timeout from 100 to 15 seconds. [#3487]

 * gpgconf: Ignore non-installed components for commands
   --apply-profile and --apply-defaults. [#3313]

 * Add configure option --enable-werror.  [#2423]
2017-11-09 17:03:22 +00:00
Adam Weinberger 1de21ceb71 Update gnupg to 2.2.1, and remove the security/gnupg22 port
I misjudged the timeline for 2.3, and had not processed that the
intent of 2.3 is different from 2.1. Rather than 2.3 being a "modern"
branch and 2.2 being purely "stable," 2.3 will be development and
users are encouraged to remain on 2.2. Furthermore, upstream doesn't
expent a 2.3 release for a year or so.

Accordingly, I'm removing the gnupg22 port and updating security/gnupg
to be 2.2. gnugp20 is still scheduled for deletion at the end of the
year.
2017-09-19 18:31:49 +00:00
Gerald Pfeifer e59c88cece Bump PORTREVISION for ports depending on the canonical version of GCC
(via Mk/bsd.default-versions.mk and lang/gcc) which has moved from
GCC 5.4 to GCC 6.4 under most circumstances.

This includes ports
 - with USE_GCC=yes or USE_GCC=any,
 - with USES=fortran,
 - using Mk/bsd.octave.mk which in turn features USES=fortran, and
 - with USES=compiler specifying openmp, nestedfct, c++11-lib, c++11-lang,
   c++14-lang, c++0x, c11, or gcc-c++11-lib.

PR:		219275
2017-09-10 20:55:38 +00:00
Adam Weinberger 9c44649747 Add gnupg22 port. GnuPG 2.2 is the new LTS stable version. gnupg20 is
now marked for deprecation at the end of the year (when upstream support
for it will end). Users of gnupg20 should migrate to gnupg22.

The gnupg port is remaining at 2.1.x for now, as it's essentially the
same thing as 2.2.0. It will become 2.3 soon-ish.
2017-08-28 13:02:24 +00:00
Adam Weinberger 6f76556a84 Update to 2.1.23, and use the correct TEST_TARGET.
* gpg: Options --auto-key-retrieve and --auto-key-locate "local,wkd"
   are now used by default.  Note: this enables keyserver and Web Key
   Directory operators to notice when a signature from a locally
   non-available key is being verified for the first time or when
   you intend to encrypt to a mail address without having the key
   locally.  This new behaviour will eventually make key discovery
   much easier and mostly automatic.  Disable this by adding
     no-auto-key-retrieve
     auto-key-locate local
   to your gpg.conf.

 * agent: Option --no-grab is now the default.  The new option --grab
   allows to revert this.

 * gpg: New import option "show-only".

 * gpg: New option --disable-dirmngr to entirely disable network
   access for gpg.

 * gpg,gpgsm: Tweaked DE-VS compliance behaviour.

 * New configure flag --enable-all-tests to run more extensive tests
   during "make check".

 * gpgsm: The keygrip is now always printed in colon mode as
   documented in the man page.
2017-08-10 01:31:49 +00:00
Adam Weinberger cae62bb1e3 Update to 2.1.22.
Noteworthy changes in version 2.1.22
====================================

 * gpg: Extend command --quick-set-expire to allow for setting the
   expiration time of subkeys.

 * gpg: By default try to repair keys during import.  New sub-option
   no-repair-keys for --import-options.

 * gpg,gpgsm: Improved checking and reporting of DE-VS compliance.

 * gpg: New options --key-origin and --with-key-origin.  Store the
   time of the last key update from keyservers, WKD, or DANE.

 * agent: New option --ssh-fingerprint-digest.

 * dimngr: Lower timeouts on keyserver connection attempts and made
   it configurable.

 * dirmngr: Tor will now automatically be detected and used.  The
   option --no-use-tor disables Tor detection.

 * dirmngr: Now detects a changed /etc/resolv.conf.

 * agent,dirmngr: Initiate shutdown on removal of the GnuPG home
   directory.

 * gpg: Avoid caching passphrase for failed symmetric encryption.

 * agent: Support for unprotected ssh keys.

 * dirmngr: Fixed name resolving on systems using only v6
   nameservers.

 * dirmngr: Allow the use of TLS over http proxies.

 * w32: Change directory of the daemons after startup.

 * wks: New man pages for client and server.

A detailed description of the changes found in this 2.1 branch can be
found at <https://gnupg.org/faq/whats-new-in-2.1.html>.
2017-08-05 17:32:01 +00:00
Sunpoet Po-Chuan Hsieh cb037d3c98 Update devel/readline to 7.0 patch 3
- Bump PORTREVISION for shlib change

Changes:	https://cnswww.cns.cwru.edu/php/chet/readline/CHANGES
		https://lists.gnu.org/archive/html/bug-bash/2016-09/msg00107.html
		https://lists.gnu.org/archive/html/bug-readline/2017-01/msg00002.html
Differential Revision:	https://reviews.freebsd.org/D11172
PR:		219947
Exp-run by:	antoine
2017-06-27 13:46:53 +00:00
Adam Weinberger 1944908b44 Ignore errors about missing smartcard daemon.
It's an OPTION on FreeBSD, but 2.1.21 treated missing scdaemon as an
error.

PR:		219400
Submitted by:	Philip Jocks
Obtained from:	https://dev.gnupg.org/rGa8dd96826f8484c0ae93c954035b95c2a75c80f2
See also:	https://lists.gnupg.org/pipermail/gnupg-users/2017-May/058233.html
MFH:		2017Q2
2017-05-19 17:05:57 +00:00
Adam Weinberger a3920eae29 Update to 2.1.21, which in particular fixes a keyring corruption bug.
* gpg,gpgsm: Fix corruption of old style keyring.gpg files.  This
    bug was introduced with version 2.1.20.  Note that the default
    pubring.kbx format was not affected.

  * gpg,dirmngr: Removed the skeleton config file support.  The
    system's standard methods for providing default configuration
    files should be used instead.

  * w32: The Windows installer now allows installion of GnuPG without
    Administrator permissions.

  * gpg: Fixed import filter property match bug.

  * scd: Removed Linux support for Cardman 4040 PCMCIA reader.

  * scd: Fixed some corner case bugs in resume/suspend handling.

  * Many minor bug fixes and code cleanup.

MFH:		2017Q2
2017-05-15 22:24:13 +00:00
Adam Weinberger 693d393747 Update to 2.1.20.
* gpg: New properties 'expired', 'revoked', and 'disabled' for the
   import and export filters.

 * gpg: New command --quick-set-primary-uid.

 * gpg: New compliance field for the --with-colon key listing.

 * gpg: Changed the key parser to generalize the processing of local
   meta data packets.

 * gpg: Fixed assertion failure in the TOFU trust model.

 * gpg: Fixed exporting of zero length user ID packets.

 * scd: Improved support for multiple readers.

 * scd: Fixed timeout handling for key generation.

 * agent: New option --enable-extended-key-format.

 * dirmngr: Do not add a keyserver to a new dirmngr.conf.  Dirmngr
   uses a default keyserver.

 * dimngr: Do not treat TLS warning alerts as severe error when
   building with GNUTLS.

 * dirmngr: Actually take /etc/hosts in account.

 * wks: Fixed client problems on Windows.  Published keys are now set
   to world-readable.

 * tests: Fixed creation of temporary directories.

 * A socket directory for a non standard GNUGHOME is now created on
   the fly under /run/user.  Thus "gpgconf --create-socketdir" is now
   optional.  The use of "gpgconf --remove-socketdir" to clean up
   obsolete socket directories is however recommended to avoid
   cluttering /run/user with useless directories.

 * Fixed build problems on some platforms.
2017-04-03 20:53:48 +00:00
Gerald Pfeifer 04d6f52202 Bump PORTREVISIONs for ports depending on the canonical version of GCC and
lang/gcc which have moved from GCC 4.9.4 to GCC 5.4 (at least under some
circumstances such as versions of FreeBSD or platforms).

This includes ports
 - with USE_GCC=yes or USE_GCC=any,
 - with USES=fortran,
 - using using Mk/bsd.octave.mk which in turn has USES=fortran, and
 - with USES=compiler specifying openmp, nestedfct, c++11-lib, c++14-lang,
   c++11-lang, c++0x, c11, or gcc-c++11-lib.

PR:		216707
2017-04-01 15:23:30 +00:00