diff options
author | joerg <joerg@pkgsrc.org> | 2014-05-27 09:59:53 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2014-05-27 09:59:53 +0000 |
commit | 6ebf65ea040002377a255933d1a6d1a16cff38f6 (patch) | |
tree | 3b56de6e4b8b5ad3e50641770deec08c1419fb1e /security | |
parent | 037924478f94668120add38ab35a350017603dfb (diff) | |
download | pkgsrc-6ebf65ea040002377a255933d1a6d1a16cff38f6.tar.gz |
Fix build against newer libguardtime.
Diffstat (limited to 'security')
-rw-r--r-- | security/guardtime/distinfo | 3 | ||||
-rw-r--r-- | security/guardtime/patches/patch-gtime-test.c | 48 |
2 files changed, 50 insertions, 1 deletions
diff --git a/security/guardtime/distinfo b/security/guardtime/distinfo index 11cbb16832b..d66cdca87fa 100644 --- a/security/guardtime/distinfo +++ b/security/guardtime/distinfo @@ -1,5 +1,6 @@ -$NetBSD: distinfo,v 1.1 2013/07/03 13:37:36 jperkin Exp $ +$NetBSD: distinfo,v 1.2 2014/05/27 09:59:53 joerg Exp $ SHA1 (gtime-1.0-12.tar.gz) = ed4649f807fc6cf9d125d9ad999ebb368939dbcc RMD160 (gtime-1.0-12.tar.gz) = b3d7f9bd8ae10292c64ca60fbeb2c7d23da8c71e Size (gtime-1.0-12.tar.gz) = 115134 bytes +SHA1 (patch-gtime-test.c) = ebffb36a79bf9d943a47420e2b9cbd1860f800cf diff --git a/security/guardtime/patches/patch-gtime-test.c b/security/guardtime/patches/patch-gtime-test.c new file mode 100644 index 00000000000..5e3f9ed24ba --- /dev/null +++ b/security/guardtime/patches/patch-gtime-test.c @@ -0,0 +1,48 @@ +$NetBSD: patch-gtime-test.c,v 1.1 2014/05/27 09:59:53 joerg Exp $ + +--- gtime-test.c.orig 2014-05-26 19:10:53.000000000 +0000 ++++ gtime-test.c +@@ -1173,7 +1173,6 @@ int parse_digest(char *arg, GTDataHash * + int alg_id; + const EVP_MD *evp_md; + int len; +- GTDataHash *tmp_data_hash = NULL; + unsigned char* tmp_hash = NULL; + size_t tmp_length; + +@@ -1203,13 +1202,6 @@ int parse_digest(char *arg, GTDataHash * + } + } + +- tmp_data_hash = (GTDataHash *) GT_malloc(sizeof(GTDataHash)); +- if (tmp_data_hash == NULL) { +- res = GT_OUT_OF_MEMORY; +- goto e; +- } +- tmp_data_hash->digest = NULL; +- tmp_data_hash->context = NULL; + tmp_length = EVP_MD_size(evp_md); + tmp_hash = (unsigned char *) GT_malloc(tmp_length); + if (tmp_hash == NULL) { +@@ -1233,20 +1225,12 @@ int parse_digest(char *arg, GTDataHash * + tmp_hash[j] = ch; + } + } +- tmp_data_hash->digest = tmp_hash; +- tmp_hash = NULL; +- tmp_data_hash->digest_length = tmp_length; +- tmp_data_hash->algorithm = alg_id; +- *data_hash = tmp_data_hash; +- tmp_data_hash = NULL; +- +- res = GT_OK; ++ res = GTDataHash_fromAlgorithmAndValue(alg_id, tmp_hash, tmp_length, data_hash); + + e: + if (res == GT_OUT_OF_MEMORY) + fprintf(stderr, "%s\n", GT_getErrorString(res)); + GT_free(tmp_hash); +- GTDataHash_free(tmp_data_hash); + return res; + } + |