DSA-66: Fix broken JWT validation due to PEM bug and string encoding bug