Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
titan.ProtocolModules.JSON_Web_Signature
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Eclipse Projects
Eclipse Titan
titan.ProtocolModules.JSON_Web_Signature
Commits
4a17c99f
Commit
4a17c99f
authored
2 years ago
by
Adam Knapp
Browse files
Options
Downloads
Patches
Plain Diff
Updating copyright
parent
bdd9d94a
No related branches found
No related tags found
1 merge request
!1
Adding legal docs
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/JWS_Types.ttcn
+642
-642
642 additions, 642 deletions
src/JWS_Types.ttcn
src/JWS_func.cc
+48
-48
48 additions, 48 deletions
src/JWS_func.cc
src/JWS_helper.asn
+31
-31
31 additions, 31 deletions
src/JWS_helper.asn
with
721 additions
and
721 deletions
src/JWS_Types.ttcn
+
642
−
642
View file @
4a17c99f
This diff is collapsed.
Click to expand it.
src/JWS_func.cc
+
48
−
48
View file @
4a17c99f
/******************************************************************************
* Copyright (c) 2020
Ericsson AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
*
* Contributors:
* Gabor Szalai - initial implementation and initial documentation
******************************************************************************/
//
// File: JWS_func.cc
// Description: Type definitions for JWS, PASSporT and SHAKEN
///////////////////////////////////////////////
#include
<map>
#include
<string>
#include
"JWS_Types.hh"
namespace
JWS__Types
{
JWS__JSON__Object
f__sort__JWS__JSON__Object
(
const
JWS__JSON__Object
&
pl_unsorted
){
std
::
map
<
std
::
string
,
int
>
smap
;
for
(
int
i
=
0
;
i
<
pl_unsorted
.
lengthof
();
i
++
){
TTCN_Buffer
buf
;
pl_unsorted
[
i
].
key
().
encode_utf8
(
buf
);
smap
[
std
::
string
((
const
char
*
)
buf
.
get_data
(),
buf
.
get_len
())]
=
i
;
}
JWS__JSON__Object
ret_val
=
NULL_VALUE
;
int
a
=
0
;
for
(
std
::
map
<
std
::
string
,
int
>::
iterator
it
=
smap
.
begin
();
it
!=
smap
.
end
();
it
++
){
ret_val
[
a
].
key
()
=
pl_unsorted
[
it
->
second
].
key
();
if
(
pl_unsorted
[
it
->
second
].
val
().
ischosen
(
JSON__Generic
::
JSON__generic__val
::
ALT_JSON__object
)){
ret_val
[
a
].
val
().
JSON__object
()
=
f__sort__JWS__JSON__Object
(
pl_unsorted
[
it
->
second
].
val
().
JSON__object
());
}
else
{
ret_val
[
a
].
val
()
=
pl_unsorted
[
it
->
second
].
val
();
}
a
++
;
}
return
ret_val
;
}
}
/******************************************************************************
* Copyright (c) 2020
-2023
Ericsson AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
*
* Contributors:
* Gabor Szalai - initial implementation and initial documentation
******************************************************************************/
//
// File: JWS_func.cc
// Description: Type definitions for JWS, PASSporT and SHAKEN
///////////////////////////////////////////////
#include
<map>
#include
<string>
#include
"JWS_Types.hh"
namespace
JWS__Types
{
JWS__JSON__Object
f__sort__JWS__JSON__Object
(
const
JWS__JSON__Object
&
pl_unsorted
){
std
::
map
<
std
::
string
,
int
>
smap
;
for
(
int
i
=
0
;
i
<
pl_unsorted
.
lengthof
();
i
++
){
TTCN_Buffer
buf
;
pl_unsorted
[
i
].
key
().
encode_utf8
(
buf
);
smap
[
std
::
string
((
const
char
*
)
buf
.
get_data
(),
buf
.
get_len
())]
=
i
;
}
JWS__JSON__Object
ret_val
=
NULL_VALUE
;
int
a
=
0
;
for
(
std
::
map
<
std
::
string
,
int
>::
iterator
it
=
smap
.
begin
();
it
!=
smap
.
end
();
it
++
){
ret_val
[
a
].
key
()
=
pl_unsorted
[
it
->
second
].
key
();
if
(
pl_unsorted
[
it
->
second
].
val
().
ischosen
(
JSON__Generic
::
JSON__generic__val
::
ALT_JSON__object
)){
ret_val
[
a
].
val
().
JSON__object
()
=
f__sort__JWS__JSON__Object
(
pl_unsorted
[
it
->
second
].
val
().
JSON__object
());
}
else
{
ret_val
[
a
].
val
()
=
pl_unsorted
[
it
->
second
].
val
();
}
a
++
;
}
return
ret_val
;
}
}
This diff is collapsed.
Click to expand it.
src/JWS_helper.asn
+
31
−
31
View file @
4a17c99f
-- *****************************************************************************
-- Copyright (c) 2020 Ericsson AB
-- All rights reserved. This program and the accompanying materials
-- are made available under the terms of the Eclipse Public License v2.0
-- which accompanies this distribution, and is available at
-- https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
--
-- Contributors:
-- Gabor Szalai - initial implementation and initial documentation
-- *****************************************************************************/
--
-- File: JWS_helper.asn
-- Description: Type definitions for JWS, PASSporT and SHAKEN
-- /////////////////////////////////////////////
JWS-helper
DEFINITIONS
::=
BEGIN
IMPORTS;
JWS-helper-struct ::= SEQUENCE {
f1 INTEGER,
f2 INTEGER
}
END
\ No newline at end of file
-- *****************************************************************************
-- Copyright (c) 2020-2023 Ericsson AB
-- All rights reserved. This program and the accompanying materials
-- are made available under the terms of the Eclipse Public License v2.0
-- which accompanies this distribution, and is available at
-- https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
--
-- Contributors:
-- Gabor Szalai - initial implementation and initial documentation
-- *****************************************************************************/
--
-- File: JWS_helper.asn
-- Description: Type definitions for JWS, PASSporT and SHAKEN
-- /////////////////////////////////////////////
JWS-helper
DEFINITIONS
::=
BEGIN
IMPORTS;
JWS-helper-struct ::= SEQUENCE {
f1 INTEGER,
f2 INTEGER
}
END
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