December 2002
Intermediate to advanced
1050 pages
24h 49m
English
The SSLServer class constructor does the work necessary to create the SSL connection. Within this constructor, the KeyManagerFactory must be created to provide the keys necessary to allow encryption and to provide clients to the server some assurance that we are who we say we are.
In this example, the keys are stored in a keystore in the form of X.509 certificates. We therefore require a password to our keystore, which we've chosen to embed in our code in plain text. (More sophisticated and secure implementations would store this password in encrypted form in a hidden file or database.)
An SSLContext is used to obtain our SSLServerSocketFactory instance, so the static getInstance method is called to obtain a new ...
Read now
Unlock full access