ECI security

You can perform security management on servers that support Password Expiry Management (PEM).

To use these features you first must have constructed a Connection object. The two methods available are verifyPassword which checks the user ID and password within the connection object with the Server Security System, and changePassword which allows you to change the password at the server. If successful the connection object password is updated accordingly.

If either call is successful, you are returned a pointer to an internal object which provides information about the security, a CclSecAttr object. This object provides access to information such as last verified Date and Time, Expiry Date and Time and Last access Date and Time. If you query for example last verified Date, you get back a pointer to an object which allows you to get the information in various formats. The following is a sample of code to show the use of these various objects:

// Connection object already created called conn  
CclSecAttr *pAttrblock;             // pointer to security attributes 
CclSecTime *pDTinfo;                // pointer to Date/Time information 
try {
     pAttrblock = conn->verifyPassword();
     pDTinfo = pAttrblock->lastVerifiedTime(); 
     cout << "last verified year  :" <<pDTinfo->year() << endl; 
     cout << "last verified month :" <<pDTinfo->month() << endl; 
     cout << "last verified day   :" <<pDTinfo->day() << endl; 
     cout << "last verified hours :" <<pDTinfo->hours() << endl; 
     cout << "last verified mins  :" <<pDTinfo->minutes() << endl; 
     cout << "last verified secs  :" <<pDTinfo->seconds() << endl; 
     cout << "last verified 100ths:" <<pDTinfo->hundredths() << endl;  
// Use a tm structure to produce a single line text of information 
     tm mytime; 
     mytime = pDTinfo->get_tm(); 
     cout << "full info:" << asctime(&mytime) << endl;
} 
catch (CclException &ex) 
{
 
// Could check for expired password error and handle if required  
  cout << "Exception occurred: " <<ex.diagnose()<< endl;
}

The security attributes and date/time memory are all handled by the connection object. If you destroy the connection object, you destroy the security information being held by that object.

For more information about supported servers and protocols, see Supported software .


Information Information

Feedback


Timestamp icon Last updated: Tuesday, 19 November 2013


https://ut-ilnx-r4.hursley.ibm.com/tg_latest/help/topic/com.ibm.cics.tg.doc//progde/cclaojc2.html