The last section of this chapter is dedicated to encrypting the HTTP communication in Quarkus. In order to do that, you need to provide a valid (either self-signed or signed by a CA) Keystore or PEM certificate in your configuration.
First, let's learn how to generate a self-signed PEM key and certificate pair. The simplest way to do this is by using the OpenSSL tool, as follows:
$ openssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -keyout key.pem -out cert.pem
The preceding command will generate a certificate named cert.pem and a related key file named key.pem in the current directory. Next, configure the filesystem path to your certificate and the key file in your application.properties:
quarkus.http.ssl.certificate.file=/path/cert.pem
quarkus.http.ssl.certificate.key-file=/path/key.pem
On the other hand, you can also generate and use a Keystore...