Hi Bruno, thank you for your answer. I just wonder why they don't use OCTET STRING (SIZE( 1 .. 9 )) instead of OCTET STRING ( SIZE( 1 .. 20 )) (SIZE( 1 .. 9 )) if this is supposed to be the same. I was even thinking that it might be encoded as a constructed octet string i.e. up to 9 strings of a max 20-byte length each. Do you know any official specification where I can find an explanation? ITU-T Recommendation X.680 contains only the usual definition of 1 size constraint.
Best regards, Magda -----Original Message----- From: Bruno Konik [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 10, 2006 6:21 PM To: Ziolkowska Magdalena (CN SWN UL); [email protected] Subject: RE: [ASN1] Octet string of 2 size constraints Hello Magda, The constraints are not used by BER but the encoder should validate the type is correct before encoding it. In that situation, the type is equivalent to externalAddress [0] IMPLICIT OCTET STRING (SIZE( 1 .. 9 )) (intersection of constraints). And if you need to encode the value '010203'H in BER, this would simply be : 80 03 010203 80 is the encoding of the [0] IMPLICIT tag. I hope this helps, Bruno KONIK - uniGone > -----Message d'origine----- > De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part > de [EMAIL PROTECTED] Envoyé : mercredi 10 mai 2006 > 16:36 À : [email protected] Objet : [ASN1] Octet string of 2 size > constraints > > > Hi, > > > I have a problem with the following ASN.1 extract (from ETSI TS 124 > 080 V5.5.0 (2004-12)): > > > externalAddress [0] IMPLICIT OCTET STRING ( SIZE( 1 .. 20 ) > ) ( SIZE( > > 1 .. 9 ) ) > > > > How to encode such thing in BER? > > > Best regards, > > Magda > > > > > _______________________________________________ > ASN1 mailing list > [email protected] > http://lists.asn1.org/mailman/listinfo/asn1 > -------------------------------------------------------------- > ------------------------- > Wanadoo vous informe que cet e-mail a ete controle par l'anti-virus > mail. > Aucun virus connu a ce jour par nos services n'a ete detecte. > > > _______________________________________________ ASN1 mailing list [email protected] http://lists.asn1.org/mailman/listinfo/asn1
