Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FIT-Connect-SDK - .NET
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
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FIT-Connect
FIT-Connect-SDK - .NET
Commits
931f9ef3
Commit
931f9ef3
authored
2 years ago
by
Klaus Fischer
Browse files
Options
Downloads
Patches
Plain Diff
Added test for SET creation with wrong key type
parent
18f2d0a2
No related branches found
No related tags found
1 merge request
!9
.NET-SDK: SET-Empfang inkl. Signaturprüfung - Ticket 562
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
BasicUnitTest/SecurityEventTokenTests.cs
+5
-1
5 additions, 1 deletion
BasicUnitTest/SecurityEventTokenTests.cs
with
5 additions
and
1 deletion
BasicUnitTest/SecurityEventTokenTests.cs
+
5
−
1
View file @
931f9ef3
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.IO
;
using
Autofac
;
using
Autofac
;
using
FitConnect
;
using
FitConnect.Encryption
;
using
FitConnect.Encryption
;
using
FitConnect.Models
;
using
FitConnect.Models
;
using
FitConnect.Models.v1.Api
;
using
FitConnect.Models.v1.Api
;
...
@@ -137,7 +140,8 @@ public class SecurityEventTokenTests {
...
@@ -137,7 +140,8 @@ public class SecurityEventTokenTests {
[
Test
]
[
Test
]
public
void
CreateJwt_WithEncryptionKey_ShouldThrowAnException
()
{
public
void
CreateJwt_WithEncryptionKey_ShouldThrowAnException
()
{
Assert
.
Throws
<
InvalidOperationException
>(()
=>
Assert
.
Throws
<
InvalidOperationException
>(()
=>
new
FitEncryption
(
_encryption
.
PrivateKeyDecryption
,
_encryption
.
PublicKeyEncryption
,
new
FitEncryption
(
_encryption
.
PrivateKeyDecryption
,
_encryption
.
PublicKeyEncryption
,
// using wrong key
_encryption
.
PublicKeyEncryption
,
_encryption
.
PublicKeyEncryption
,
_encryption
.
PublicKeySignatureVerification
,
null
)
_encryption
.
PublicKeySignatureVerification
,
null
)
.
CreateSecurityEventToken
(
Guid
.
NewGuid
().
ToString
(),
Guid
.
NewGuid
().
ToString
(),
.
CreateSecurityEventToken
(
Guid
.
NewGuid
().
ToString
(),
Guid
.
NewGuid
().
ToString
(),
...
...
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