summaryrefslogtreecommitdiffstats
path: root/scd
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2008-09-29 17:02:55 +0200
committerWerner Koch <wk@gnupg.org>2008-09-29 17:02:55 +0200
commit7d63aa42e5d2c086810e3d7eca64a01f366b4e88 (patch)
tree7dccaebaa7f86d56fef8beb00eb9c2bc583ede20 /scd
parent2008-09-28 Marcus Brinkmann <marcus@g10code.com> (diff)
downloadgnupg2-7d63aa42e5d2c086810e3d7eca64a01f366b4e88.tar.xz
gnupg2-7d63aa42e5d2c086810e3d7eca64a01f366b4e88.zip
Remove hacks which are not anymore needed since we now require Libgcrypt 1.4
Diffstat (limited to 'scd')
-rw-r--r--scd/ChangeLog6
-rw-r--r--scd/app-p15.c8
-rw-r--r--scd/scdaemon.h6
3 files changed, 13 insertions, 7 deletions
diff --git a/scd/ChangeLog b/scd/ChangeLog
index c2d5916ae..dec9d87d5 100644
--- a/scd/ChangeLog
+++ b/scd/ChangeLog
@@ -1,3 +1,9 @@
+2008-09-29 Werner Koch <wk@g10code.com>
+
+ * scdaemon.h (GCRY_MD_USER): Rename to GCRY_MODULE_ID_USER.
+ (GCRY_MD_USER_TLS_MD5SHA1): Rename to MD_USER_TLS_MD5SHA1 and
+ change all users.
+
2008-09-28 Marcus Brinkmann <marcus@g10code.com>
* apdu.c (pcsc_get_status): Fix last change.
diff --git a/scd/app-p15.c b/scd/app-p15.c
index 31fb77ed4..4ac18d61a 100644
--- a/scd/app-p15.c
+++ b/scd/app-p15.c
@@ -2948,7 +2948,7 @@ do_sign (app_t app, const char *keyidstr, int hashalgo,
mse[0] = 4; /* Length of the template. */
mse[1] = 0x80; /* Algorithm reference tag. */
- if (hashalgo == GCRY_MD_USER_TLS_MD5SHA1)
+ if (hashalgo == MD_USER_TLS_MD5SHA1)
mse[2] = 0x01; /* Let card do pkcs#1 0xFF padding. */
else
mse[2] = 0x02; /* RSASSA-PKCS1-v1.5 using SHA1. */
@@ -3124,7 +3124,7 @@ do_sign (app_t app, const char *keyidstr, int hashalgo,
if (indatalen == 36)
{
/* No ASN.1 container used. */
- if (hashalgo != GCRY_MD_USER_TLS_MD5SHA1)
+ if (hashalgo != MD_USER_TLS_MD5SHA1)
return gpg_error (GPG_ERR_UNSUPPORTED_ALGORITHM);
memcpy (data, indata, indatalen);
}
@@ -3187,7 +3187,7 @@ do_sign (app_t app, const char *keyidstr, int hashalgo,
return err;
}
- if (hashalgo == GCRY_MD_USER_TLS_MD5SHA1)
+ if (hashalgo == MD_USER_TLS_MD5SHA1)
err = iso7816_compute_ds (app->slot, data, 36, outdata, outdatalen);
else if (no_data_padding)
err = iso7816_compute_ds (app->slot, data+15, 20, outdata, outdatalen);
@@ -3226,7 +3226,7 @@ do_auth (app_t app, const char *keyidstr,
return gpg_error (GPG_ERR_WRONG_KEY_USAGE);
}
- algo = indatalen == 36? GCRY_MD_USER_TLS_MD5SHA1 : GCRY_MD_SHA1;
+ algo = indatalen == 36? MD_USER_TLS_MD5SHA1 : GCRY_MD_SHA1;
return do_sign (app, keyidstr, algo, pincb, pincb_arg,
indata, indatalen, outdata, outdatalen);
}
diff --git a/scd/scdaemon.h b/scd/scdaemon.h
index bfc9f358e..054aaa0f6 100644
--- a/scd/scdaemon.h
+++ b/scd/scdaemon.h
@@ -33,10 +33,10 @@
/* To convey some special hash algorithms we use algorithm numbers
reserved for application use. */
-#ifndef GCRY_MD_USER
-#define GCRY_MD_USER 1024
+#ifndef GCRY_MODULE_ID_USER
+#define GCRY_MODULE_ID_USER 1024
#endif
-#define GCRY_MD_USER_TLS_MD5SHA1 (GCRY_MD_USER+1)
+#define MD_USER_TLS_MD5SHA1 (GCRY_MODULE_ID_USER+1)
/* Maximum length of a digest. */
#define MAX_DIGEST_LEN 36