Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TTCN-3 Libraries
LibIts
Commits
b74f5807
Commit
b74f5807
authored
Nov 01, 2018
by
garciay
Browse files
Add support of AuthorizarionRequest/Response
parent
2550f00a
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
ttcn/Pki/LibItsPki_EncdecDeclarations.ttcn
View file @
b74f5807
...
...
@@ -3,6 +3,8 @@ module LibItsPki_EncdecDeclarations {
// LibIts
import
from
EtsiTs102941BaseTypes
language
"ASN.1:1997"
all
;
import
from
EtsiTs102941TypesEnrolment
language
"ASN.1:1997"
all
;
import
from
EtsiTs102941TypesAuthorization
language
"ASN.1:1997"
all
;
import
from
EtsiTs102941TypesAuthorizationValidation
language
"ASN.1:1997"
all
;
import
from
EtsiTs102941MessagesItss
language
"ASN.1:1997"
all
;
import
from
EtsiTs103097Module
language
"ASN.1:1997"
all
;
...
...
@@ -37,4 +39,15 @@ module LibItsPki_EncdecDeclarations {
external
function
fx_dec_InnerEcResponse
(
inout
bitstring
b
,
out
EtsiTs102941TypesEnrolment
.
InnerEcResponse
p
)
return
integer
with
{
extension
"prototype(sliding) decode(PER)"
}
/**
* @desc Encoding function for EtsiTs102941TypesAuthorization SharedAtRequest
* @param p The certificate to encode
* @return The encode message in OER format
*/
external
function
fx_enc_SharedAtRequest
(
in
EtsiTs102941TypesAuthorization
.
SharedAtRequest
p
)
return
bitstring
with
{
extension
"prototype(convert) encode(PER)"
}
external
function
fx_dec_SharedAtRequest
(
inout
bitstring
b
,
out
EtsiTs102941TypesAuthorization
.
SharedAtRequest
p
)
return
integer
with
{
extension
"prototype(sliding) decode(PER)"
}
}
// End of module LibItsPki_EncdecDeclarations
ttcn/Pki/LibItsPki_Functions.ttcn
View file @
b74f5807
This diff is collapsed.
Click to expand it.
ttcn/Pki/LibItsPki_Pics.ttcn
View file @
b74f5807
...
...
@@ -29,5 +29,10 @@ module LibItsPki_Pics {
* @desc Certificate used by the Test System
*/
modulepar
charstring
PICS_HTTP_GET_URI
:=
"/its/inner_ec_request"
;
/**
* @desc Canonical ITSS-S identifier
*/
modulepar
charstring
PICS_ITS_S_CANONICAL_ID
:=
"CanonicalItsId"
;
}
// End of module LibItsPki_Pics
ttcn/Pki/LibItsPki_Templates.ttcn
View file @
b74f5807
...
...
@@ -296,5 +296,69 @@ module LibItsPki_Templates {
responseCode
:=
complement
(
ok
),
confirmedSubjectAttributes
:=
omit
}
// End of template mw_authorizationValidationResponse_ko
template
(
value
)
SharedAtRequest
m_shared_at_request
(
in
template
(
value
)
HashedId8
p_eaId
,
in
template
(
value
)
Oct16
p_keyTag
,
in
template
(
value
)
CertificateSubjectAttributes
p_requestedSubjectAttributes
)
:=
{
eaId
:=
p_eaId
,
keyTag
:=
p_keyTag
,
certificateFormat
:=
1
,
requestedSubjectAttributes
:=
p_requestedSubjectAttributes
}
// End of template m_shared_at_request
template
(
present
)
SharedAtRequest
mw_shared_at_request
(
template
(
present
)
HashedId8
p_eaId
:=
?
,
template
(
present
)
Oct16
p_keyTag
:=
?
,
template
(
present
)
CertificateSubjectAttributes
p_requestedSubjectAttributes
:=
?
)
:=
{
eaId
:=
p_eaId
,
keyTag
:=
p_keyTag
,
certificateFormat
:=
1
,
requestedSubjectAttributes
:=
p_requestedSubjectAttributes
}
// End of template mw_shared_at_request
template
(
value
)
EcSignature
m_ec_signature
(
in
template
(
value
)
EtsiTs103097Data
p_encryptedEcSignature
)
:=
{
encryptedEcSignature
:=
p_encryptedEcSignature
}
// End of template m_ec_signature
template
(
present
)
EcSignature
mw_ec_signature
(
template
(
present
)
EtsiTs103097Data
p_encryptedEcSignature
:=
?
)
:=
{
encryptedEcSignature
:=
p_encryptedEcSignature
}
// End of template mw_ec_signature
template
(
value
)
EcSignature
m_ec_signature_ext_payload
(
in
template
(
value
)
EtsiTs103097Data
p_ecSignature
)
:=
{
ecSignature
:=
p_ecSignature
}
// End of template m_ec_signature_ext_payload
template
(
present
)
EcSignature
mw_ec_signature_ext_payload
(
template
(
present
)
EtsiTs103097Data
p_ecSignature
:=
?
)
:=
{
ecSignature
:=
p_ecSignature
}
// End of template mw_ec_signature_ext_payload
template
(
omit
)
CertificateSubjectAttributes
m_certificate_subject_attributes
(
in
template
(
omit
)
CertificateId
p_id
:=
omit
,
in
template
(
omit
)
ValidityPeriod
p_validityPeriod
:=
omit
,
in
template
(
omit
)
GeographicRegion
p_region
:=
omit
,
in
template
(
omit
)
SubjectAssurance
p_assuranceLevel
:=
omit
,
in
template
(
omit
)
SequenceOfPsidSsp
p_appPermissions
:=
omit
,
in
template
(
omit
)
SequenceOfPsidGroupPermissions
p_certIssuePermissions
:=
omit
)
:=
{
id
:=
p_id
,
validityPeriod
:=
p_validityPeriod
,
region
:=
p_region
,
assuranceLevel
:=
p_assuranceLevel
,
appPermissions
:=
p_appPermissions
,
certIssuePermissions
:=
p_certIssuePermissions
}
// End of template m_certificate_subject_attributes
}
// End of module LibItsPki_Templates
ttcn/Pki/LibItsPki_TestSystem.ttcn
View file @
b74f5807
...
...
@@ -19,7 +19,9 @@ module LibItsPki_TestSystem {
import
from
IEEE1609dot2BaseTypes
language
"ASN.1:1997"
all
;
import
from
IEEE1609dot2
language
"ASN.1:1997"
all
;
import
from
EtsiTs102941BaseTypes
language
"ASN.1:1997"
all
;
import
from
EtsiTs102941TypesEnrolment
language
"ASN.1:1997"
all
;
import
from
EtsiTs102941TypesEnrolment
language
"ASN.1:1997"
all
;
import
from
EtsiTs102941TypesAuthorization
language
"ASN.1:1997"
all
;
import
from
EtsiTs102941TypesAuthorizationValidation
language
"ASN.1:1997"
all
;
import
from
EtsiTs102941MessagesItss
language
"ASN.1:1997"
all
;
import
from
EtsiTs103097Module
language
"ASN.1:1997"
all
;
...
...
@@ -62,7 +64,7 @@ module LibItsPki_TestSystem {
group
interfacePorts
{
type
port
PkiPort
message
{
inout
InnerEcRequest
,
InnerEcResponse
;
inout
InnerEcRequest
,
InnerEcResponse
,
AuthorizationValidationRequest
,
AuthorizationValidationResponse
;
}
// End of PkiPort
}
// End of group interfacePorts
...
...
@@ -89,6 +91,7 @@ module LibItsPki_TestSystem {
port
PkiPort
pkiPort
;
var
Certificate
vc_eaCertificate
;
/** Test Adapter EA certificate */
var
HashedId8
vc_eaHashedId8
;
/** Test Adapter EA HashedId8 for decryption of IUT's response */
}
// End of component ItsPki
type
component
ItsPkiHttp
extends
ItsSecurityBaseComponent
,
HttpComponent
{
...
...
ttcn/Security/LibItsSecurity_Templates.ttcn
View file @
b74f5807
...
...
@@ -629,10 +629,9 @@ module LibItsSecurity_Templates {
}
// End of template mw_signedDataPayload
template
(
value
)
SignedDataPayload
m_signedDataPayload_ext
(
in
template
(
value
)
Ieee1609Dot2Data
p_data
,
in
template
(
value
)
Oct32
p_extDataHash
)
:=
{
data
:=
p_data
,
data
:=
omit
,
extDataHash
:=
{
sha256HashedData
:=
p_extDataHash
}
}
// End of template m_signedDataPayload_ext
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment