Method ReadPublicKey
- Namespace
- MailFathom.Common.ClientAssertions
- Assembly
- MailFathom.Common.dll
ReadPublicKey(ReadOnlySpan<char>, out ClientAssertionKeyFault)
Reads the public half a deployment registers for one client.
public static AsymmetricAlgorithm? ReadPublicKey(ReadOnlySpan<char> material, out ClientAssertionKeyFault fault)
Parameters
materialReadOnlySpan<char>The provisioned PEM.
faultClientAssertionKeyFaultWhy the material is unusable, when it is.
Returns
- AsymmetricAlgorithm
The key, which the caller owns and disposes, or null when the material carries none.
Remarks
Only a PUBLIC KEY block is accepted, which is the subject public key info openssl pkey -pubout writes and the one form that states the key's algorithm rather than requiring the reader to already know it.