LocalFileCertificateFactory Hides CryptographicException
Closed this issue · 1 comments
Hiya,
We've spent a bit of time trying to figure out the exception 'The certificate could not be loaded from disk'.
The only way we eventually figured out what was causing it was by dragging down the source code. In the CreateCertificate method in DevDefined.OAuth.Consumer.LocalFileCertificateFactory it catches a CryptographicException then later throws an ApplicationException instead with the message above.
Can the CryptographicException just be allowed to be thrown? It seems that it would have been easier to identify the problem if it had rather than just getting the general exception. Or is there some other reasoning behind this?
Regards,
Tarah
Right now, I can't think of a good reason to obfuscate the CryptographicException. If you can think of a better way to handle these exceptions, I'm open to pull requests.
Dan..