[Pkg-gnutls-commits] r616 - in /packages/libtasn1-3/trunk/debian: TestIndef.p12.base64 changelog patches/10_fixpkcs12_import.patch patches/20_autoff.diff rules
ametzler at users.alioth.debian.org
ametzler at users.alioth.debian.org
Sun Nov 16 15:05:14 UTC 2008
Author: ametzler
Date: Sun Nov 16 15:05:13 2008
New Revision: 616
URL: http://svn.debian.org/wsvn/pkg-gnutls/?sc=1&rev=616
Log:
* Cherry-pick the patch for handling BER encoded certificates without the ABI
breakage introduced by tree optimization from upstream git.
* Also add resulting patchlet for tests/Makefile.in and TestIndef.p12
(Binary file), fixing FTBFS. Closes: #504783
Added:
packages/libtasn1-3/trunk/debian/TestIndef.p12.base64
packages/libtasn1-3/trunk/debian/patches/20_autoff.diff
Modified:
packages/libtasn1-3/trunk/debian/changelog
packages/libtasn1-3/trunk/debian/patches/10_fixpkcs12_import.patch
packages/libtasn1-3/trunk/debian/rules
Added: packages/libtasn1-3/trunk/debian/TestIndef.p12.base64
URL: http://svn.debian.org/wsvn/pkg-gnutls/packages/libtasn1-3/trunk/debian/TestIndef.p12.base64?rev=616&op=file
==============================================================================
--- packages/libtasn1-3/trunk/debian/TestIndef.p12.base64 (added)
+++ packages/libtasn1-3/trunk/debian/TestIndef.p12.base64 Sun Nov 16 15:05:13 2008
@@ -1,0 +1,53 @@
+MIACAQMwgAYJKoZIhvcNAQcBoIAkgASCA+gwgDCABgkqhkiG9w0BBwGggCSABIIDFTCCAxEw
+ggMNBgsqhkiG9w0BDAoBAqCCArIwggKuMCgGCiqGSIb3DQEMAQMwGgQUaltGEc2/k210Gfzb
+xa17pKmsABkCAgQABIICgBoePOhlfMWgUuy2tpyn7/vWLcNcX4nJ9p6ZbaSNf8UmcFHareY1
+YsYstu90ardDSpClimJW4R/jQiHiEb//AMzFZZAfoJ1akdl3eOGVGT3Lx/eAR3bvtEstBtKy
+I+biS/LM8xOiGiMKqk1W4e2YwWJv38H2NyEKY5j3rOxaZEywS2jah5SoIhajdNUDKwPUTu5B
+MxV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B1tdn9LA4ROwDos0IU3efNmzO5Hgx
+b0b0oIcIbrOXUC5U22Ii/Jgrd3Phc+suRYBybnW3JgPR9kkYAeGohvtG60tOn2Wj5zyxE7rQ
+VWvaZNvqzMCPKINAHtpP1m63erPKt6gSfflzPKK5i9jbZfwRggxR+34AAAAAAAAAAAAAAAAA
+AAAAAAAwPTAhMAkGBSsOAwIaBQAEFMJL7A+b+/XYmatEKWIogZQzwP4HBBTVIS6IRpQrpCDw
+N3jm7GO59TmUlwICBAAAAA==
Modified: packages/libtasn1-3/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnutls/packages/libtasn1-3/trunk/debian/changelog?rev=616&op=diff
==============================================================================
--- packages/libtasn1-3/trunk/debian/changelog (original)
+++ packages/libtasn1-3/trunk/debian/changelog Sun Nov 16 15:05:13 2008
@@ -1,8 +1,11 @@
-libtasn1-3 (1.5-3) UNRELEASED; urgency=low
-
- * NOT RELEASED YET
-
- -- Andreas Metzler <ametzler at debian.org> Thu, 06 Nov 2008 20:47:57 +0100
+libtasn1-3 (1.5-3) experimental; urgency=low
+
+ * Cherry-pick the patch for handling BER encoded certificates without the ABI
+ breakage introduced by tree optimization from upstream git.
+ * Also add resulting patchlet for tests/Makefile.in and TestIndef.p12
+ (Binary file), fixing FTBFS. Closes: #504783
+
+ -- Andreas Metzler <ametzler at debian.org> Sun, 16 Nov 2008 15:27:50 +0100
libtasn1-3 (1.5-2) experimental; urgency=low
Modified: packages/libtasn1-3/trunk/debian/patches/10_fixpkcs12_import.patch
URL: http://svn.debian.org/wsvn/pkg-gnutls/packages/libtasn1-3/trunk/debian/patches/10_fixpkcs12_import.patch?rev=616&op=diff
==============================================================================
--- packages/libtasn1-3/trunk/debian/patches/10_fixpkcs12_import.patch (original)
+++ packages/libtasn1-3/trunk/debian/patches/10_fixpkcs12_import.patch Sun Nov 16 15:05:13 2008
@@ -1,63 +1,16 @@
-http://lists.gnu.org/archive/html/gnutls-devel/2008-11/msg00000.html
-
-Message-ID: <490D9A4E.3090003 at gnutls.org>
-Date: Sun, 02 Nov 2008 14:17:18 +0200
-From: Nikos Mavrogiannopoulos <nmav at gnutls.org>
-Cc: gnutls-devel at gnu.org
-Subject: Re: Unparseable PKCS#12 cert
-
-This is a multi-part message in MIME format.
---------------010005090605070003070608
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 7bit
-
-Joe Orton wrote:
-> Hi folks, I've attached a PKCS#12 file which was apparently produced by
-> the Bouncy Castle Java crypto toolkit; GnuTLS 2.5.6 + libtasn1 1.3 can't
-> parse it. I haven't attempted to debug this any further.
->
-> OpenSSL can parse it, though PKCS12_parse() failed to pair up the key
-> and cert correctly (instead giving the key and embedded CA cert), which
-> is why I heard about this. Just happened to try this cert with GnuTLS
-> too.
->
-> $ bin/certtool --p12-info --infile ~/TestUser.p12 --inder
-> bin/certtool: p12_import: ASN1 parser: Error in TAG.
->
-> The encryption password is "password".
-
-The attached patch to libtasn1 should solve this issue[0]. It seems the
-mozilla pkcs12 structure is BER encoded and our decoder worked with DER
-data. Still our decoder lacks full BER support but at least with this
-patch it can decode this structure.
-
-regards,
-Nikos
-
-[0]. It also contains some optimizations in the libtasn1 tree generation.
-
---------------010005090605070003070608
-Content-Type: text/x-patch;
- name="libtasn1.patch"
-Content-Transfer-Encoding: 7bit
-Content-Disposition: inline;
- filename="libtasn1.patch"
-
diff --git a/NEWS b/NEWS
-index 641646b..93d9494 100644
+index 037dc37..a08f07a 100644
--- a/NEWS
+++ b/NEWS
-@@ -1,6 +1,8 @@
- Version 1.5 (unreleased)
+@@ -1,3 +1,6 @@
++Version 1.6 (unreleased)
++- Decoder can now decode BER encoded octet strings
++
+ Version 1.5 (released 2008-07-29)
- Update gnulib files.
- Fix memory leaks, from Christian Grothoff <christian at grothoff.org>.
-+- Optimized tree generation
-+- Decoder can now decode BER encoded octet strings
-
- Version 1.4 (released 2008-04-21)
- - Update gnulib files.
diff --git a/lib/decoding.c b/lib/decoding.c
-index c1de9e6..51ecc01 100644
+index c1de9e6..0184fff 100644
--- a/lib/decoding.c
+++ b/lib/decoding.c
@@ -33,8 +33,10 @@
@@ -72,25 +25,7 @@
_asn1_error_description_tag_error (node_asn * node, char *ErrorDescription)
{
-@@ -101,8 +103,6 @@ asn1_get_length_der (const unsigned char *der, int der_len, int *len)
- }
-
-
--
--
- /**
- * asn1_get_tag_der:
- * @der: DER data to decode.
-@@ -121,7 +121,7 @@ asn1_get_tag_der (const unsigned char *der, int der_len,
- {
- int punt, ris;
-
-- if (der == NULL || der_len <= 0 || len == NULL)
-+ if (der == NULL || der_len < 2 || len == NULL)
- return ASN1_DER_ERROR;
-
- *cls = der[0] & 0xE0;
-@@ -160,8 +160,36 @@ asn1_get_tag_der (const unsigned char *der, int der_len,
+@@ -160,8 +162,36 @@ asn1_get_tag_der (const unsigned char *der, int der_len,
return ASN1_SUCCESS;
}
@@ -129,17 +64,7 @@
/**
* asn1_get_octet_der:
-@@ -268,9 +296,6 @@ _asn1_get_objectid_der (const unsigned char *der, int der_len, int *ret_len,
- *ret_len = len + len_len;
- }
-
--
--
--
- /**
- * asn1_get_bit_der:
- * @der: DER data to decode containing the BIT SEQUENCE.
-@@ -349,15 +374,21 @@ _asn1_extract_tag_der (node_asn * node, const unsigned char *der, int der_len,
+@@ -349,15 +379,21 @@ _asn1_extract_tag_der (node_asn * node, const unsigned char *der, int der_len,
(der + counter, der_len - counter, &class, &len2,
&tag) != ASN1_SUCCESS)
return ASN1_DER_ERROR;
@@ -162,23 +87,7 @@
if (!is_tag_implicit)
{
if ((class != (class2 | ASN1_CLASS_STRUCTURED)) ||
-@@ -369,7 +400,6 @@ _asn1_extract_tag_der (node_asn * node, const unsigned char *der, int der_len,
- if ((class != class_implicit) || (tag != tag_implicit))
- return ASN1_TAG_ERROR;
- }
--
- is_tag_implicit = 0;
- }
- else
-@@ -425,6 +455,7 @@ _asn1_extract_tag_der (node_asn * node, const unsigned char *der, int der_len,
- (der + counter, der_len - counter, &class, &len2,
- &tag) != ASN1_SUCCESS)
- return ASN1_DER_ERROR;
-+
- if (counter + len2 > der_len)
- return ASN1_DER_ERROR;
-
-@@ -565,12 +596,52 @@ _asn1_delete_not_used (node_asn * node)
+@@ -565,12 +601,52 @@ _asn1_delete_not_used (node_asn * node)
return ASN1_SUCCESS;
}
@@ -233,7 +142,7 @@
counter = 0;
-@@ -617,43 +688,20 @@ _asn1_get_octet_string (const unsigned char *der, node_asn * node, int *len)
+@@ -617,43 +693,20 @@ _asn1_get_octet_string (const unsigned char *der, node_asn * node, int *len)
/* copy */
if (node)
{
@@ -286,7 +195,7 @@
}
}
else
-@@ -673,8 +721,7 @@ _asn1_get_octet_string (const unsigned char *der, node_asn * node, int *len)
+@@ -673,8 +726,7 @@ _asn1_get_octet_string (const unsigned char *der, node_asn * node, int *len)
}
@@ -296,7 +205,7 @@
_asn1_get_indefinite_length_string (const unsigned char *der, int *len)
{
int len2, len3, counter, indefinite;
-@@ -756,7 +803,7 @@ asn1_der_decoding (ASN1_TYPE * element, const void *ider, int len,
+@@ -756,7 +808,7 @@ asn1_der_decoding (ASN1_TYPE * element, const void *ider, int len,
node_asn *node, *p, *p2, *p3;
char temp[128];
int counter, len2, len3, len4, move, ris, tlen;
@@ -305,7 +214,7 @@
unsigned long tag;
int indefinite, result;
const unsigned char *der = ider;
-@@ -1192,17 +1239,7 @@ asn1_der_decoding (ASN1_TYPE * element, const void *ider, int len,
+@@ -1192,17 +1244,7 @@ asn1_der_decoding (ASN1_TYPE * element, const void *ider, int len,
if (len4 != -1)
{
len2 += len4;
@@ -324,7 +233,7 @@
counter += len2 + len3;
}
else
-@@ -1221,17 +1258,8 @@ asn1_der_decoding (ASN1_TYPE * element, const void *ider, int len,
+@@ -1221,17 +1263,8 @@ asn1_der_decoding (ASN1_TYPE * element, const void *ider, int len,
asn1_delete_structure (element);
return ris;
}
@@ -343,7 +252,7 @@
counter += len2;
/* Check if a couple of 0x00 are present due to an EXPLICIT TAG with
-@@ -1877,19 +1905,8 @@ asn1_der_decoding_element (ASN1_TYPE * structure, const char *elementName,
+@@ -1877,19 +1910,8 @@ asn1_der_decoding_element (ASN1_TYPE * structure, const char *elementName,
len2 += len4;
if (state == FOUND)
{
@@ -365,7 +274,7 @@
if (p == nodeFound)
state = EXIT;
-@@ -1915,17 +1932,7 @@ asn1_der_decoding_element (ASN1_TYPE * structure, const char *elementName,
+@@ -1915,17 +1937,7 @@ asn1_der_decoding_element (ASN1_TYPE * structure, const char *elementName,
if (state == FOUND)
{
@@ -466,25 +375,10 @@
case TYPE_SEQUENCE_OF:
case TYPE_SET_OF:
diff --git a/lib/libtasn1.h b/lib/libtasn1.h
-index fd35867..efcee0e 100644
+index d7d4f70..a065b4f 100644
--- a/lib/libtasn1.h
+++ b/lib/libtasn1.h
-@@ -105,11 +105,14 @@ extern "C"
- /* that represent an ASN.1 DEFINITION. */
- /******************************************************/
-
-+#define SMALL_VALUE_SIZE 16
-+
- struct node_asn_struct
- {
- char *name; /* Node name */
- unsigned int type; /* Node type */
- unsigned char *value; /* Node value */
-+ unsigned char small_value[SMALL_VALUE_SIZE]; /* if value is less than that store it here */
- int value_len;
- struct node_asn_struct *down; /* Pointer to the son node */
- struct node_asn_struct *right; /* Pointer to the brother node */
-@@ -228,6 +231,8 @@ extern "C"
+@@ -228,6 +228,8 @@ extern "C"
signed long asn1_get_length_der (const unsigned char *der, int der_len,
int *len);
@@ -494,10 +388,10 @@
void asn1_length_der (unsigned long int len, unsigned char *ans,
int *ans_len);
diff --git a/lib/parser_aux.c b/lib/parser_aux.c
-index 51169b1..43522da 100644
+index 51169b1..5ae8bac 100644
--- a/lib/parser_aux.c
+++ b/lib/parser_aux.c
-@@ -199,23 +199,27 @@ asn1_find_node (ASN1_TYPE pointer, const char *name)
+@@ -199,10 +199,8 @@ asn1_find_node (ASN1_TYPE pointer, const char *name)
/* Return: pointer to the NODE_ASN element. */
/******************************************************************/
node_asn *
@@ -509,30 +403,18 @@
if (node == NULL)
return node;
if (node->value)
- {
-- _asn1_free (node->value);
-+ if (node->value != node->small_value) _asn1_free (node->value);
+@@ -211,8 +209,10 @@ _asn1_set_value (node_asn * node, const void *_value, unsigned int len)
node->value = NULL;
node->value_len = 0;
}
+
if (!len)
return node;
-- node->value = (unsigned char *) _asn1_malloc (len);
-- if (node->value == NULL)
-- return NULL;
-+
-+ if (len < sizeof(node->small_value)) {
-+ node->value = node->small_value;
-+ } else {
-+ node->value = _asn1_malloc (len);
-+ if (node->value == NULL)
-+ return NULL;
-+ }
- node->value_len = len;
-
- memcpy (node->value, value, len);
-@@ -223,6 +227,106 @@ _asn1_set_value (node_asn * node, const void *_value, unsigned int len)
++
+ node->value = (unsigned char *) _asn1_malloc (len);
+ if (node->value == NULL)
+ return NULL;
+@@ -223,6 +223,92 @@ _asn1_set_value (node_asn * node, const void *_value, unsigned int len)
}
/******************************************************************/
@@ -575,7 +457,7 @@
+
+ if (node->value)
+ {
-+ if (node->value != node->small_value) _asn1_free (node->value);
++ _asn1_free (node->value);
+ node->value = NULL;
+ node->value_len = 0;
+ }
@@ -604,33 +486,19 @@
+{
+ if (node == NULL)
+ return node;
-+ if (node->value != NULL && node->value != node->small_value) /* value is allocated */
++ if (node->value != NULL) /* value is allocated */
+ {
+ int prev_len = node->value_len;
+ node->value_len+=len;
+ node->value = _asn1_realloc( node->value, node->value_len);
+ if (node->value == NULL) {
-+ node->value_len = 0;
-+ return NULL;
++ node->value_len = 0;
++ return NULL;
+ }
+ memcpy( &node->value[prev_len], value, len);
-+
++
+ return node;
+ }
-+ else if (node->value == node->small_value) /* value is in node */
-+ {
-+ int prev_len = node->value_len;
-+ node->value_len+=len;
-+ node->value = _asn1_malloc( node->value_len);
-+ if (node->value == NULL) {
-+ node->value_len = 0;
-+ return NULL;
-+ }
-+ memcpy( node->value, node->small_value, prev_len);
-+ memcpy( &node->value[prev_len], value, len);
-+
-+ return node;
-+ }
+ else /* node->value == NULL */
+ return _asn1_set_value(node, value, len);
+}
@@ -639,15 +507,6 @@
/* Function : _asn1_set_name */
/* Description: sets the field NAME in a NODE_ASN element. The */
/* previous value (if exist) will be lost */
-@@ -401,7 +505,7 @@ _asn1_remove_node (node_asn * node)
-
- if (node->name != NULL)
- _asn1_free (node->name);
-- if (node->value != NULL)
-+ if (node->value != NULL && node->value != node->small_value)
- _asn1_free (node->value);
- _asn1_free (node);
- }
diff --git a/lib/parser_aux.h b/lib/parser_aux.h
index 3055510..6e18bb6 100644
--- a/lib/parser_aux.h
@@ -676,6 +535,19 @@
_asn1_set_name(node_asn *node,const char *name);
node_asn *
+diff --git a/lib/structure.c b/lib/structure.c
+index 743e9ba..54cd77e 100644
+--- a/lib/structure.c
++++ b/lib/structure.c
+@@ -51,7 +51,7 @@ _asn1_add_node_only (unsigned int type)
+ {
+ node_asn *punt;
+
+- punt = (node_asn *) _asn1_calloc (1, sizeof (node_asn));
++ punt = (ASN1_TYPE) _asn1_calloc (1, sizeof (struct node_asn_struct));
+ if (punt == NULL)
+ return NULL;
+
diff --git a/tests/Makefile.am b/tests/Makefile.am
index dc30d80..2095311 100644
--- a/tests/Makefile.am
@@ -2085,19 +1957,3 @@
+XmppAddr ::= UTF8String
+
+END
-
---------------010005090605070003070608
-Content-Type: text/plain; charset="us-ascii"
-MIME-Version: 1.0
-Content-Transfer-Encoding: 7bit
-Content-Disposition: inline
-
-_______________________________________________
-Gnutls-devel mailing list
-Gnutls-devel at gnu.org
-http://lists.gnu.org/mailman/listinfo/gnutls-devel
-
---------------010005090605070003070608--
-
-
-
Added: packages/libtasn1-3/trunk/debian/patches/20_autoff.diff
URL: http://svn.debian.org/wsvn/pkg-gnutls/packages/libtasn1-3/trunk/debian/patches/20_autoff.diff?rev=616&op=file
==============================================================================
--- packages/libtasn1-3/trunk/debian/patches/20_autoff.diff (added)
+++ packages/libtasn1-3/trunk/debian/patches/20_autoff.diff Sun Nov 16 15:05:13 2008
@@ -1,0 +1,73 @@
+diff -Nur libtasn1-3-1.5.orig/tests/Makefile.in libtasn1-3-1.5/tests/Makefile.in
+--- libtasn1-3-1.5.orig/tests/Makefile.in 2008-08-29 12:52:42.000000000 +0200
++++ libtasn1-3-1.5/tests/Makefile.in 2008-11-16 14:09:48.000000000 +0100
+@@ -49,9 +49,9 @@
+ build_triplet = @build@
+ host_triplet = @host@
+ check_PROGRAMS = Test_parser$(EXEEXT) Test_tree$(EXEEXT) \
+- Test_encoding$(EXEEXT)
++ Test_encoding$(EXEEXT) Test_indefinite$(EXEEXT)
+ TESTS = Test_parser$(EXEEXT) Test_tree$(EXEEXT) Test_encoding$(EXEEXT) \
+- crlf
++ Test_indefinite$(EXEEXT) crlf
+ subdir = tests
+ DIST_COMMON = $(dist_check_SCRIPTS) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in
+@@ -78,6 +78,10 @@
+ Test_encoding_OBJECTS = Test_encoding.$(OBJEXT)
+ Test_encoding_LDADD = $(LDADD)
+ Test_encoding_DEPENDENCIES = ../lib/libtasn1.la
++Test_indefinite_SOURCES = Test_indefinite.c
++Test_indefinite_OBJECTS = Test_indefinite.$(OBJEXT)
++Test_indefinite_LDADD = $(LDADD)
++Test_indefinite_DEPENDENCIES = ../lib/libtasn1.la
+ Test_parser_SOURCES = Test_parser.c
+ Test_parser_OBJECTS = Test_parser.$(OBJEXT)
+ Test_parser_LDADD = $(LDADD)
+@@ -98,8 +102,9 @@
+ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+-SOURCES = Test_encoding.c Test_parser.c Test_tree.c
+-DIST_SOURCES = Test_encoding.c Test_parser.c Test_tree.c
++SOURCES = Test_encoding.c Test_indefinite.c Test_parser.c Test_tree.c
++DIST_SOURCES = Test_encoding.c Test_indefinite.c Test_parser.c \
++ Test_tree.c
+ ETAGS = etags
+ CTAGS = ctags
+ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+@@ -381,12 +385,15 @@
+
+ # For crlf.
+ EXTRA_DIST = Test_parser.asn Test_tree.asn Test_tree_asn1_tab.c \
+- Test_encoding.asn crlf.cer
++ Test_encoding.asn pkix.asn TestIndef.p12 crlf.cer
+ dist_check_SCRIPTS = crlf
+ MOSTLYCLEANFILES = Test_parser_ERROR.asn
+ TESTS_ENVIRONMENT = \
+ ASN1PARSER=$(srcdir)/Test_parser.asn \
+ ASN1TREE=$(srcdir)/Test_tree.asn \
++ ASN1PKIX=$(srcdir)/pkix.asn \
++ ASN1PKIX=$(srcdir)/pkix.asn \
++ ASN1INDEF=$(srcdir)/TestIndef.p12 \
+ ASN1ENCODING=$(srcdir)/Test_encoding.asn \
+ $(VALGRIND)
+
+@@ -433,6 +440,9 @@
+ Test_encoding$(EXEEXT): $(Test_encoding_OBJECTS) $(Test_encoding_DEPENDENCIES)
+ @rm -f Test_encoding$(EXEEXT)
+ $(LINK) $(Test_encoding_OBJECTS) $(Test_encoding_LDADD) $(LIBS)
++Test_indefinite$(EXEEXT): $(Test_indefinite_OBJECTS) $(Test_indefinite_DEPENDENCIES)
++ @rm -f Test_indefinite$(EXEEXT)
++ $(LINK) $(Test_indefinite_OBJECTS) $(Test_indefinite_LDADD) $(LIBS)
+ Test_parser$(EXEEXT): $(Test_parser_OBJECTS) $(Test_parser_DEPENDENCIES)
+ @rm -f Test_parser$(EXEEXT)
+ $(LINK) $(Test_parser_OBJECTS) $(Test_parser_LDADD) $(LIBS)
+@@ -447,6 +457,7 @@
+ -rm -f *.tab.c
+
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/Test_encoding.Po at am__quote@
++ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/Test_indefinite.Po at am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/Test_parser.Po at am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/Test_tree.Po at am__quote@
+
Modified: packages/libtasn1-3/trunk/debian/rules
URL: http://svn.debian.org/wsvn/pkg-gnutls/packages/libtasn1-3/trunk/debian/rules?rev=616&op=diff
==============================================================================
--- packages/libtasn1-3/trunk/debian/rules (original)
+++ packages/libtasn1-3/trunk/debian/rules Sun Nov 16 15:05:13 2008
@@ -26,3 +26,8 @@
/bin/sh ../libtool --mode=install /usr/bin/install -c $$e "$(CURDIR)/debian/tmp/usr/bin/" ; \
done
+makebuilddir/libtasn1-3::
+ test tests/TestIndef.p12 -nt debian/TestIndef.p12.base64 || \
+ perl -MMIME::Base64 -ne 'print decode_base64($$_)' \
+ < debian/TestIndef.p12.base64 \
+ > tests/TestIndef.p12
More information about the Pkg-gnutls-commits
mailing list