diff options
author | vlm <vlm@59561ff5-6e30-0410-9f3c-9617f08c8826> | 2005-11-26 11:25:14 +0000 |
---|---|---|
committer | vlm <vlm@59561ff5-6e30-0410-9f3c-9617f08c8826> | 2005-11-26 11:25:14 +0000 |
commit | 337167ed3c51b7db276d05b18bdd5ded810f66a0 (patch) | |
tree | 6d864f02cd16eb75f4ae6e40199d1879d8363152 /tests/19-param-OK.asn1.-P | |
parent | 1ac75e752af6484c2360908254c0749fb445c707 (diff) |
upgrade: PER related changes
git-svn-id: https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk@1011 59561ff5-6e30-0410-9f3c-9617f08c8826
Diffstat (limited to 'tests/19-param-OK.asn1.-P')
-rw-r--r-- | tests/19-param-OK.asn1.-P | 114 |
1 files changed, 70 insertions, 44 deletions
diff --git a/tests/19-param-OK.asn1.-P b/tests/19-param-OK.asn1.-P index 8ffd6179..321e71a2 100644 --- a/tests/19-param-OK.asn1.-P +++ b/tests/19-param-OK.asn1.-P @@ -32,7 +32,7 @@ extern asn_TYPE_descriptor_t asn_DEF_Certificate; /*** <<< CODE [Certificate] >>> ***/ static int -memb_signature_1_constraint(asn_TYPE_descriptor_t *td, const void *sptr, +memb_signature_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, asn_app_consume_bytes_f *app_errlog, void *app_key) { const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; size_t size; @@ -71,6 +71,8 @@ static asn_TYPE_member_t asn_MBR_toBeSigned_2[] = { .tag_mode = 0, .type = &asn_DEF_INTEGER, .memb_constraints = 0, /* Defer constraints checking to the member type */ + .per_constraints = 0, /* PER is not compiled, use -gen-PER */ + .default_value = 0, .name = "version" }, { ATF_NOFLAGS, 0, offsetof(struct toBeSigned, signature), @@ -78,6 +80,8 @@ static asn_TYPE_member_t asn_MBR_toBeSigned_2[] = { .tag_mode = 0, .type = &asn_DEF_OBJECT_IDENTIFIER, .memb_constraints = 0, /* Defer constraints checking to the member type */ + .per_constraints = 0, /* PER is not compiled, use -gen-PER */ + .default_value = 0, .name = "signature" }, { ATF_NOFLAGS, 0, offsetof(struct toBeSigned, issuer), @@ -85,22 +89,25 @@ static asn_TYPE_member_t asn_MBR_toBeSigned_2[] = { .tag_mode = 0, .type = &asn_DEF_Name, .memb_constraints = 0, /* Defer constraints checking to the member type */ + .per_constraints = 0, /* PER is not compiled, use -gen-PER */ + .default_value = 0, .name = "issuer" }, }; -static ber_tlv_tag_t asn_DEF_toBeSigned_2_tags[] = { +static ber_tlv_tag_t asn_DEF_toBeSigned_tags_2[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; -static asn_TYPE_tag2member_t asn_MAP_toBeSigned_2_tag2el[] = { +static asn_TYPE_tag2member_t asn_MAP_toBeSigned_tag2el_2[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* version at 21 */ { (ASN_TAG_CLASS_UNIVERSAL | (6 << 2)), 1, 0, 0 }, /* signature at 22 */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 0 } /* issuer at 24 */ }; -static asn_SEQUENCE_specifics_t asn_SPC_toBeSigned_2_specs = { +static asn_SEQUENCE_specifics_t asn_SPC_toBeSigned_specs_2 = { sizeof(struct toBeSigned), offsetof(struct toBeSigned, _asn_ctx), - asn_MAP_toBeSigned_2_tag2el, + asn_MAP_toBeSigned_tag2el_2, 3, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ -1, /* Start extensions */ -1 /* Stop extensions */ }; @@ -115,16 +122,18 @@ asn_TYPE_descriptor_t asn_DEF_toBeSigned_2 = { SEQUENCE_encode_der, SEQUENCE_decode_xer, SEQUENCE_encode_xer, + 0, /* No PER decoder, -gen-PER to enable */ 0, /* Use generic outmost tag fetcher */ - asn_DEF_toBeSigned_2_tags, - sizeof(asn_DEF_toBeSigned_2_tags) - /sizeof(asn_DEF_toBeSigned_2_tags[0]), /* 1 */ - asn_DEF_toBeSigned_2_tags, /* Same as above */ - sizeof(asn_DEF_toBeSigned_2_tags) - /sizeof(asn_DEF_toBeSigned_2_tags[0]), /* 1 */ + asn_DEF_toBeSigned_tags_2, + sizeof(asn_DEF_toBeSigned_tags_2) + /sizeof(asn_DEF_toBeSigned_tags_2[0]), /* 1 */ + asn_DEF_toBeSigned_tags_2, /* Same as above */ + sizeof(asn_DEF_toBeSigned_tags_2) + /sizeof(asn_DEF_toBeSigned_tags_2[0]), /* 1 */ + 0, /* No PER visible constraints */ asn_MBR_toBeSigned_2, 3, /* Elements count */ - &asn_SPC_toBeSigned_2_specs /* Additional specs */ + &asn_SPC_toBeSigned_specs_2 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_Certificate_1[] = { @@ -133,6 +142,8 @@ static asn_TYPE_member_t asn_MBR_Certificate_1[] = { .tag_mode = 0, .type = &asn_DEF_toBeSigned_2, .memb_constraints = 0, /* Defer constraints checking to the member type */ + .per_constraints = 0, /* PER is not compiled, use -gen-PER */ + .default_value = 0, .name = "toBeSigned" }, { ATF_NOFLAGS, 0, offsetof(struct Certificate, algorithm), @@ -140,29 +151,34 @@ static asn_TYPE_member_t asn_MBR_Certificate_1[] = { .tag_mode = 0, .type = &asn_DEF_OBJECT_IDENTIFIER, .memb_constraints = 0, /* Defer constraints checking to the member type */ + .per_constraints = 0, /* PER is not compiled, use -gen-PER */ + .default_value = 0, .name = "algorithm" }, { ATF_NOFLAGS, 0, offsetof(struct Certificate, signature), .tag = (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), .tag_mode = 0, .type = &asn_DEF_BIT_STRING, - .memb_constraints = memb_signature_1_constraint, + .memb_constraints = memb_signature_constraint_1, + .per_constraints = 0, /* PER is not compiled, use -gen-PER */ + .default_value = 0, .name = "signature" }, }; -static ber_tlv_tag_t asn_DEF_Certificate_1_tags[] = { +static ber_tlv_tag_t asn_DEF_Certificate_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; -static asn_TYPE_tag2member_t asn_MAP_Certificate_1_tag2el[] = { +static asn_TYPE_tag2member_t asn_MAP_Certificate_tag2el_1[] = { { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 2, 0, 0 }, /* signature at 17 */ { (ASN_TAG_CLASS_UNIVERSAL | (6 << 2)), 1, 0, 0 }, /* algorithm at 16 */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* toBeSigned at 21 */ }; -static asn_SEQUENCE_specifics_t asn_SPC_Certificate_1_specs = { +static asn_SEQUENCE_specifics_t asn_SPC_Certificate_specs_1 = { sizeof(struct Certificate), offsetof(struct Certificate, _asn_ctx), - asn_MAP_Certificate_1_tag2el, + asn_MAP_Certificate_tag2el_1, 3, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ -1, /* Start extensions */ -1 /* Stop extensions */ }; @@ -176,16 +192,18 @@ asn_TYPE_descriptor_t asn_DEF_Certificate = { SEQUENCE_encode_der, SEQUENCE_decode_xer, SEQUENCE_encode_xer, + 0, /* No PER decoder, -gen-PER to enable */ 0, /* Use generic outmost tag fetcher */ - asn_DEF_Certificate_1_tags, - sizeof(asn_DEF_Certificate_1_tags) - /sizeof(asn_DEF_Certificate_1_tags[0]), /* 1 */ - asn_DEF_Certificate_1_tags, /* Same as above */ - sizeof(asn_DEF_Certificate_1_tags) - /sizeof(asn_DEF_Certificate_1_tags[0]), /* 1 */ + asn_DEF_Certificate_tags_1, + sizeof(asn_DEF_Certificate_tags_1) + /sizeof(asn_DEF_Certificate_tags_1[0]), /* 1 */ + asn_DEF_Certificate_tags_1, /* Same as above */ + sizeof(asn_DEF_Certificate_tags_1) + /sizeof(asn_DEF_Certificate_tags_1[0]), /* 1 */ + 0, /* No PER visible constraints */ asn_MBR_Certificate_1, 3, /* Elements count */ - &asn_SPC_Certificate_1_specs /* Additional specs */ + &asn_SPC_Certificate_specs_1 /* Additional specs */ }; @@ -223,13 +241,15 @@ static asn_TYPE_member_t asn_MBR_Name_1[] = { .tag_mode = 0, .type = &asn_DEF_RelativeDistinguishedName, .memb_constraints = 0, /* Defer constraints checking to the member type */ + .per_constraints = 0, /* PER is not compiled, use -gen-PER */ + .default_value = 0, .name = "" }, }; -static ber_tlv_tag_t asn_DEF_Name_1_tags[] = { +static ber_tlv_tag_t asn_DEF_Name_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; -static asn_SET_OF_specifics_t asn_SPC_Name_1_specs = { +static asn_SET_OF_specifics_t asn_SPC_Name_specs_1 = { sizeof(struct Name), offsetof(struct Name, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ @@ -244,16 +264,18 @@ asn_TYPE_descriptor_t asn_DEF_Name = { SEQUENCE_OF_encode_der, SEQUENCE_OF_decode_xer, SEQUENCE_OF_encode_xer, + 0, /* No PER decoder, -gen-PER to enable */ 0, /* Use generic outmost tag fetcher */ - asn_DEF_Name_1_tags, - sizeof(asn_DEF_Name_1_tags) - /sizeof(asn_DEF_Name_1_tags[0]), /* 1 */ - asn_DEF_Name_1_tags, /* Same as above */ - sizeof(asn_DEF_Name_1_tags) - /sizeof(asn_DEF_Name_1_tags[0]), /* 1 */ + asn_DEF_Name_tags_1, + sizeof(asn_DEF_Name_tags_1) + /sizeof(asn_DEF_Name_tags_1[0]), /* 1 */ + asn_DEF_Name_tags_1, /* Same as above */ + sizeof(asn_DEF_Name_tags_1) + /sizeof(asn_DEF_Name_tags_1[0]), /* 1 */ + 0, /* No PER visible constraints */ asn_MBR_Name_1, 1, /* Single element */ - &asn_SPC_Name_1_specs /* Additional specs */ + &asn_SPC_Name_specs_1 /* Additional specs */ }; @@ -307,7 +329,7 @@ static int check_permitted_alphabet_2(const void *sptr) { /*** <<< CODE [RelativeDistinguishedName] >>> ***/ static int -memb_IA5String_1_constraint(asn_TYPE_descriptor_t *td, const void *sptr, +memb_IA5String_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, asn_app_consume_bytes_f *app_errlog, void *app_key) { const IA5String_t *st = (const IA5String_t *)sptr; @@ -338,14 +360,16 @@ static asn_TYPE_member_t asn_MBR_RelativeDistinguishedName_1[] = { .tag = (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)), .tag_mode = 0, .type = &asn_DEF_IA5String, - .memb_constraints = memb_IA5String_1_constraint, + .memb_constraints = memb_IA5String_constraint_1, + .per_constraints = 0, /* PER is not compiled, use -gen-PER */ + .default_value = 0, .name = "" }, }; -static ber_tlv_tag_t asn_DEF_RelativeDistinguishedName_1_tags[] = { +static ber_tlv_tag_t asn_DEF_RelativeDistinguishedName_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) }; -static asn_SET_OF_specifics_t asn_SPC_RelativeDistinguishedName_1_specs = { +static asn_SET_OF_specifics_t asn_SPC_RelativeDistinguishedName_specs_1 = { sizeof(struct RelativeDistinguishedName), offsetof(struct RelativeDistinguishedName, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ @@ -360,15 +384,17 @@ asn_TYPE_descriptor_t asn_DEF_RelativeDistinguishedName = { SET_OF_encode_der, SET_OF_decode_xer, SET_OF_encode_xer, + 0, /* No PER decoder, -gen-PER to enable */ 0, /* Use generic outmost tag fetcher */ - asn_DEF_RelativeDistinguishedName_1_tags, - sizeof(asn_DEF_RelativeDistinguishedName_1_tags) - /sizeof(asn_DEF_RelativeDistinguishedName_1_tags[0]), /* 1 */ - asn_DEF_RelativeDistinguishedName_1_tags, /* Same as above */ - sizeof(asn_DEF_RelativeDistinguishedName_1_tags) - /sizeof(asn_DEF_RelativeDistinguishedName_1_tags[0]), /* 1 */ + asn_DEF_RelativeDistinguishedName_tags_1, + sizeof(asn_DEF_RelativeDistinguishedName_tags_1) + /sizeof(asn_DEF_RelativeDistinguishedName_tags_1[0]), /* 1 */ + asn_DEF_RelativeDistinguishedName_tags_1, /* Same as above */ + sizeof(asn_DEF_RelativeDistinguishedName_tags_1) + /sizeof(asn_DEF_RelativeDistinguishedName_tags_1[0]), /* 1 */ + 0, /* No PER visible constraints */ asn_MBR_RelativeDistinguishedName_1, 1, /* Single element */ - &asn_SPC_RelativeDistinguishedName_1_specs /* Additional specs */ + &asn_SPC_RelativeDistinguishedName_specs_1 /* Additional specs */ }; |