Certificate-based authentication

This section describes the information you need to establish a security context with certificate-based authentication.

To establish a security context using certificate-based authentication, you need the following information:

locale
The locale that is to be used for returning message data to the application.
configuration file URL
The URL to the configuration file created by the Java™ SvrSslCfg class. The URL must use the file:/// format.
Note: Do not use the svrsslcfg command-line interface to create a configuration file that is to be used by a Java application.

To create the security context, create a PDContext object as shown in Figure 1.

Figure 1. Creating a security context using certificate-based authentication
// Create locale for US English

Locale myLocale = new Locale("ENGLISH", "US");

/*
Create a security context using our locale. Need to supply a user ID with 
administrative privileges in Verify Identity Access (like sec_master) along with
its password and a URL of the form file:/// to the configuration file created 
by the SvrSslCfg class.
*/

PDContext myContext = new PDContext(myLocale,
configFileURL);

The contents of the configuration file created by the Java SvrSslCfg class is not externalized and is subject to change without notice. Users must not use the information in the configuration file directly.