[Error] "Missing....Delimiter" while trying to set Certificates

Hey,

i’m trying to set up a Keycloak Server in Development Mode. Everything worked fine following the Documentation → OpenJDK - Keycloak

Now i would like to configure TLS / HTTPS and test the import of my Certificates, as changing the HTTPS Ports.
If i follow the Guide to it Configuring TLS - Keycloak i assume that the command “kc.sh start-dev --https-certificate-file=/path/to/certfile.pem --https-certificate-key-file=/path/to/keyfile.pem” should work.

But i get an Error that says:
ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: Failed to start server in (development) mode
2022-11-11 11:43:34,421 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: Unable to start HTTP server
2022-11-11 11:43:34,421 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: java.lang.RuntimeException: Missing -----BEGIN PRIVATE KEY----- or -----BEGIN RSA PRIVATE KEY----- or -----BEGIN EC PRIVATE KEY----- delimiter
2022-11-11 11:43:34,421 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: Missing -----BEGIN PRIVATE KEY----- or -----BEGIN RSA PRIVATE KEY----- or -----BEGIN EC PRIVATE KEY----- delimiter

I tested it with a Self-Signed aswell as with a Enterprise Certificate. Both the same Result.
Do you have an Idea what the Problem cloud be?..Probably something small and stupid :smiley:

The Files are all readable with cat and it seems the Cert is 100% ok.

Thanks and Greetings
KCnewb

I resolved this issue by creating new Certificates with openSSL.
I directly created some SelfSigned Certificates as .PEM