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
56cc0df9
Commit
56cc0df9
authored
2 years ago
by
Klaus Fischer
Browse files
Options
Downloads
Patches
Plain Diff
Checking the certificate creation
parent
fb886082
No related branches found
No related tags found
1 merge request
!3
Feature/440 mvp net sdk part 1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
SenderTest/SenderEncryptionWithCertificateTest.cs
+6
-0
6 additions, 0 deletions
SenderTest/SenderEncryptionWithCertificateTest.cs
with
6 additions
and
0 deletions
SenderTest/SenderEncryptionWithCertificateTest.cs
+
6
−
0
View file @
56cc0df9
...
@@ -61,6 +61,12 @@ public class SenderEncryptionWithCertificateTest {
...
@@ -61,6 +61,12 @@ public class SenderEncryptionWithCertificateTest {
var
req
=
new
CertificateRequest
(
"cn=foobar"
,
ECDsa
.
Create
(),
HashAlgorithmName
.
SHA256
);
var
req
=
new
CertificateRequest
(
"cn=foobar"
,
ECDsa
.
Create
(),
HashAlgorithmName
.
SHA256
);
var
cert
=
req
.
CreateSelfSigned
(
DateTimeOffset
.
Now
,
DateTimeOffset
.
Now
.
AddYears
(
5
));
var
cert
=
req
.
CreateSelfSigned
(
DateTimeOffset
.
Now
,
DateTimeOffset
.
Now
.
AddYears
(
5
));
if
(
cert
.
GetRSAPublicKey
()
==
null
)
throw
new
Exception
(
"Certificate does not contain a public key"
);
if
(
cert
.
GetRSAPrivateKey
()
==
null
)
throw
new
Exception
(
"Certificate does not contain a private key"
);
// Export the certificate to a PEM file, just for
// Export the certificate to a PEM file, just for
// additional extern testing
// additional extern testing
if
(
exportPath
!=
null
)
{
if
(
exportPath
!=
null
)
{
...
...
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