Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
asn1c
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
asn1c
Commits
38d00171
Commit
38d00171
authored
Sep 21, 2006
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove extensions from the beginning of serially applied constraint
parent
1bad159a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
libasn1fix/asn1fix_constraint.c
libasn1fix/asn1fix_constraint.c
+11
-5
No files found.
libasn1fix/asn1fix_constraint.c
View file @
38d00171
...
...
@@ -2,7 +2,7 @@
#include "asn1fix_constraint.h"
#include "asn1fix_crange.h"
static
void
_remove_extensions
(
arg_t
*
arg
,
asn1p_constraint_t
*
ct
);
static
void
_remove_extensions
(
arg_t
*
arg
,
asn1p_constraint_t
*
ct
,
int
flast
);
static
int
constraint_type_resolve
(
arg_t
*
arg
,
asn1p_constraint_t
*
ct
);
static
int
constraint_value_resolve
(
arg_t
*
arg
,
asn1p_value_t
**
value
,
enum
asn1p_constraint_type_e
real_ctype
);
...
...
@@ -102,7 +102,7 @@ asn1constraint_pullup(arg_t *arg) {
/*
* If we have a parent, remove all the extensions (46.4).
*/
_remove_extensions
(
arg
,
ct_parent
);
_remove_extensions
(
arg
,
ct_parent
,
0
);
expr
->
combined_constraints
=
ct_parent
;
if
(
ct_expr
->
type
==
ACT_CA_SET
)
{
...
...
@@ -125,6 +125,7 @@ asn1constraint_pullup(arg_t *arg) {
ct_expr
);
}
}
else
{
_remove_extensions
(
arg
,
ct_expr
,
1
);
expr
->
combined_constraints
=
ct_expr
;
}
...
...
@@ -227,13 +228,18 @@ asn1constraint_resolve(arg_t *arg, asn1p_constraint_t *ct, asn1p_expr_type_e ety
}
static
void
_remove_extensions
(
arg_t
*
arg
,
asn1p_constraint_t
*
ct
)
{
_remove_extensions
(
arg_t
*
arg
,
asn1p_constraint_t
*
ct
,
int
forgive_last
)
{
unsigned
int
i
;
if
(
!
ct
)
return
;
for
(
i
=
0
;
i
<
ct
->
el_count
;
i
++
)
{
if
(
ct
->
elements
[
i
]
->
type
==
ACT_EL_EXT
)
break
;
_remove_extensions
(
arg
,
ct
->
elements
[
i
]);
if
(
forgive_last
&&
ct
->
type
==
ACT_CA_SET
&&
i
+
1
==
ct
->
el_count
)
return
;
_remove_extensions
(
arg
,
ct
->
elements
[
i
],
0
);
}
/* Remove the elements at and after the extensibility mark */
...
...
@@ -288,7 +294,7 @@ constraint_type_resolve(arg_t *arg, asn1p_constraint_t *ct) {
ct_expr
=
asn1p_constraint_clone
(
ct_expr
);
assert
(
ct_expr
);
_remove_extensions
(
arg
,
ct_expr
);
_remove_extensions
(
arg
,
ct_expr
,
0
);
if
(
ct_expr
->
type
==
ACT_CA_SET
)
{
unsigned
int
i
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment