Ensure IdP certificate is formatted properly

When loading the provider certificate from the environment, or integrating via `omniauth-saml`, we would often encouter a series of _nested asn1 error_ messages due to the malformed certificate failing to be read by `OpenSSL`.

Inspiration for this patch comes from toyokazu/rack-saml@b7646ad

Thanks to @dannyb for the assistance!
fr the test helper purposes, I think there is only 1 invalid certificate needed. This kind of methods belong to their test context (with a better explanation of why they are invalid certificate if possible :) )