Browse Source

n/gnupg2: Unapply useless patch.

slackware-14.2
Damien Goutte-Gattat 7 years ago
parent
commit
1206adbf2e
  1. 4
      n/gnupg2/gnupg-2.0.26-gpgsm-sha2.diff
  2. 61
      n/gnupg2/gnupg-2.0.26-tls12.diff
  3. 3
      n/gnupg2/gnupg2.SlackBuild

4
n/gnupg2/gnupg-2.0.26-gpgsm-sha2.diff

@ -1,10 +1,10 @@
commit 24f480c75323bb692848759b71f88a4f1cd5dbde
commit 431f4a3e4db197a663264d628cd7db4b0352f64c
Author: Damien Goutte-Gattat <dgouttegattat@incenp.org>
Date: Sun Sep 7 13:53:13 2014 +0200
Fix usage of SHA-2 algorithm with OpenPGP cards.
Backport commit 1c0çdef22d97de3738a2bec4970504bfc155680b into the
Backport commit 1c09def22d97de3738a2bec4970504bfc155680b into the
2.0.26 version.
diff --git a/agent/agent.h b/agent/agent.h

61
n/gnupg2/gnupg-2.0.26-tls12.diff

@ -1,61 +0,0 @@
diff --git a/agent/agent.h b/agent/agent.h
index 938a9aa..6431bb2 100644
--- a/agent/agent.h
+++ b/agent/agent.h
@@ -41,6 +41,7 @@
#define GCRY_MODULE_ID_USER 1024
#endif
#define MD_USER_TLS_MD5SHA1 (GCRY_MODULE_ID_USER+1)
+#define MD_USER_TLS_DIGEST (GCRY_MODULE_ID_USER+2)
/* Maximum length of a digest. */
#define MAX_DIGEST_LEN 64
diff --git a/agent/command.c b/agent/command.c
index 2405c54..31e7b93 100644
--- a/agent/command.c
+++ b/agent/command.c
@@ -624,6 +624,8 @@ cmd_sethash (assuan_context_t ctx, char *line)
algo = GCRY_MD_MD5;
else if (has_option (line, "--hash=tls-md5sha1"))
algo = MD_USER_TLS_MD5SHA1;
+ else if (has_option (line, "--hash=tls-digest"))
+ algo = MD_USER_TLS_DIGEST;
else
return set_error (GPG_ERR_ASS_PARAMETER, "invalid hash algorithm");
}
@@ -651,6 +653,8 @@ cmd_sethash (assuan_context_t ctx, char *line)
n /= 2;
if (algo == MD_USER_TLS_MD5SHA1 && n == 36)
;
+ else if (algo == MD_USER_TLS_DIGEST && (n == 35 || n == 51))
+ ;
else if (n != 16 && n != 20 && n != 24
&& n != 28 && n != 32 && n != 48 && n != 64)
return set_error (GPG_ERR_ASS_PARAMETER, "unsupported length of hash");
diff --git a/agent/divert-scd.c b/agent/divert-scd.c
index 1f36f6e..b3c1301 100644
--- a/agent/divert-scd.c
+++ b/agent/divert-scd.c
@@ -342,7 +342,7 @@ divert_pksign (ctrl_t ctrl,
if (rc)
return rc;
- if (algo == MD_USER_TLS_MD5SHA1)
+ if (algo == MD_USER_TLS_MD5SHA1 || algo == MD_USER_TLS_DIGEST)
{
int save = ctrl->use_auth_call;
ctrl->use_auth_call = 1;
diff --git a/agent/pksign.c b/agent/pksign.c
index 25cadb2..9f19478 100644
--- a/agent/pksign.c
+++ b/agent/pksign.c
@@ -184,7 +184,8 @@ agent_pksign_do (ctrl_t ctrl, const char *desc_text,
gcry_sexp_t s_hash = NULL;
/* Put the hash into a sexp */
- if (ctrl->digest.algo == MD_USER_TLS_MD5SHA1)
+ if (ctrl->digest.algo == MD_USER_TLS_MD5SHA1
+ || ctrl->digest.algo == MD_USER_TLS_DIGEST)
rc = do_encode_raw_pkcs1 (ctrl->digest.value,
ctrl->digest.valuelen,
gcry_pk_get_nbits (s_skey),

3
n/gnupg2/gnupg2.SlackBuild

@ -36,7 +36,7 @@ WGET=${WGET:-ftp://ftp.gnupg.org/gcrypt/gnupg/$ARCHIVE}
# Build infos
NAMEPKG=${NAMEPKG:-gnupg2}
BUILD=${BUILD:-2GGD}
BUILD=${BUILD:-4GGD}
ARCH=${ARCH:-$(uname -m | sed 's/^i.86$/i486/;s/^arm.*/arm/')}
JOBS=${JOBS:-1}
EXT=${EXT:-txz}
@ -87,7 +87,6 @@ cd $TMP
echo "Building $ARCHIVE..."
tar xf $CWD/$ARCHIVE
cd $NAME
patch -p 1 < $CWD/gnupg-2.0.26-tls12.diff
patch -p 1 < $CWD/gnupg-2.0.26-gpgsm-sha2.diff
CFLAGS=$CPUOPT \
CXXFLAGS=$CPUOPT \

Loading…
Cancel
Save