The next step is to extract the public keys so they can be
installed with the client and server. Specifically, the client-side
software must have the public key of the server side, and vice
versa.
To get the public keys, we extract them from the
client.private and server.private files and
place them in temporary files. Then, we insert them into their own
keystores, called client.public and server.public, respectively.
The temporary key file, temp.key, is used to hold each of the public keys,
temporarily, while it is being copied from the private keystore to the
public keystore -- for example, from client.private to client.public.
After completing the export/import procedure, you'll want to remove the temp.key
from the current directory.