I tried your setup and got the same error when I had the spaces.
Once I removed all of them it worked fine.
I think it is not related to the certificate itself.
Looking at the logs, it seems spring boot is not propagating your configurations to the embedded tomcat.