+1 vote

It surely is a dumb question from a C++ user not so accustomed to .Net component logic. The function is void. How can I check wether the signature verified or not? The property IsSigned probably tells me there is a signature (or not) and not wether the signature checked OK or not.

by (250 points)

1 Answer

+1 vote

If the signature is valid, nothing happens. If there is a problem, an exception is thrown.

SignatureException - usually when the sender and signers don't match, or when the message is malformed.

CryptographicException - when there is a problem with the signature itself.

This may seem like an exception driven development, but we decided to stick to how internal .NET classes behave.

by (297k points)
...