I\'m trying to use WebCrypto to sign a token with RSA-PSS, but I keep getting the error:
DataError: Data provided to an operation does not meet requirements
The header -----BEGIN RSA PRIVATE KEY----- in the PEM file is reserved to PKCS#1 keys, but WebCryptoApi does not support pkcs1, so you need to convert the key from pkcs1 to pcks8 using a tool like openssl
-----BEGIN RSA PRIVATE KEY-----
# openssl pkcs8 -topk8 -inform PEM -outform PEM -nocrypt -in pkcs1.key -out pkcs8.key