I need to be able to craft JSON Web Token signatures (which only accepts 'RSASSA-PKCS1-V1_5-SIGN with the SHA-256 hash function' signatures), but the obvious CPAN contender for this task (Crypt::RSA) will only generate signatures using MD2, MD5 or SHA1.
Is there another library somewhere that will do what I want? If necessary I should be able to do a bit of hacking to get there, but that wouldn't be too pretty.
Looks like you had to modify the 'Crypt::RSA::SS::PKCS1v15.pm' to add the SHA256 supporting. It is not so difficult, you can try this patched version:
I was able to find a module that did what I wanted: Crypt::OpenSSL::RSA
So much easier than extending Crypt::RSA, but it was oddly kind of difficult to find.