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);
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);
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){
_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;
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);
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){
}
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;
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);
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;