summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2008-11-07 12:26:19 +0100
committerSimon Josefsson <simon@josefsson.org>2008-11-07 12:26:19 +0100
commitafb06abaef8b60bfb10347281c9ea8ea1ca20b25 (patch)
tree5ff5b026dead8153ee3f1bebbb1817507e89a958 /tests
parentc6bfd2290968151bb1ea14127aacee416b687cbb (diff)
downloadlibtasn1-afb06abaef8b60bfb10347281c9ea8ea1ca20b25.tar.gz
libtasn1-afb06abaef8b60bfb10347281c9ea8ea1ca20b25.tar.bz2
libtasn1-afb06abaef8b60bfb10347281c9ea8ea1ca20b25.zip
Don't use now obsolete functions.
Diffstat (limited to 'tests')
-rw-r--r--tests/Test_encoding.c16
-rw-r--r--tests/Test_indefinite.c6
-rw-r--r--tests/Test_parser.c6
-rw-r--r--tests/Test_tree.c32
4 files changed, 30 insertions, 30 deletions
diff --git a/tests/Test_encoding.c b/tests/Test_encoding.c
index 0429d3c..166cede 100644
--- a/tests/Test_encoding.c
+++ b/tests/Test_encoding.c
@@ -59,7 +59,7 @@ main (int argc, char *argv[])
if (result != ASN1_SUCCESS)
{
- libtasn1_perror (result);
+ asn1_perror (result);
printf ("ErrorDescription = %s\n\n", errorDescription);
exit (1);
}
@@ -68,7 +68,7 @@ main (int argc, char *argv[])
if (result != ASN1_SUCCESS)
{
fprintf (stderr, "asn1_create_element(): ");
- libtasn1_perror (result);
+ asn1_perror (result);
exit (1);
}
@@ -76,7 +76,7 @@ main (int argc, char *argv[])
if (result != ASN1_SUCCESS)
{
fprintf (stderr, "asn1_write_value(): seqint ");
- libtasn1_perror (result);
+ asn1_perror (result);
exit (1);
}
@@ -84,7 +84,7 @@ main (int argc, char *argv[])
if (result != ASN1_SUCCESS)
{
fprintf (stderr, "asn1_write_value(): seqint.?LAST ");
- libtasn1_perror (result);
+ asn1_perror (result);
exit (1);
}
@@ -92,7 +92,7 @@ main (int argc, char *argv[])
if (result != ASN1_SUCCESS)
{
fprintf (stderr, "asn1_write_value(): int ");
- libtasn1_perror (result);
+ asn1_perror (result);
exit (1);
}
@@ -100,7 +100,7 @@ main (int argc, char *argv[])
if (result != ASN1_SUCCESS)
{
fprintf (stderr, "asn1_write_value(): str ");
- libtasn1_perror (result);
+ asn1_perror (result);
exit (1);
}
@@ -111,7 +111,7 @@ main (int argc, char *argv[])
if (result != ASN1_SUCCESS)
{
fprintf (stderr, "Encoding error.\n");
- libtasn1_perror (result);
+ asn1_perror (result);
exit (1);
}
@@ -119,7 +119,7 @@ main (int argc, char *argv[])
if (result != ASN1_SUCCESS)
{
fprintf (stderr, "Decoding error.\n");
- libtasn1_perror (result);
+ asn1_perror (result);
exit (1);
}
diff --git a/tests/Test_indefinite.c b/tests/Test_indefinite.c
index 9f6df7b..3dc9d27 100644
--- a/tests/Test_indefinite.c
+++ b/tests/Test_indefinite.c
@@ -67,7 +67,7 @@ main(int argc,char *argv[])
result=asn1_parser2tree(treefile,&definitions,errorDescription);
if(result!=ASN1_SUCCESS){
- libtasn1_perror(result);
+ asn1_perror(result);
printf("ErrorDescription = %s\n\n",errorDescription);
exit(1);
}
@@ -89,7 +89,7 @@ main(int argc,char *argv[])
result=asn1_create_element(definitions,"PKIX1.pkcs-12-PFX",&asn1_element);
if (result != ASN1_SUCCESS) {
- libtasn1_perror(result);
+ asn1_perror(result);
printf("Cannot create PKCS12 element\n");
exit(1);
}
@@ -97,7 +97,7 @@ main(int argc,char *argv[])
result=asn1_der_decoding(&asn1_element,buffer,size,
errorDescription);
if (result != ASN1_SUCCESS) {
- libtasn1_perror(result);
+ asn1_perror(result);
printf("Cannot decode BER data (size %d)\n", size);
exit(1);
}
diff --git a/tests/Test_parser.c b/tests/Test_parser.c
index 72b0183..518f9dc 100644
--- a/tests/Test_parser.c
+++ b/tests/Test_parser.c
@@ -162,7 +162,7 @@ main(int argc,char *argv[])
if(result!=ASN1_SUCCESS){
printf("File '%s' not correct\n",fileCorrectName);
- libtasn1_perror(result);
+ asn1_perror(result);
printf("ErrorDescription = %s\n\n",errorDescription);
exit(1);
}
@@ -189,9 +189,9 @@ main(int argc,char *argv[])
errorCounter++;
printf("ERROR N. %d:\n",errorCounter);
printf(" Line %d - %s\n",test->lineNumber,test->line);
- printf(" Error expected: %s - %s\n",libtasn1_strerror(test->errorNumber),
+ printf(" Error expected: %s - %s\n",asn1_strerror(test->errorNumber),
test->errorDescription);
- printf(" Error detected: %s - %s\n\n",libtasn1_strerror(result),
+ printf(" Error detected: %s - %s\n\n",asn1_strerror(result),
errorDescription);
}
diff --git a/tests/Test_tree.c b/tests/Test_tree.c
index 96bad24..644e9e1 100644
--- a/tests/Test_tree.c
+++ b/tests/Test_tree.c
@@ -450,7 +450,7 @@ main(int argc,char *argv[])
result=asn1_array2tree(Test_tree_asn1_tab,&definitions,errorDescription);
if(result!=ASN1_SUCCESS){
- libtasn1_perror(result);
+ asn1_perror(result);
printf("ErrorDescription = %s\n\n",errorDescription);
exit(1);
}
@@ -582,8 +582,8 @@ main(int argc,char *argv[])
printf("ERROR N. %d:\n",errorCounter);
printf(" Action %d - %s - %s - %d\n",test->action,test->par1,
test->par2,test->par3);
- printf(" Error expected: %s\n",libtasn1_strerror(test->errorNumber));
- printf(" Error detected: %s\n\n",libtasn1_strerror(result));
+ printf(" Error expected: %s\n",asn1_strerror(test->errorNumber));
+ printf(" Error detected: %s\n\n",asn1_strerror(result));
}
break;
case ACT_DECODING_ELEMENT:
@@ -592,8 +592,8 @@ main(int argc,char *argv[])
printf("ERROR N. %d:\n",errorCounter);
printf(" Action %d - %s - %s - %d\n",test->action,test->par1,
test->par2,test->par3);
- printf(" Error expected: %s\n",libtasn1_strerror(test->errorNumber));
- printf(" Error detected: %s\n",libtasn1_strerror(result));
+ printf(" Error expected: %s\n",asn1_strerror(test->errorNumber));
+ printf(" Error detected: %s\n",asn1_strerror(result));
printf(" Error description : %s\n\n",errorDescription);
}
break;
@@ -604,9 +604,9 @@ main(int argc,char *argv[])
errorCounter++;
printf("ERROR N. %d:\n",errorCounter);
printf(" Action %d - %s\n",test->action,test->par1);
- printf(" Error expected: %s - %d\n",libtasn1_strerror(test->errorNumber),
+ printf(" Error expected: %s - %d\n",asn1_strerror(test->errorNumber),
test->par3);
- printf(" Error detected: %s - %d\n\n",libtasn1_strerror(result),
+ printf(" Error detected: %s - %d\n\n",asn1_strerror(result),
valueLen);
}
break;
@@ -616,9 +616,9 @@ main(int argc,char *argv[])
errorCounter++;
printf("ERROR N. %d:\n",errorCounter);
printf(" Action %d - %s\n",test->action,test->par1);
- printf(" Error expected: %s - %d\n",libtasn1_strerror(test->errorNumber),
+ printf(" Error expected: %s - %d\n",asn1_strerror(test->errorNumber),
test->par3);
- printf(" Error detected: %s - %d\n\n",libtasn1_strerror(result),
+ printf(" Error detected: %s - %d\n\n",asn1_strerror(result),
der_len);
}
break;
@@ -629,7 +629,7 @@ main(int argc,char *argv[])
errorCounter++;
printf("ERROR N. %d:\n",errorCounter);
printf(" Action %d - %s\n",test->action,test->par1);
- printf(" Error expected: %s - %s\n",libtasn1_strerror(test->errorNumber),test->par2);
+ printf(" Error expected: %s - %s\n",asn1_strerror(test->errorNumber),test->par2);
printf(" Value detected: %s\n\n",str_p);
}
break;
@@ -641,9 +641,9 @@ main(int argc,char *argv[])
printf("ERROR N. %d:\n",errorCounter);
printf(" Action %d - %s - %d\n",test->action,test->par1,
test->par3);
- printf(" Error expected: %s - %s - %d\n",libtasn1_strerror(test->errorNumber),
+ printf(" Error expected: %s - %s - %d\n",asn1_strerror(test->errorNumber),
test->par2,test->par3);
- printf(" Error detected: %s - %d - %d\n\n",libtasn1_strerror(result),
+ printf(" Error detected: %s - %d - %d\n\n",asn1_strerror(result),
start,end);
}
break;
@@ -656,9 +656,9 @@ main(int argc,char *argv[])
printf("ERROR N. %d:\n",errorCounter);
printf(" Action %d - %s - %d\n",test->action,test->par1,
test->par3);
- printf(" Error expected: %s - %s - %d\n",libtasn1_strerror(test->errorNumber),
+ printf(" Error expected: %s - %s - %d\n",asn1_strerror(test->errorNumber),
test->par2,test->par3);
- printf(" Error detected: %s - %d - %d\n\n",libtasn1_strerror(result),
+ printf(" Error detected: %s - %d - %d\n\n",asn1_strerror(result),
tag,class);
}
@@ -686,11 +686,11 @@ main(int argc,char *argv[])
errorCounter++;
printf("ERROR N. %d:\n",errorCounter);
printf(" Action %d - %s\n",test->action,test->par1);
- printf(" Error expected: %s - %d - ",libtasn1_strerror(test->errorNumber),
+ printf(" Error expected: %s - %d - ",asn1_strerror(test->errorNumber),
test->par3);
for(k=0;k<test->par3;k++)
printf("%02x",test->par2[k]);
- printf("\n Error detected: %s - %d - ",libtasn1_strerror(result),
+ printf("\n Error detected: %s - %d - ",asn1_strerror(result),
valueLen);
for(k=0;k<valueLen;k++)
printf("%02x",value[k]);