Browse Source

n/gnupg2: Upgraded to gnupg-2.1.2.

slackware-14.2
Damien Goutte-Gattat 7 years ago
parent
commit
ef303725e6
  1. 61
      n/gnupg2/gnupg-2.1.1-fix-keybox-search.patch
  2. 1
      n/gnupg2/gnupg-2.1.1.tar.bz2.sha1
  3. 1
      n/gnupg2/gnupg-2.1.2.tar.bz2.sha1
  4. 7
      n/gnupg2/gnupg2.SlackBuild

61
n/gnupg2/gnupg-2.1.1-fix-keybox-search.patch

@ -1,61 +0,0 @@
commit b55709d72f46ec6cdf411874df3dbdb716288ed1
Author: Damien Goutte-Gattat <dgouttegattat@incenp.org>
Date: Fri Dec 26 14:51:41 2014 +0100
kbx: Call skipfnc callback to filter out keys
When searching for keys, extract the key ID from the blob we
found and apply the skipfnc callback function (if any) to filter
out any keys that the caller does not want.
diff --git a/kbx/keybox-search.c b/kbx/keybox-search.c
index 6e72d0b..2126ece 100644
--- a/kbx/keybox-search.c
+++ b/kbx/keybox-search.c
@@ -79,6 +79,30 @@ blob_get_blob_flags (KEYBOXBLOB blob)
}
+static int
+blob_get_keyid (KEYBOXBLOB blob, u32 *kid)
+{
+ const unsigned char *buffer;
+ size_t length, keyinfolen;
+
+ buffer = _keybox_get_blob_image (blob, &length);
+ if (length < 48)
+ return 0; /* blob too short */
+
+ if (buffer[4] != KEYBOX_BLOBTYPE_PGP)
+ return 0; /* don't know what to do with X.509 blobs */
+
+ keyinfolen = get16 (buffer + 18);
+ if (keyinfolen < 28)
+ return 0; /* invalid blob */
+
+ kid[0] = get32 (buffer + 32);
+ kid[1] = get32 (buffer + 36);
+
+ return 1;
+}
+
+
/* Return information on the flag WHAT within the blob BUFFER,LENGTH.
Return the offset and the length (in bytes) of the flag in
FLAGOFF,FLAG_SIZE. */
@@ -967,9 +991,12 @@ keybox_search (KEYBOX_HANDLE hd, KEYBOX_SEARCH_DESC *desc, size_t ndesc,
*r_descindex = n;
for (n=any_skip?0:ndesc; n < ndesc; n++)
{
-/* if (desc[n].skipfnc */
-/* && desc[n].skipfnc (desc[n].skipfncvalue, aki, NULL)) */
-/* break; */
+ u32 kid[2];
+
+ if (desc[n].skipfnc
+ && blob_get_keyid (blob, kid)
+ && desc[n].skipfnc (desc[n].skipfncvalue, kid, NULL))
+ break;
}
if (n == ndesc)
break; /* got it */

1
n/gnupg2/gnupg-2.1.1.tar.bz2.sha1

@ -1 +0,0 @@
3d11fd150cf86f842d077437edb119a775c7325d gnupg-2.1.1.tar.bz2

1
n/gnupg2/gnupg-2.1.2.tar.bz2.sha1

@ -0,0 +1 @@
7e972cb9af47d9b8ce164dcf37fc4f32634d6cd6 gnupg-2.1.2.tar.bz2

7
n/gnupg2/gnupg2.SlackBuild

@ -1,6 +1,6 @@
#!/bin/bash
# Build script for Slackware
# Copyright (C) 2014 Damien Goutte-Gattat
# Copyright (C) 2014,2015 Damien Goutte-Gattat
#
# Redistribution and use of this script, with or without modifications,
# is permitted provided that the following conditions are met:
@ -28,13 +28,13 @@
# Source package infos
NAMESRC=${NAMESRC:-gnupg}
VERSION=${VERSION:-2.1.1}
VERSION=${VERSION:-2.1.2}
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.bz2}
WGET=${WGET:-ftp://ftp.gnupg.org/gcrypt/gnupg/$ARCHIVE}
# Build infos
NAMEPKG=${NAMEPKG:-gnupg2}
BUILD=${BUILD:-2GGD}
BUILD=${BUILD:-1GGD}
ARCH=${ARCH:-$(uname -m | sed 's/^i.86$/i486/;s/^arm.*/arm/')}
JOBS=${JOBS:-1}
EXT=${EXT:-txz}
@ -85,7 +85,6 @@ cd $TMP
echo "Building $ARCHIVE..."
tar xf $CWD/$ARCHIVE
cd $NAME
patch -p 1 < $CWD/gnupg-2.1.1-fix-keybox-search.patch
CFLAGS=$CPUOPT \
CXXFLAGS=$CPUOPT \
./configure \

Loading…
Cancel
Save