"Error: Could not parse certificate: java.io.IOExceptionL Illegal header: -----BEGIN CERTIFICATE-----"
Seems you have a space char just before -----BEGIN CERTIFICATE-----. Open the certificate with nano and verify this is not the case.
Seems you have a space char just before -----BEGIN CERTIFICATE-----. Open the certificate with nano and verify this is not the case.