Getting ready

We will start by going back to using Tomcat; so for this recipe, we will undo the changes that we implemented in the previous example.

In order to create an HTTPS connector, we will need a few things; but most importantly, we will need to generate the certificate keystore that is used to encrypt and decrypt the SSL communication with the browser.

If you are using Unix or macOS, you can do it by running the following command:

    $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA

On Windows, this can be achieved via the following command:

    "%JAVA_HOME%binkeytool" -genkey -alias tomcat -keyalg RSA  

During the creation of the keystore, you should enter the information that is appropriate to you, including passwords, name, and so on. For the purpose of this book, we will use the default password: changeit. Once the execution is complete, a newly generated keystore file will appear in your home directory under the name: keystore.

You can find more information about preparing the certificate keystore at https://tomcat.apache.org/tomcat-8.0-doc/ssl-howto.html#Prepare_the_Certificate_Keystore.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.184.117