diff options
author | Simon Josefsson <simon@josefsson.org> | 2008-11-07 12:26:19 +0100 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2008-11-07 12:26:19 +0100 |
commit | afb06abaef8b60bfb10347281c9ea8ea1ca20b25 (patch) | |
tree | 5ff5b026dead8153ee3f1bebbb1817507e89a958 | |
parent | c6bfd2290968151bb1ea14127aacee416b687cbb (diff) | |
download | libtasn1-afb06abaef8b60bfb10347281c9ea8ea1ca20b25.tar.gz libtasn1-afb06abaef8b60bfb10347281c9ea8ea1ca20b25.tar.bz2 libtasn1-afb06abaef8b60bfb10347281c9ea8ea1ca20b25.zip |
Don't use now obsolete functions.
-rw-r--r-- | examples/CertificateExample.c | 2 | ||||
-rw-r--r-- | examples/CrlExample.c | 2 | ||||
-rw-r--r-- | src/asn1Coding.c | 6 | ||||
-rw-r--r-- | src/asn1Decoding.c | 6 | ||||
-rw-r--r-- | src/asn1Parser.c | 2 | ||||
-rw-r--r-- | tests/Test_encoding.c | 16 | ||||
-rw-r--r-- | tests/Test_indefinite.c | 6 | ||||
-rw-r--r-- | tests/Test_parser.c | 6 | ||||
-rw-r--r-- | tests/Test_tree.c | 32 |
9 files changed, 39 insertions, 39 deletions
diff --git a/examples/CertificateExample.c b/examples/CertificateExample.c index a00511b..39ce703 100644 --- a/examples/CertificateExample.c +++ b/examples/CertificateExample.c @@ -503,7 +503,7 @@ main(int argc,char *argv[]) result=asn1_parser2tree("pkix.asn",&PKIX1Implicit88,errorDescription); if(result != ASN1_SUCCESS){ - libtasn1_perror(result); + asn1_perror(result); printf("%s",errorDescription); exit(1); } diff --git a/examples/CrlExample.c b/examples/CrlExample.c index 332d84d..d34c0d8 100644 --- a/examples/CrlExample.c +++ b/examples/CrlExample.c @@ -422,7 +422,7 @@ main(int argc,char *argv[]) result=asn1_parser2tree("pkix.asn",&PKIX1Implicit88,errorDescription); if(result != ASN1_SUCCESS){ - libtasn1_perror(result); + asn1_perror(result); printf("%s\n",errorDescription); exit(1); } diff --git a/src/asn1Coding.c b/src/asn1Coding.c index 4cb763f..86b7fa3 100644 --- a/src/asn1Coding.c +++ b/src/asn1Coding.c @@ -216,7 +216,7 @@ main(int argc,char *argv[]) printf("asn1Coding: %s\n",errorDescription); break; default: - printf("libtasn1 ERROR: %s\n",libtasn1_strerror(asn1_result)); + printf("libtasn1 ERROR: %s\n",asn1_strerror(asn1_result)); } if(asn1_result != ASN1_SUCCESS){ @@ -247,7 +247,7 @@ main(int argc,char *argv[]) asn1_result=asn1_write_value(structure,varName,value,0); if(asn1_result != ASN1_SUCCESS){ - printf("libtasn1 ERROR: %s\n",libtasn1_strerror(asn1_result)); + printf("libtasn1 ERROR: %s\n",asn1_strerror(asn1_result)); asn1_delete_structure(&definitions); asn1_delete_structure(&structure); @@ -273,7 +273,7 @@ main(int argc,char *argv[]) asn1_result=asn1_der_coding(structure,"",der,&der_len, errorDescription); } - printf("\nCoding: %s\n\n",libtasn1_strerror(asn1_result)); + printf("\nCoding: %s\n\n",asn1_strerror(asn1_result)); if(asn1_result!=ASN1_SUCCESS){ printf("asn1Coding: %s\n",errorDescription); diff --git a/src/asn1Decoding.c b/src/asn1Decoding.c index e6ee47f..dac8eb6 100644 --- a/src/asn1Decoding.c +++ b/src/asn1Decoding.c @@ -161,7 +161,7 @@ main(int argc,char *argv[]) printf("asn1Decoding: %s\n",errorDescription); break; default: - printf("libtasn1 ERROR: %s\n",libtasn1_strerror(asn1_result)); + printf("libtasn1 ERROR: %s\n",asn1_strerror(asn1_result)); } if(asn1_result != ASN1_SUCCESS){ @@ -210,7 +210,7 @@ main(int argc,char *argv[]) if(asn1_result != ASN1_SUCCESS){ - printf("Structure creation: %s\n",libtasn1_strerror(asn1_result)); + printf("Structure creation: %s\n",asn1_strerror(asn1_result)); asn1_delete_structure(&definitions); free(inputFileAsnName); @@ -221,7 +221,7 @@ main(int argc,char *argv[]) } asn1_result=asn1_der_decoding(&structure,der,der_len,errorDescription); - printf("\nDecoding: %s\n",libtasn1_strerror(asn1_result)); + printf("\nDecoding: %s\n",asn1_strerror(asn1_result)); if(asn1_result != ASN1_SUCCESS) printf("asn1Decoding: %s\n",errorDescription); diff --git a/src/asn1Parser.c b/src/asn1Parser.c index b591f79..f667d8c 100644 --- a/src/asn1Parser.c +++ b/src/asn1Parser.c @@ -168,7 +168,7 @@ main(int argc,char *argv[]) printf("asn1Parser: %s\n",errorDescription); break; default: - printf("libtasn1 ERROR: %s\n",libtasn1_strerror(parse_result)); + printf("libtasn1 ERROR: %s\n",asn1_strerror(parse_result)); } 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]); |