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
d6db8028
Commit
d6db8028
authored
Mar 18, 2005
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
better OID printing
parent
d7f237b8
Changes
25
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
63 additions
and
90 deletions
+63
-90
libasn1print/asn1print.c
libasn1print/asn1print.c
+11
-12
tests/04-enum-SE.asn1.-E
tests/04-enum-SE.asn1.-E
+2
-3
tests/07-int-OK.asn1.-EF
tests/07-int-OK.asn1.-EF
+2
-3
tests/14-resolver-OK.asn1.-EF
tests/14-resolver-OK.asn1.-EF
+6
-9
tests/16-constraint-OK.asn1.-EF
tests/16-constraint-OK.asn1.-EF
+2
-3
tests/19-param-OK.asn1.-EF
tests/19-param-OK.asn1.-EF
+2
-3
tests/20-constr-OK.asn1.-EF
tests/20-constr-OK.asn1.-EF
+2
-3
tests/21-tags-OK.asn1.-EF
tests/21-tags-OK.asn1.-EF
+4
-6
tests/22-tags-OK.asn1.-EF
tests/22-tags-OK.asn1.-EF
+2
-3
tests/23-bits-OK.asn1.-EF
tests/23-bits-OK.asn1.-EF
+2
-3
tests/24-sequence-OK.asn1.-EF
tests/24-sequence-OK.asn1.-EF
+2
-3
tests/31-set-of-OK.asn1.-EF
tests/31-set-of-OK.asn1.-EF
+2
-3
tests/32-sequence-of-OK.asn1.-EF
tests/32-sequence-of-OK.asn1.-EF
+2
-3
tests/34-class-OK.asn1.-EF
tests/34-class-OK.asn1.-EF
+2
-3
tests/37-indirect-choice-OK.asn1.-EF
tests/37-indirect-choice-OK.asn1.-EF
+2
-3
tests/42-real-life-OK.asn1.-EF
tests/42-real-life-OK.asn1.-EF
+2
-3
tests/45-undefined-type-SE.asn1.-EFfknown-extern-type=KnownExt
.../45-undefined-type-SE.asn1.-EFfknown-extern-type=KnownExt
+2
-3
tests/49-real-life-OK.asn1.-E
tests/49-real-life-OK.asn1.-E
+2
-3
tests/50-constraint-OK.asn1.-EFprint-constraints
tests/50-constraint-OK.asn1.-EFprint-constraints
+0
-0
tests/55-components-of-OK.asn1.-EF
tests/55-components-of-OK.asn1.-EF
+2
-3
tests/58-param-OK.asn1.-EF
tests/58-param-OK.asn1.-EF
+2
-3
tests/60-any-OK.asn1.-EF
tests/60-any-OK.asn1.-EF
+2
-3
tests/62-any-OK.asn1.-EF
tests/62-any-OK.asn1.-EF
+2
-3
tests/70-xer-test-OK.asn1.-EF
tests/70-xer-test-OK.asn1.-EF
+2
-3
tests/74-int-enum-constraints-OK.asn1.-EFprint-constraints
tests/74-int-enum-constraints-OK.asn1.-EFprint-constraints
+2
-3
No files found.
libasn1print/asn1print.c
View file @
d6db8028
...
...
@@ -18,7 +18,7 @@
} while(0)
static
int
asn1print_module
(
asn1p_t
*
asn
,
asn1p_module_t
*
mod
,
enum
asn1print_flags
flags
);
static
int
asn1print_oid
(
asn1p_oid_t
*
oid
,
enum
asn1print_flags
flags
);
static
int
asn1print_oid
(
int
prior_len
,
asn1p_oid_t
*
oid
,
enum
asn1print_flags
flags
);
static
int
asn1print_ref
(
asn1p_ref_t
*
ref
,
enum
asn1print_flags
flags
);
static
int
asn1print_tag
(
asn1p_expr_t
*
tc
,
enum
asn1print_flags
flags
);
static
int
asn1print_params
(
asn1p_paramlist_t
*
pl
,
enum
asn1print_flags
flags
);
...
...
@@ -67,7 +67,7 @@ asn1print_module(asn1p_t *asn, asn1p_module_t *mod, enum asn1print_flags flags)
printf
(
"%s "
,
mod
->
Identifier
);
if
(
mod
->
module_oid
)
{
asn1print_oid
(
mod
->
module_oid
,
flags
);
asn1print_oid
(
strlen
(
mod
->
Identifier
),
mod
->
module_oid
,
flags
);
printf
(
"
\n
"
);
}
...
...
@@ -116,8 +116,8 @@ asn1print_module(asn1p_t *asn, asn1p_module_t *mod, enum asn1print_flags flags)
}
static
int
asn1print_oid
(
asn1p_oid_t
*
oid
,
enum
asn1print_flags
flags
)
{
size_t
accum
=
0
;
asn1print_oid
(
int
prior_len
,
asn1p_oid_t
*
oid
,
enum
asn1print_flags
flags
)
{
size_t
accum
=
prior_len
;
int
ac
;
(
void
)
flags
;
/* Unused argument */
...
...
@@ -126,23 +126,22 @@ asn1print_oid(asn1p_oid_t *oid, enum asn1print_flags flags) {
for
(
ac
=
0
;
ac
<
oid
->
arcs_count
;
ac
++
)
{
const
char
*
arcname
=
oid
->
arcs
[
ac
].
name
;
if
(
accum
+
strlen
(
arcname
?
arcname
:
""
)
>
50
)
{
if
(
accum
+
strlen
(
arcname
?
arcname
:
""
)
>
75
)
{
printf
(
"
\n\t
"
);
accum
=
0
;
}
else
if
(
ac
)
{
printf
(
" "
);
}
else
{
accum
+=
printf
(
" "
);
}
if
(
arcname
)
{
printf
(
"%s"
,
arcname
);
accum
+=
printf
(
"%s"
,
arcname
);
if
(
oid
->
arcs
[
ac
].
number
>=
0
)
{
printf
(
"(%"
PRIdASN
")"
,
oid
->
arcs
[
ac
].
number
);
accum
+=
printf
(
"(%"
PRIdASN
")"
,
oid
->
arcs
[
ac
].
number
);
}
accum
+=
strlen
(
oid
->
arcs
[
ac
].
name
);
}
else
{
printf
(
"%"
PRIdASN
,
oid
->
arcs
[
ac
].
number
);
accum
+=
printf
(
"%"
PRIdASN
,
oid
->
arcs
[
ac
].
number
);
}
accum
+=
4
;
}
printf
(
" }"
);
...
...
tests/04-enum-SE.asn1.-E
View file @
d6db8028
ModuleTestEnum2 {iso org(3) dod(6) internet(1) private(4)
enterprise(1) spelio(9363) software(1) asn1c(5) test(1)
4 }
ModuleTestEnum2 { iso org(3) dod(6) internet(1) private(4) enterprise(1)
spelio(9363) software(1) asn1c(5) test(1) 4 }
DEFINITIONS ::=
BEGIN
...
...
tests/07-int-OK.asn1.-EF
View file @
d6db8028
ModuleTestInt1 {iso org(3) dod(6) internet(1) private(4)
enterprise(1) spelio(9363) software(1) asn1c(5) test(1)
7 }
ModuleTestInt1 { iso org(3) dod(6) internet(1) private(4) enterprise(1) spelio(9363)
software(1) asn1c(5) test(1) 7 }
DEFINITIONS ::=
BEGIN
...
...
tests/14-resolver-OK.asn1.-EF
View file @
d6db8028
ModuleTestResolver2 {iso org(3) dod(6) internet(1) private(4)
enterprise(1) spelio(9363) software(1) asn1c(5) test(1)
14 1 }
ModuleTestResolver2 { iso org(3) dod(6) internet(1) private(4) enterprise(1)
spelio(9363) software(1) asn1c(5) test(1) 14 1 }
DEFINITIONS ::=
BEGIN
...
...
@@ -19,9 +18,8 @@ check-other INTEGER ::= 1
END
ModuleTestResolver3 {iso org(3) dod(6) internet(1) private(4)
enterprise(1) spelio(9363) software(1) asn1c(5) test(1)
14 2 }
ModuleTestResolver3 { iso org(3) dod(6) internet(1) private(4) enterprise(1)
spelio(9363) software(1) asn1c(5) test(1) 14 2 }
DEFINITIONS ::=
BEGIN
...
...
@@ -34,9 +32,8 @@ Enumeration ::= ENUMERATED {
END
HiddenModule {iso org(3) dod(6) internet(1) private(4)
enterprise(1) spelio(9363) software(1) asn1c(5) test(1)
14 3 }
HiddenModule { iso org(3) dod(6) internet(1) private(4) enterprise(1) spelio(9363)
software(1) asn1c(5) test(1) 14 3 }
DEFINITIONS ::=
BEGIN
...
...
tests/16-constraint-OK.asn1.-EF
View file @
d6db8028
ModuleTestConstraint {iso org(3) dod(6) internet(1) private(4)
enterprise(1) spelio(9363) software(1) asn1c(5) test(1)
16 }
ModuleTestConstraint { iso org(3) dod(6) internet(1) private(4) enterprise(1)
spelio(9363) software(1) asn1c(5) test(1) 16 }
DEFINITIONS ::=
BEGIN
...
...
tests/19-param-OK.asn1.-EF
View file @
d6db8028
ModuleTestParam {iso org(3) dod(6) internet(1) private(4)
enterprise(1) spelio(9363) software(1) asn1c(5) test(1)
19 }
ModuleTestParam { iso org(3) dod(6) internet(1) private(4) enterprise(1)
spelio(9363) software(1) asn1c(5) test(1) 19 }
DEFINITIONS ::=
BEGIN
...
...
tests/20-constr-OK.asn1.-EF
View file @
d6db8028
ModuleTestConstr {iso org(3) dod(6) internet(1) private(4)
enterprise(1) spelio(9363) software(1) asn1c(5) test(1)
20 }
ModuleTestConstr { iso org(3) dod(6) internet(1) private(4) enterprise(1)
spelio(9363) software(1) asn1c(5) test(1) 20 }
DEFINITIONS IMPLICIT TAGS EXTENSIBILITY IMPLIED ::=
BEGIN
...
...
tests/21-tags-OK.asn1.-EF
View file @
d6db8028
ModuleTestTags1 {iso org(3) dod(6) internet(1) private(4)
enterprise(1) spelio(9363) software(1) asn1c(5) test(1)
21 1 }
ModuleTestTags1 { iso org(3) dod(6) internet(1) private(4) enterprise(1)
spelio(9363) software(1) asn1c(5) test(1) 21 1 }
DEFINITIONS EXPLICIT TAGS ::=
BEGIN
...
...
@@ -11,9 +10,8 @@ T1 ::= CHOICE {
END
ModuleTestTags2 {iso org(3) dod(6) internet(1) private(4)
enterprise(1) spelio(9363) software(1) asn1c(5) test(1)
21 2 }
ModuleTestTags2 { iso org(3) dod(6) internet(1) private(4) enterprise(1)
spelio(9363) software(1) asn1c(5) test(1) 21 2 }
DEFINITIONS IMPLICIT TAGS ::=
BEGIN
...
...
tests/22-tags-OK.asn1.-EF
View file @
d6db8028
ModuleTestTags3 {iso org(3) dod(6) internet(1) private(4)
enterprise(1) spelio(9363) software(1) asn1c(5) test(1)
22 }
ModuleTestTags3 { iso org(3) dod(6) internet(1) private(4) enterprise(1)
spelio(9363) software(1) asn1c(5) test(1) 22 }
DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
...
...
tests/23-bits-OK.asn1.-EF
View file @
d6db8028
ModuleTestBitString {iso org(3) dod(6) internet(1) private(4)
enterprise(1) spelio(9363) software(1) asn1c(5) test(1)
23 }
ModuleTestBitString { iso org(3) dod(6) internet(1) private(4) enterprise(1)
spelio(9363) software(1) asn1c(5) test(1) 23 }
DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
...
...
tests/24-sequence-OK.asn1.-EF
View file @
d6db8028
ModuleTestSequence {iso org(3) dod(6) internet(1) private(4)
enterprise(1) spelio(9363) software(1) asn1c(5) test(1)
24 }
ModuleTestSequence { iso org(3) dod(6) internet(1) private(4) enterprise(1)
spelio(9363) software(1) asn1c(5) test(1) 24 }
DEFINITIONS IMPLICIT TAGS ::=
BEGIN
...
...
tests/31-set-of-OK.asn1.-EF
View file @
d6db8028
ModuleTestSetOfSimple {iso org(3) dod(6) internet(1) private(4)
enterprise(1) spelio(9363) software(1) asn1c(5) test(1)
31 }
ModuleTestSetOfSimple { iso org(3) dod(6) internet(1) private(4) enterprise(1)
spelio(9363) software(1) asn1c(5) test(1) 31 }
DEFINITIONS IMPLICIT TAGS ::=
BEGIN
...
...
tests/32-sequence-of-OK.asn1.-EF
View file @
d6db8028
ModuleTestSequenceSimple {iso org(3) dod(6) internet(1) private(4)
enterprise(1) spelio(9363) software(1) asn1c(5) test(1)
32 }
ModuleTestSequenceSimple { iso org(3) dod(6) internet(1) private(4) enterprise(1)
spelio(9363) software(1) asn1c(5) test(1) 32 }
DEFINITIONS IMPLICIT TAGS ::=
BEGIN
...
...
tests/34-class-OK.asn1.-EF
View file @
d6db8028
ModuleTestClassSimple {iso org(3) dod(6) internet(1) private(4)
enterprise(1) spelio(9363) software(1) asn1c(5) test(1)
34 }
ModuleTestClassSimple { iso org(3) dod(6) internet(1) private(4) enterprise(1)
spelio(9363) software(1) asn1c(5) test(1) 34 }
DEFINITIONS IMPLICIT TAGS ::=
BEGIN
...
...
tests/37-indirect-choice-OK.asn1.-EF
View file @
d6db8028
ModuleTestIndirectChoiceFine {iso org(3) dod(6) internet(1) private(4)
enterprise(1) spelio(9363) software(1) asn1c(5) test(1)
37 }
ModuleTestIndirectChoiceFine { iso org(3) dod(6) internet(1) private(4)
enterprise(1) spelio(9363) software(1) asn1c(5) test(1) 37 }
DEFINITIONS IMPLICIT TAGS ::=
BEGIN
...
...
tests/42-real-life-OK.asn1.-EF
View file @
d6db8028
ModuleLAPStorage {iso org(3) dod(6) internet(1) private(4)
enterprise(1) spelio(9363) software(1) asn1c(5) test(1)
42 }
ModuleLAPStorage { iso org(3) dod(6) internet(1) private(4) enterprise(1)
spelio(9363) software(1) asn1c(5) test(1) 42 }
DEFINITIONS EXTENSIBILITY IMPLIED ::=
BEGIN
...
...
tests/45-undefined-type-SE.asn1.-EFfknown-extern-type=KnownExt
View file @
d6db8028
ModuleKnownExternType {iso org(3) dod(6) internet(1) private(4)
enterprise(1) spelio(9363) software(1) asn1c(5) test(1)
45 }
ModuleKnownExternType { iso org(3) dod(6) internet(1) private(4) enterprise(1)
spelio(9363) software(1) asn1c(5) test(1) 45 }
DEFINITIONS ::=
BEGIN
...
...
tests/49-real-life-OK.asn1.-E
View file @
d6db8028
ModuleSetChoiceExtensibility {iso org(3) dod(6) internet(1) private(4)
enterprise(1) spelio(9363) software(1) asn1c(5) test(1)
49 }
ModuleSetChoiceExtensibility { iso org(3) dod(6) internet(1) private(4)
enterprise(1) spelio(9363) software(1) asn1c(5) test(1) 49 }
DEFINITIONS ::=
BEGIN
...
...
tests/50-constraint-OK.asn1.-EFprint-constraints
View file @
d6db8028
No preview for this file type
tests/55-components-of-OK.asn1.-EF
View file @
d6db8028
ModuleTestComponentsOf {iso org(3) dod(6) internet(1) private(4)
enterprise(1) spelio(9363) software(1) asn1c(5) test(1)
55 }
ModuleTestComponentsOf { iso org(3) dod(6) internet(1) private(4) enterprise(1)
spelio(9363) software(1) asn1c(5) test(1) 55 }
DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
...
...
tests/58-param-OK.asn1.-EF
View file @
d6db8028
ModuleTestParam {iso org(3) dod(6) internet(1) private(4)
enterprise(1) spelio(9363) software(1) asn1c(5) test(1)
58 }
ModuleTestParam { iso org(3) dod(6) internet(1) private(4) enterprise(1)
spelio(9363) software(1) asn1c(5) test(1) 58 }
DEFINITIONS ::=
BEGIN
...
...
tests/60-any-OK.asn1.-EF
View file @
d6db8028
ModuleTestANY {iso org(3) dod(6) internet(1) private(4)
enterprise(1) spelio(9363) software(1) asn1c(5) test(1)
60 }
ModuleTestANY { iso org(3) dod(6) internet(1) private(4) enterprise(1) spelio(9363)
software(1) asn1c(5) test(1) 60 }
DEFINITIONS IMPLICIT TAGS ::=
BEGIN
...
...
tests/62-any-OK.asn1.-EF
View file @
d6db8028
ModuleTestANYSyntax {iso org(3) dod(6) internet(1) private(4)
enterprise(1) spelio(9363) software(1) asn1c(5) test(1)
62 }
ModuleTestANYSyntax { iso org(3) dod(6) internet(1) private(4) enterprise(1)
spelio(9363) software(1) asn1c(5) test(1) 62 }
DEFINITIONS IMPLICIT TAGS ::=
BEGIN
...
...
tests/70-xer-test-OK.asn1.-EF
View file @
d6db8028
ModuleTestXERDecoding {iso org(3) dod(6) internet(1) private(4)
enterprise(1) spelio(9363) software(1) asn1c(5) test(1)
70 }
ModuleTestXERDecoding { iso org(3) dod(6) internet(1) private(4) enterprise(1)
spelio(9363) software(1) asn1c(5) test(1) 70 }
DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
...
...
tests/74-int-enum-constraints-OK.asn1.-EFprint-constraints
View file @
d6db8028
ModuleTestIntegerAndEnumeratedConstraints {iso org(3) dod(6) internet(1) private(4)
enterprise(1) spelio(9363) software(1) asn1c(5) test(1)
74 }
ModuleTestIntegerAndEnumeratedConstraints { iso org(3) dod(6) internet(1)
private(4) enterprise(1) spelio(9363) software(1) asn1c(5) test(1) 74 }
DEFINITIONS ::=
BEGIN
...
...
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