Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
asn1c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
qwebaby3
asn1c
Commits
634a3b8f
Commit
634a3b8f
authored
Aug 22, 2004
by
Lev Walkin
Browse files
Options
Downloads
Patches
Plain Diff
better support for underlying type
parent
08079b01
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
libasn1compiler/asn1c_constraint.c
+10
-7
10 additions, 7 deletions
libasn1compiler/asn1c_constraint.c
tests/50-constraint-OK.asn1.-P
+43
-63
43 additions, 63 deletions
tests/50-constraint-OK.asn1.-P
with
53 additions
and
70 deletions
libasn1compiler/asn1c_constraint.c
+
10
−
7
View file @
634a3b8f
...
@@ -345,17 +345,20 @@ asn1c_emit_constraint_tables(arg_t *arg, int got_size) {
...
@@ -345,17 +345,20 @@ asn1c_emit_constraint_tables(arg_t *arg, int got_size) {
static
int
static
int
emit_alphabet_check_loop
(
arg_t
*
arg
,
asn1cnst_range_t
*
range
)
{
emit_alphabet_check_loop
(
arg_t
*
arg
,
asn1cnst_range_t
*
range
)
{
asn1p_expr_type_e
etype
;
asn1_integer_t
natural_stop
;
asn1_integer_t
natural_stop
;
asn1p_expr_t
*
terminal
;
etype
=
_find_terminal_type
(
arg
);
terminal
=
asn1f
_find_terminal_type
_ex
(
arg
->
asn
,
arg
->
mod
,
arg
->
expr
);
if
(
terminal
)
{
OUT
(
"/* The underlying type is %s */
\n
"
,
OUT
(
"/* The underlying type is %s */
\n
"
,
ASN_EXPR_TYPE2STR
(
etype
));
ASN_EXPR_TYPE2STR
(
terminal
->
expr_type
));
}
else
{
terminal
=
arg
->
expr
;
}
OUT
(
"const %s_t *st = sptr;
\n
"
,
OUT
(
"const %s_t *st = sptr;
\n
"
,
asn1c_type_name
(
arg
,
arg
->
expr
,
TNF_SAFE
));
asn1c_type_name
(
arg
,
terminal
,
TNF_SAFE
));
switch
(
e
type
)
{
switch
(
terminal
->
expr_
type
)
{
case
ASN_STRING_UTF8String
:
case
ASN_STRING_UTF8String
:
OUT
(
"const uint8_t *ch = st->buf;
\n
"
);
OUT
(
"const uint8_t *ch = st->buf;
\n
"
);
OUT
(
"const uint8_t *end = ch + st->size;
\n
"
);
OUT
(
"const uint8_t *end = ch + st->size;
\n
"
);
...
...
This diff is collapsed.
Click to expand it.
tests/50-constraint-OK.asn1.-P
+
43
−
63
View file @
634a3b8f
...
@@ -8,7 +8,6 @@
...
@@ -8,7 +8,6 @@
typedef INTEGER_t Int1_t;
typedef INTEGER_t Int1_t;
/*** <<< FUNC-DECLS [Int1] >>> ***/
/*** <<< FUNC-DECLS [Int1] >>> ***/
extern asn1_TYPE_descriptor_t asn1_DEF_Int1;
extern asn1_TYPE_descriptor_t asn1_DEF_Int1;
...
@@ -109,7 +108,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Int1 = {
...
@@ -109,7 +108,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Int1 = {
typedef Int1_t Int2_t;
typedef Int1_t Int2_t;
/*** <<< FUNC-DECLS [Int2] >>> ***/
/*** <<< FUNC-DECLS [Int2] >>> ***/
extern asn1_TYPE_descriptor_t asn1_DEF_Int2;
extern asn1_TYPE_descriptor_t asn1_DEF_Int2;
...
@@ -125,7 +123,7 @@ int
...
@@ -125,7 +123,7 @@ int
Int2_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
Int2_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
asn_app_consume_bytes_f *app_errlog, void *app_key) {
const Int
2
_t *st = sptr;
const Int
1
_t *st = sptr;
long value;
long value;
if(!sptr) {
if(!sptr) {
...
@@ -229,7 +227,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Int2 = {
...
@@ -229,7 +227,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Int2 = {
typedef Int2_t Int3_t;
typedef Int2_t Int3_t;
/*** <<< FUNC-DECLS [Int3] >>> ***/
/*** <<< FUNC-DECLS [Int3] >>> ***/
extern asn1_TYPE_descriptor_t asn1_DEF_Int3;
extern asn1_TYPE_descriptor_t asn1_DEF_Int3;
...
@@ -245,7 +242,7 @@ int
...
@@ -245,7 +242,7 @@ int
Int3_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
Int3_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
asn_app_consume_bytes_f *app_errlog, void *app_key) {
const Int
3
_t *st = sptr;
const Int
2
_t *st = sptr;
long value;
long value;
if(!sptr) {
if(!sptr) {
...
@@ -349,7 +346,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Int3 = {
...
@@ -349,7 +346,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Int3 = {
typedef Int3_t Int4_t;
typedef Int3_t Int4_t;
/*** <<< FUNC-DECLS [Int4] >>> ***/
/*** <<< FUNC-DECLS [Int4] >>> ***/
extern asn1_TYPE_descriptor_t asn1_DEF_Int4;
extern asn1_TYPE_descriptor_t asn1_DEF_Int4;
...
@@ -365,7 +361,7 @@ int
...
@@ -365,7 +361,7 @@ int
Int4_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
Int4_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
asn_app_consume_bytes_f *app_errlog, void *app_key) {
const Int
4
_t *st = sptr;
const Int
3
_t *st = sptr;
if(!sptr) {
if(!sptr) {
_ASN_ERRLOG(app_errlog, app_key,
_ASN_ERRLOG(app_errlog, app_key,
...
@@ -463,7 +459,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Int4 = {
...
@@ -463,7 +459,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Int4 = {
typedef Int4_t Int5_t;
typedef Int4_t Int5_t;
/*** <<< FUNC-DECLS [Int5] >>> ***/
/*** <<< FUNC-DECLS [Int5] >>> ***/
extern asn1_TYPE_descriptor_t asn1_DEF_Int5;
extern asn1_TYPE_descriptor_t asn1_DEF_Int5;
...
@@ -479,7 +474,7 @@ int
...
@@ -479,7 +474,7 @@ int
Int5_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
Int5_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
asn_app_consume_bytes_f *app_errlog, void *app_key) {
const Int
5
_t *st = sptr;
const Int
4
_t *st = sptr;
long value;
long value;
if(!sptr) {
if(!sptr) {
...
@@ -583,7 +578,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Int5 = {
...
@@ -583,7 +578,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Int5 = {
typedef INTEGER_t ExtensibleExtensions_t;
typedef INTEGER_t ExtensibleExtensions_t;
/*** <<< FUNC-DECLS [ExtensibleExtensions] >>> ***/
/*** <<< FUNC-DECLS [ExtensibleExtensions] >>> ***/
extern asn1_TYPE_descriptor_t asn1_DEF_ExtensibleExtensions;
extern asn1_TYPE_descriptor_t asn1_DEF_ExtensibleExtensions;
...
@@ -599,7 +593,7 @@ int
...
@@ -599,7 +593,7 @@ int
ExtensibleExtensions_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
ExtensibleExtensions_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
asn_app_consume_bytes_f *app_errlog, void *app_key) {
const
ExtensibleExtensions
_t *st = sptr;
const
INTEGER
_t *st = sptr;
if(!sptr) {
if(!sptr) {
_ASN_ERRLOG(app_errlog, app_key,
_ASN_ERRLOG(app_errlog, app_key,
...
@@ -697,7 +691,6 @@ asn1_TYPE_descriptor_t asn1_DEF_ExtensibleExtensions = {
...
@@ -697,7 +691,6 @@ asn1_TYPE_descriptor_t asn1_DEF_ExtensibleExtensions = {
typedef IA5String_t Str1_t;
typedef IA5String_t Str1_t;
/*** <<< FUNC-DECLS [Str1] >>> ***/
/*** <<< FUNC-DECLS [Str1] >>> ***/
extern asn1_TYPE_descriptor_t asn1_DEF_Str1;
extern asn1_TYPE_descriptor_t asn1_DEF_Str1;
...
@@ -798,7 +791,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Str1 = {
...
@@ -798,7 +791,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Str1 = {
typedef Str1_t Str2_t;
typedef Str1_t Str2_t;
/*** <<< FUNC-DECLS [Str2] >>> ***/
/*** <<< FUNC-DECLS [Str2] >>> ***/
extern asn1_TYPE_descriptor_t asn1_DEF_Str2;
extern asn1_TYPE_descriptor_t asn1_DEF_Str2;
...
@@ -812,9 +804,9 @@ asn_struct_free_f Str2_free;
...
@@ -812,9 +804,9 @@ asn_struct_free_f Str2_free;
static int check_permitted_alphabet_1(const void *sptr) {
static int check_permitted_alphabet_1(const void *sptr) {
/* The underlying type is IA5String */
/* The underlying type is IA5String */
const
Str1
_t *st = sptr;
const
IA5String
_t *st = sptr;
uint8_t *ch = st->buf;
const
uint8_t *ch = st->buf;
uint8_t *end = ch + st->size;
const
uint8_t *end = ch + st->size;
for(; ch < end; ch++) {
for(; ch < end; ch++) {
uint8_t cv = *ch;
uint8_t cv = *ch;
...
@@ -830,7 +822,7 @@ int
...
@@ -830,7 +822,7 @@ int
Str2_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
Str2_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
asn_app_consume_bytes_f *app_errlog, void *app_key) {
const Str
2
_t *st = sptr;
const Str
1
_t *st = sptr;
size_t size;
size_t size;
if(!sptr) {
if(!sptr) {
...
@@ -931,7 +923,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Str2 = {
...
@@ -931,7 +923,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Str2 = {
typedef Str2_t Str3_t;
typedef Str2_t Str3_t;
/*** <<< FUNC-DECLS [Str3] >>> ***/
/*** <<< FUNC-DECLS [Str3] >>> ***/
extern asn1_TYPE_descriptor_t asn1_DEF_Str3;
extern asn1_TYPE_descriptor_t asn1_DEF_Str3;
...
@@ -956,9 +947,9 @@ static int permitted_alphabet_table_2[256] = {
...
@@ -956,9 +947,9 @@ static int permitted_alphabet_table_2[256] = {
static int check_permitted_alphabet_2(const void *sptr) {
static int check_permitted_alphabet_2(const void *sptr) {
int *table = permitted_alphabet_table_2;
int *table = permitted_alphabet_table_2;
/* The underlying type is IA5String */
/* The underlying type is IA5String */
const
Str2
_t *st = sptr;
const
IA5String
_t *st = sptr;
uint8_t *ch = st->buf;
const
uint8_t *ch = st->buf;
uint8_t *end = ch + st->size;
const
uint8_t *end = ch + st->size;
for(; ch < end; ch++) {
for(; ch < end; ch++) {
uint8_t cv = *ch;
uint8_t cv = *ch;
...
@@ -974,7 +965,7 @@ int
...
@@ -974,7 +965,7 @@ int
Str3_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
Str3_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
asn_app_consume_bytes_f *app_errlog, void *app_key) {
const Str
3
_t *st = sptr;
const Str
2
_t *st = sptr;
size_t size;
size_t size;
if(!sptr) {
if(!sptr) {
...
@@ -1075,7 +1066,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Str3 = {
...
@@ -1075,7 +1066,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Str3 = {
typedef IA5String_t PER_Visible_t;
typedef IA5String_t PER_Visible_t;
/*** <<< FUNC-DECLS [PER-Visible] >>> ***/
/*** <<< FUNC-DECLS [PER-Visible] >>> ***/
extern asn1_TYPE_descriptor_t asn1_DEF_PER_Visible;
extern asn1_TYPE_descriptor_t asn1_DEF_PER_Visible;
...
@@ -1090,8 +1080,8 @@ asn_struct_free_f PER_Visible_free;
...
@@ -1090,8 +1080,8 @@ asn_struct_free_f PER_Visible_free;
static int check_permitted_alphabet_3(const void *sptr) {
static int check_permitted_alphabet_3(const void *sptr) {
/* The underlying type is IA5String */
/* The underlying type is IA5String */
const IA5String_t *st = sptr;
const IA5String_t *st = sptr;
uint8_t *ch = st->buf;
const
uint8_t *ch = st->buf;
uint8_t *end = ch + st->size;
const
uint8_t *end = ch + st->size;
for(; ch < end; ch++) {
for(; ch < end; ch++) {
uint8_t cv = *ch;
uint8_t cv = *ch;
...
@@ -1107,7 +1097,7 @@ int
...
@@ -1107,7 +1097,7 @@ int
PER_Visible_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
PER_Visible_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
asn_app_consume_bytes_f *app_errlog, void *app_key) {
const
PER_Visible
_t *st = sptr;
const
IA5String
_t *st = sptr;
if(!sptr) {
if(!sptr) {
_ASN_ERRLOG(app_errlog, app_key,
_ASN_ERRLOG(app_errlog, app_key,
...
@@ -1205,7 +1195,6 @@ asn1_TYPE_descriptor_t asn1_DEF_PER_Visible = {
...
@@ -1205,7 +1195,6 @@ asn1_TYPE_descriptor_t asn1_DEF_PER_Visible = {
typedef PER_Visible_t PER_Visible_2_t;
typedef PER_Visible_t PER_Visible_2_t;
/*** <<< FUNC-DECLS [PER-Visible-2] >>> ***/
/*** <<< FUNC-DECLS [PER-Visible-2] >>> ***/
extern asn1_TYPE_descriptor_t asn1_DEF_PER_Visible_2;
extern asn1_TYPE_descriptor_t asn1_DEF_PER_Visible_2;
...
@@ -1219,9 +1208,9 @@ asn_struct_free_f PER_Visible_2_free;
...
@@ -1219,9 +1208,9 @@ asn_struct_free_f PER_Visible_2_free;
static int check_permitted_alphabet_4(const void *sptr) {
static int check_permitted_alphabet_4(const void *sptr) {
/* The underlying type is IA5String */
/* The underlying type is IA5String */
const
PER_Visible
_t *st = sptr;
const
IA5String
_t *st = sptr;
uint8_t *ch = st->buf;
const
uint8_t *ch = st->buf;
uint8_t *end = ch + st->size;
const
uint8_t *end = ch + st->size;
for(; ch < end; ch++) {
for(; ch < end; ch++) {
uint8_t cv = *ch;
uint8_t cv = *ch;
...
@@ -1237,7 +1226,7 @@ int
...
@@ -1237,7 +1226,7 @@ int
PER_Visible_2_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
PER_Visible_2_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
asn_app_consume_bytes_f *app_errlog, void *app_key) {
const PER_Visible_
2_
t *st = sptr;
const PER_Visible_t *st = sptr;
if(!sptr) {
if(!sptr) {
_ASN_ERRLOG(app_errlog, app_key,
_ASN_ERRLOG(app_errlog, app_key,
...
@@ -1335,7 +1324,6 @@ asn1_TYPE_descriptor_t asn1_DEF_PER_Visible_2 = {
...
@@ -1335,7 +1324,6 @@ asn1_TYPE_descriptor_t asn1_DEF_PER_Visible_2 = {
typedef PER_Visible_t Not_PER_Visible_1_t;
typedef PER_Visible_t Not_PER_Visible_1_t;
/*** <<< FUNC-DECLS [Not-PER-Visible-1] >>> ***/
/*** <<< FUNC-DECLS [Not-PER-Visible-1] >>> ***/
extern asn1_TYPE_descriptor_t asn1_DEF_Not_PER_Visible_1;
extern asn1_TYPE_descriptor_t asn1_DEF_Not_PER_Visible_1;
...
@@ -1349,9 +1337,9 @@ asn_struct_free_f Not_PER_Visible_1_free;
...
@@ -1349,9 +1337,9 @@ asn_struct_free_f Not_PER_Visible_1_free;
static int check_permitted_alphabet_5(const void *sptr) {
static int check_permitted_alphabet_5(const void *sptr) {
/* The underlying type is IA5String */
/* The underlying type is IA5String */
const
PER_Visible
_t *st = sptr;
const
IA5String
_t *st = sptr;
uint8_t *ch = st->buf;
const
uint8_t *ch = st->buf;
uint8_t *end = ch + st->size;
const
uint8_t *end = ch + st->size;
for(; ch < end; ch++) {
for(; ch < end; ch++) {
uint8_t cv = *ch;
uint8_t cv = *ch;
...
@@ -1367,7 +1355,7 @@ int
...
@@ -1367,7 +1355,7 @@ int
Not_PER_Visible_1_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
Not_PER_Visible_1_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
asn_app_consume_bytes_f *app_errlog, void *app_key) {
const
Not_
PER_Visible_
1_
t *st = sptr;
const PER_Visible_t *st = sptr;
if(!sptr) {
if(!sptr) {
_ASN_ERRLOG(app_errlog, app_key,
_ASN_ERRLOG(app_errlog, app_key,
...
@@ -1465,7 +1453,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Not_PER_Visible_1 = {
...
@@ -1465,7 +1453,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Not_PER_Visible_1 = {
typedef PER_Visible_t Not_PER_Visible_2_t;
typedef PER_Visible_t Not_PER_Visible_2_t;
/*** <<< FUNC-DECLS [Not-PER-Visible-2] >>> ***/
/*** <<< FUNC-DECLS [Not-PER-Visible-2] >>> ***/
extern asn1_TYPE_descriptor_t asn1_DEF_Not_PER_Visible_2;
extern asn1_TYPE_descriptor_t asn1_DEF_Not_PER_Visible_2;
...
@@ -1481,7 +1468,7 @@ int
...
@@ -1481,7 +1468,7 @@ int
Not_PER_Visible_2_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
Not_PER_Visible_2_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
asn_app_consume_bytes_f *app_errlog, void *app_key) {
const
Not_
PER_Visible_
2_
t *st = sptr;
const PER_Visible_t *st = sptr;
if(!sptr) {
if(!sptr) {
_ASN_ERRLOG(app_errlog, app_key,
_ASN_ERRLOG(app_errlog, app_key,
...
@@ -1579,7 +1566,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Not_PER_Visible_2 = {
...
@@ -1579,7 +1566,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Not_PER_Visible_2 = {
typedef PER_Visible_t Not_PER_Visible_3_t;
typedef PER_Visible_t Not_PER_Visible_3_t;
/*** <<< FUNC-DECLS [Not-PER-Visible-3] >>> ***/
/*** <<< FUNC-DECLS [Not-PER-Visible-3] >>> ***/
extern asn1_TYPE_descriptor_t asn1_DEF_Not_PER_Visible_3;
extern asn1_TYPE_descriptor_t asn1_DEF_Not_PER_Visible_3;
...
@@ -1595,7 +1581,7 @@ int
...
@@ -1595,7 +1581,7 @@ int
Not_PER_Visible_3_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
Not_PER_Visible_3_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
asn_app_consume_bytes_f *app_errlog, void *app_key) {
const
Not_
PER_Visible_
3_
t *st = sptr;
const PER_Visible_t *st = sptr;
if(!sptr) {
if(!sptr) {
_ASN_ERRLOG(app_errlog, app_key,
_ASN_ERRLOG(app_errlog, app_key,
...
@@ -1693,7 +1679,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Not_PER_Visible_3 = {
...
@@ -1693,7 +1679,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Not_PER_Visible_3 = {
typedef PER_Visible_t SIZE_but_not_FROM_t;
typedef PER_Visible_t SIZE_but_not_FROM_t;
/*** <<< FUNC-DECLS [SIZE-but-not-FROM] >>> ***/
/*** <<< FUNC-DECLS [SIZE-but-not-FROM] >>> ***/
extern asn1_TYPE_descriptor_t asn1_DEF_SIZE_but_not_FROM;
extern asn1_TYPE_descriptor_t asn1_DEF_SIZE_but_not_FROM;
...
@@ -1707,9 +1692,9 @@ asn_struct_free_f SIZE_but_not_FROM_free;
...
@@ -1707,9 +1692,9 @@ asn_struct_free_f SIZE_but_not_FROM_free;
static int check_permitted_alphabet_6(const void *sptr) {
static int check_permitted_alphabet_6(const void *sptr) {
/* The underlying type is IA5String */
/* The underlying type is IA5String */
const
PER_Visible
_t *st = sptr;
const
IA5String
_t *st = sptr;
uint8_t *ch = st->buf;
const
uint8_t *ch = st->buf;
uint8_t *end = ch + st->size;
const
uint8_t *end = ch + st->size;
for(; ch < end; ch++) {
for(; ch < end; ch++) {
uint8_t cv = *ch;
uint8_t cv = *ch;
...
@@ -1725,7 +1710,7 @@ int
...
@@ -1725,7 +1710,7 @@ int
SIZE_but_not_FROM_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
SIZE_but_not_FROM_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
asn_app_consume_bytes_f *app_errlog, void *app_key) {
const
SIZE_but_not_FROM
_t *st = sptr;
const
PER_Visible
_t *st = sptr;
size_t size;
size_t size;
if(!sptr) {
if(!sptr) {
...
@@ -1826,7 +1811,6 @@ asn1_TYPE_descriptor_t asn1_DEF_SIZE_but_not_FROM = {
...
@@ -1826,7 +1811,6 @@ asn1_TYPE_descriptor_t asn1_DEF_SIZE_but_not_FROM = {
typedef PER_Visible_t SIZE_and_FROM_t;
typedef PER_Visible_t SIZE_and_FROM_t;
/*** <<< FUNC-DECLS [SIZE-and-FROM] >>> ***/
/*** <<< FUNC-DECLS [SIZE-and-FROM] >>> ***/
extern asn1_TYPE_descriptor_t asn1_DEF_SIZE_and_FROM;
extern asn1_TYPE_descriptor_t asn1_DEF_SIZE_and_FROM;
...
@@ -1840,9 +1824,9 @@ asn_struct_free_f SIZE_and_FROM_free;
...
@@ -1840,9 +1824,9 @@ asn_struct_free_f SIZE_and_FROM_free;
static int check_permitted_alphabet_7(const void *sptr) {
static int check_permitted_alphabet_7(const void *sptr) {
/* The underlying type is IA5String */
/* The underlying type is IA5String */
const
PER_Visible
_t *st = sptr;
const
IA5String
_t *st = sptr;
uint8_t *ch = st->buf;
const
uint8_t *ch = st->buf;
uint8_t *end = ch + st->size;
const
uint8_t *end = ch + st->size;
for(; ch < end; ch++) {
for(; ch < end; ch++) {
uint8_t cv = *ch;
uint8_t cv = *ch;
...
@@ -1858,7 +1842,7 @@ int
...
@@ -1858,7 +1842,7 @@ int
SIZE_and_FROM_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
SIZE_and_FROM_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
asn_app_consume_bytes_f *app_errlog, void *app_key) {
const
SIZE_and_FROM
_t *st = sptr;
const
PER_Visible
_t *st = sptr;
size_t size;
size_t size;
if(!sptr) {
if(!sptr) {
...
@@ -1959,7 +1943,6 @@ asn1_TYPE_descriptor_t asn1_DEF_SIZE_and_FROM = {
...
@@ -1959,7 +1943,6 @@ asn1_TYPE_descriptor_t asn1_DEF_SIZE_and_FROM = {
typedef PER_Visible_t Neither_SIZE_nor_FROM_t;
typedef PER_Visible_t Neither_SIZE_nor_FROM_t;
/*** <<< FUNC-DECLS [Neither-SIZE-nor-FROM] >>> ***/
/*** <<< FUNC-DECLS [Neither-SIZE-nor-FROM] >>> ***/
extern asn1_TYPE_descriptor_t asn1_DEF_Neither_SIZE_nor_FROM;
extern asn1_TYPE_descriptor_t asn1_DEF_Neither_SIZE_nor_FROM;
...
@@ -1973,9 +1956,9 @@ asn_struct_free_f Neither_SIZE_nor_FROM_free;
...
@@ -1973,9 +1956,9 @@ asn_struct_free_f Neither_SIZE_nor_FROM_free;
static int check_permitted_alphabet_8(const void *sptr) {
static int check_permitted_alphabet_8(const void *sptr) {
/* The underlying type is IA5String */
/* The underlying type is IA5String */
const
PER_Visible
_t *st = sptr;
const
IA5String
_t *st = sptr;
uint8_t *ch = st->buf;
const
uint8_t *ch = st->buf;
uint8_t *end = ch + st->size;
const
uint8_t *end = ch + st->size;
for(; ch < end; ch++) {
for(; ch < end; ch++) {
uint8_t cv = *ch;
uint8_t cv = *ch;
...
@@ -1991,7 +1974,7 @@ int
...
@@ -1991,7 +1974,7 @@ int
Neither_SIZE_nor_FROM_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
Neither_SIZE_nor_FROM_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
asn_app_consume_bytes_f *app_errlog, void *app_key) {
const
Neither_SIZE_nor_FROM
_t *st = sptr;
const
PER_Visible
_t *st = sptr;
if(!sptr) {
if(!sptr) {
_ASN_ERRLOG(app_errlog, app_key,
_ASN_ERRLOG(app_errlog, app_key,
...
@@ -2089,7 +2072,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Neither_SIZE_nor_FROM = {
...
@@ -2089,7 +2072,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Neither_SIZE_nor_FROM = {
typedef Utf8_2_t Utf8_3_t;
typedef Utf8_2_t Utf8_3_t;
/*** <<< FUNC-DECLS [Utf8-3] >>> ***/
/*** <<< FUNC-DECLS [Utf8-3] >>> ***/
extern asn1_TYPE_descriptor_t asn1_DEF_Utf8_3;
extern asn1_TYPE_descriptor_t asn1_DEF_Utf8_3;
...
@@ -2115,9 +2097,9 @@ static int permitted_alphabet_table_9[128] = {
...
@@ -2115,9 +2097,9 @@ static int permitted_alphabet_table_9[128] = {
static int check_permitted_alphabet_9(const void *sptr) {
static int check_permitted_alphabet_9(const void *sptr) {
int *table = permitted_alphabet_table_9;
int *table = permitted_alphabet_table_9;
/* The underlying type is UTF8String */
/* The underlying type is UTF8String */
const U
tf8_2
_t *st = sptr;
const U
TF8String
_t *st = sptr;
uint8_t *ch = st->buf;
const
uint8_t *ch = st->buf;
uint8_t *end = ch + st->size;
const
uint8_t *end = ch + st->size;
for(; ch < end; ch++) {
for(; ch < end; ch++) {
uint8_t cv = *ch;
uint8_t cv = *ch;
...
@@ -2134,7 +2116,7 @@ int
...
@@ -2134,7 +2116,7 @@ int
Utf8_3_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
Utf8_3_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
asn_app_consume_bytes_f *app_errlog, void *app_key) {
const Utf8_
3
_t *st = sptr;
const Utf8_
2
_t *st = sptr;
size_t size;
size_t size;
if(!sptr) {
if(!sptr) {
...
@@ -2236,7 +2218,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Utf8_3 = {
...
@@ -2236,7 +2218,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Utf8_3 = {
typedef Utf8_1_t Utf8_2_t;
typedef Utf8_1_t Utf8_2_t;
/*** <<< FUNC-DECLS [Utf8-2] >>> ***/
/*** <<< FUNC-DECLS [Utf8-2] >>> ***/
extern asn1_TYPE_descriptor_t asn1_DEF_Utf8_2;
extern asn1_TYPE_descriptor_t asn1_DEF_Utf8_2;
...
@@ -2252,7 +2233,7 @@ int
...
@@ -2252,7 +2233,7 @@ int
Utf8_2_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
Utf8_2_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
asn_app_consume_bytes_f *app_errlog, void *app_key) {
const Utf8_
2
_t *st = sptr;
const Utf8_
1
_t *st = sptr;
size_t size;
size_t size;
if(!sptr) {
if(!sptr) {
...
@@ -2353,7 +2334,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Utf8_2 = {
...
@@ -2353,7 +2334,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Utf8_2 = {
typedef UTF8String_t Utf8_1_t;
typedef UTF8String_t Utf8_1_t;
/*** <<< FUNC-DECLS [Utf8-1] >>> ***/
/*** <<< FUNC-DECLS [Utf8-1] >>> ***/
extern asn1_TYPE_descriptor_t asn1_DEF_Utf8_1;
extern asn1_TYPE_descriptor_t asn1_DEF_Utf8_1;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment