0

I have an ASN.1 Specification

ModuleName DEFINITIONS AUTOMATIC TAGS ::= BEGIN

  SESeal ::= SEQUENCE {
    eSealInfo SES_SealInfo,
    cert OCTET STRING,
    signAlgID OBJECT IDENTIFIER,
    signedValue BIT STRING
  }
  SES_SealInfo ::= SEQUENCE {
    header SES_Header,
    esID IA5String,
    property SES_ESPropertyInfo,
    picture SES_ESPictureInfo
  }
  SES_Header ::= SEQUENCE {
    ID IA5String,
    version INTEGER,
    Vid IA5String
  }
  SES_ESPropertyInfo ::= SEQUENCE {
    type INTEGER,
    name UTF8String,
    certListType INTEGER,
    certList SES_CertList,
    createDate GeneralizedTime,
    validStart GeneralizedTime,
    validEnd GeneralizedTime
  }
  SES_ESPictureInfo ::= SEQUENCE {
    type IA5String,
    data OCTET STRING,
    width INTEGER,
    height INTEGER
  }
  SES_CertList ::= CHOICE {
    certs CertInfoList,
    certDigestList CertDigestList
  }

  Cert ::= OCTET STRING
  CertDigestValue ::= OCTET STRING
  ObjType ::= PrintableString

  CertDigestObj ::= SEQUENCE {
    type ObjType,
    value CertDigestValue
  }

  CertInfoList ::= SEQUENCE OF Cert
  CertDigestList ::= SEQUENCE OF CertDigestObj  
END

compile info

E:/SESealASN.asn(16,12) : ModuleName: error A0120E: Parsing error: expecting '}' or a ',' but found IA5String.

E:/SESealASN.asn(16) : ModuleName: warning A0256W: 'ID' is referenced, but is not defined.

E:/SESealASN.asn(10) : ModuleName: warning A0256W: 'SES_Header' is referenced, but is not defined.

I don't know where the error occurred, Using GPT cannot help me identify the cause o(╥﹏╥)o

1
  • 1
    According to oss.com/asn1/resources/asn1-made-simple/asn1-quick-reference/… "Each element in the sequence must be assigned an identifier. Note that while all type names begin with upper case letters, any identifiers assigned to the elements must begin with a lower case letter." but ID doesn't and there are several others that don't. Commented May 22, 2024 at 3:48

1 Answer 1

1

The error error A0120E: Parsing error: expecting '}' or a ',' but found IA5String. isn't really helpful is it?

According to https://www.oss.com/asn1/resources/asn1-made-simple/asn1-quick-reference/sequence.html

Each element in the sequence must be assigned an identifier. Note that while all type names begin with upper case letters, any identifiers assigned to the elements must begin with a lower case letter.

But ID doesn't and there are others like Vid that don't as well.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.