Introduced by #5, the way the signing certificate is read from the database and inserted into the metadata breaks the IdP's ability to verify the signature of the AuthnRequest. It looks like the certificate and key are being stored/output including the header and footer that PEM files use, whereas IdPs (at least simplesamlphp's IdP) expect to receive only the certificate data.
Here's the bad way the key appears in the metadata, notice the trimmed -----BEGINCERTIFICATE-----:
Introduced by #5, the way the signing certificate is read from the database and inserted into the metadata breaks the IdP's ability to verify the signature of the AuthnRequest. It looks like the certificate and key are being stored/output including the header and footer that PEM files use, whereas IdPs (at least simplesamlphp's IdP) expect to receive only the certificate data.
Here's the bad way the key appears in the metadata, notice the trimmed
-----BEGINCERTIFICATE-----
: