Generating a Self-Signed SSL Certificate (Keystore)

HTTPS requires use of an SSL certificate. It creates a keystore file and password for the specified type of SSL certificate (keystore).

Note: Avoid using self-signed certificates for production.

If you use trusted certificates, see Loading Trusted Certificates.

Signature

Object createKeystore(String ksFilePath, String ksType, String ksPassword)

Description

Creates and returns a keystore object, using the given parameters.

Parameters

Name Type Description
ksFilePath
String
The absolute path of the keystore file.
ksType
String
The type of keystore.

JKS and PKCS12 are supported.

ksPassword
String
Obfuscated password for the keystore.

Returns

Type Description
Object
The keystore object