Class PermitSignatureVerifier
- Namespace
- EncDotNet.S100.ExchangeSets.Protection
- Assembly
- EncDotNet.S100.ExchangeSets.dll
Authenticates PERMIT.XML content with its Part 15
PERMIT.SIGN file.
public static class PermitSignatureVerifier
- Inheritance
-
PermitSignatureVerifier
- Inherited Members
Remarks
S-100 Edition 5.2.1 Part 15 §15-7.4.5 and §15-8.11.2. The signature is ECDSA P-384 over SHA-384 as required by §15-8.7.
Methods
AuthenticateAsync(Stream, Stream?, string, TrustAnchorOptions, CancellationToken)
Verifies and parses a permit without exposing it when authentication fails.
public static Task<PermitAuthenticationResult> AuthenticateAsync(Stream permitContent, Stream? signatureContent, string permitFileName, TrustAnchorOptions trustAnchors, CancellationToken cancellationToken = default)
Parameters
permitContentStreamThe exact bytes of the
PERMIT.XMLfile.signatureContentStreamThe
PERMIT.SIGNXML stream, or null when absent.permitFileNamestringThe actual permit file name.
trustAnchorsTrustAnchorOptionsThe Scheme Administrator trust configuration.
cancellationTokenCancellationTokenA cancellation token.
Returns
- Task<PermitAuthenticationResult>
An authentication result containing a permit only on success.