[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CVS shishi/asn1
From: |
shishi-commit |
Subject: |
CVS shishi/asn1 |
Date: |
Thu, 09 Sep 2004 12:31:25 +0200 |
Update of /home/cvs/shishi/asn1
In directory dopio:/tmp/cvs-serv2406
Modified Files:
decoding.c int.h libtasn1.h
Log Message:
Sync.
--- /home/cvs/shishi/asn1/decoding.c 2004/05/21 16:43:18 1.3
+++ /home/cvs/shishi/asn1/decoding.c 2004/09/09 10:31:25 1.4
@@ -719,7 +719,7 @@
counter+=len3+len2;
move=RIGHT;
break;
- case TYPE_SEQUENCE: case TYPE_SET:;
+ case TYPE_SEQUENCE: case TYPE_SET:
if(move==UP){
len2=strtol(p->value,NULL,10);
_asn1_set_value(p,NULL,0);
@@ -815,12 +815,6 @@
move=RIGHT;
break;
case TYPE_ANY:
- /* Check indefinite lenth method in a EXPLICIT TAG */
- if((p->type&CONST_TAG) && (der[counter-1]==0x80))
- indefinite=1;
- else
- indefinite=0;
-
tag=_asn1_get_tag_der(der+counter,&class,&len2);
len4=_asn1_get_length_der(der+counter+len2,&len3);
@@ -839,6 +833,12 @@
counter+=len2+len3;
}
else{ /* indefinite length */
+ /* Check indefinite lenth method in a EXPLICIT TAG */
+ if((p->type&CONST_TAG) && (der[counter-1]==0x80))
+ indefinite=1;
+ else
+ indefinite=0;
+
len2=len-counter;
ris=_asn1_get_indefinite_length_string(der+counter,&len2);
if(ris != ASN1_SUCCESS){
@@ -856,17 +856,17 @@
_asn1_set_value(p,temp2,len4);
_asn1_afree(temp2);
counter+=len2;
- }
- /* Check if a couple of 0x00 are present due to an EXPLICIT TAG with
- a indefinite length method. */
- if(indefinite){
- if(!der[counter] && !der[counter+1]){
- counter+=2;
- }
- else{
- asn1_delete_structure(element);
- return ASN1_DER_ERROR;
+ /* Check if a couple of 0x00 are present due to an EXPLICIT TAG with
+ a indefinite length method. */
+ if(indefinite){
+ if(!der[counter] && !der[counter+1]){
+ counter+=2;
+ }
+ else{
+ asn1_delete_structure(element);
+ return ASN1_DER_ERROR;
+ }
}
}
move=RIGHT;
@@ -1313,12 +1313,6 @@
break;
case TYPE_ANY:
- /* Check indefinite lenth method in a EXPLICIT TAG */
- if((p->type&CONST_TAG) && (der[counter-1]==0x80))
- indefinite=1;
- else
- indefinite=0;
-
tag=_asn1_get_tag_der(der+counter,&class,&len2);
len4=_asn1_get_length_der(der+counter+len2,&len3);
@@ -1341,6 +1335,12 @@
counter+=len2+len3;
}
else{ /* indefinite length */
+ /* Check indefinite lenth method in a EXPLICIT TAG */
+ if((p->type&CONST_TAG) && (der[counter-1]==0x80))
+ indefinite=1;
+ else
+ indefinite=0;
+
len2=len-counter;
ris=_asn1_get_indefinite_length_string(der+counter,&len2);
if(ris != ASN1_SUCCESS){
@@ -1364,17 +1364,17 @@
}
counter+=len2;
- }
- /* Check if a couple of 0x00 are present due to an EXPLICIT TAG with
- a indefinite length method. */
- if(indefinite){
- if(!der[counter] && !der[counter+1]){
- counter+=2;
- }
- else{
- asn1_delete_structure(structure);
- return ASN1_DER_ERROR;
+ /* Check if a couple of 0x00 are present due to an EXPLICIT TAG with
+ a indefinite length method. */
+ if(indefinite){
+ if(!der[counter] && !der[counter+1]){
+ counter+=2;
+ }
+ else{
+ asn1_delete_structure(structure);
+ return ASN1_DER_ERROR;
+ }
}
}
move=RIGHT;
@@ -1683,12 +1683,6 @@
move=RIGHT;
break;
case TYPE_ANY:
- /* Check indefinite lenth method in a EXPLICIT TAG */
- if((p->type&CONST_TAG) && (der[counter-1]==0x80))
- indefinite=1;
- else
- indefinite=0;
-
tag=_asn1_get_tag_der(der+counter,&class,&len2);
len4=_asn1_get_length_der(der+counter+len2,&len3);
@@ -1696,20 +1690,26 @@
counter+=len2+len4+len3;
}
else{ /* indefinite length */
+ /* Check indefinite lenth method in a EXPLICIT TAG */
+ if((p->type&CONST_TAG) && (der[counter-1]==0x80))
+ indefinite=1;
+ else
+ indefinite=0;
+
len2=len-counter;
ris=_asn1_get_indefinite_length_string(der+counter,&len2);
if(ris != ASN1_SUCCESS)
return ris;
counter+=len2;
- }
- /* Check if a couple of 0x00 are present due to an EXPLICIT TAG with
- a indefinite length method. */
- if(indefinite){
- if(!der[counter] && !der[counter+1])
- counter+=2;
- else
- return ASN1_DER_ERROR;
+ /* Check if a couple of 0x00 are present due to an EXPLICIT TAG with
+ a indefinite length method. */
+ if(indefinite){
+ if(!der[counter] && !der[counter+1])
+ counter+=2;
+ else
+ return ASN1_DER_ERROR;
+ }
}
move=RIGHT;
break;
--- /home/cvs/shishi/asn1/int.h 2004/05/21 16:43:18 1.5
+++ /home/cvs/shishi/asn1/int.h 2004/09/09 10:31:25 1.6
@@ -32,7 +32,7 @@
#include <mem.h>
-#define LIBTASN1_VERSION "0.2.10"
+#define LIBTASN1_VERSION "0.2.11"
#define MAX32 4294967295
#define MAX24 16777215
--- /home/cvs/shishi/asn1/libtasn1.h 2004/05/21 16:43:18 1.5
+++ /home/cvs/shishi/asn1/libtasn1.h 2004/09/09 10:31:25 1.6
@@ -28,7 +28,7 @@
extern "C" {
#endif
-#define LIBTASN1_VERSION "0.2.10"
+#define LIBTASN1_VERSION "0.2.11"
#include <sys/types.h>
#include <time.h>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- CVS shishi/asn1,
shishi-commit <=