QsyVerifyValidationLstEntry()--Verify Validation List Entry API


  Syntax
 #include <qsyvldl.h>

 int QsyVerifyValidationLstEntry
        (Qsy_Qual_Name_T             *Validation_Lst,
         Qsy_Entry_ID_Info_T         *Entry_ID,
         Qsy_Entry_Encr_Data_Info_T  *Encrypt_Data);

  Service Program Name: Name QSYVLDL

  Default Public Authority: *USE

  Threadsafe: Yes

The QsyVerifyValidationLstEntry() function verifies an entry in a validation list object. It verifies the entry by finding the validation list object, then finding the entry that is specified in the Entry_ID parameter. To find an entry, there must be an exact match in the entry for the value that is specified in the Entry_ID parameter and the length of the entry ID. For example, an entry ID value of "SMITH" with a length of 5 would not find an entry where the entry ID is "SMITH " and the length is 7.

If the entry is found, the data specified in the Encrypt_Data parameter is encrypted by the system and compared to the encrypted data that is stored for the entry. If the encrypted data fields do not match, then -2 is returned by the function.

The verification of an entry should be done within the same process as the work that is being done on behalf of this entry ID so that there is accountability for the actions that are taken. Also, an entry ID should be verified just before the work is done on behalf of that entry ID, instead of verifying a set of entry IDs and then doing work on behalf of the different entry IDs.

Authorities

Validation List Object
*USE
Validation List Object Library
*EXECUTE

Parameters

Validation_Lst
(Input) A pointer to the qualified object name of the validation list that contains the entry to verify. The first 10 characters specify the validation list name, and the second 10 characters specify the library. You can use these special values for the library name:

Entry_ID
(Input)

A pointer to the entry ID information. The format of the Qsy_Entry_ID_Info_T structure is as follows:



Encrypt_Data
(Input)

A pointer to the encrypted data information that is associated with the entry ID. The format of the Qsy_Entry_Encr_Data_Info_T structure is as follows:



Return Value


Error Conditions

If QsyVerifyValidationLstEntry() is not successful, errno indicates one of the following errors:



Example

The following example validates the entry for a user named FRED in the validation list object WEBUSRS.

Note: By using the code examples, you agree to the terms of the Code license and disclaimer information.

#include <qsyvldl.h>

main()
{
  #define VLD_LST  "WEBUSRS   WEBLIB    "
  Qsy_Entry_ID_Info_T    entry_info;
  Qsy_Entry_Encr_Data_Info_T  encrypt_data;

  entry_info.Entry_ID_Len = 4;
  strncpy(entry_info.Entry_ID,"FRED",entry_info.Entry_ID_Len);
  encrypt_data.Encr_Data_Len = 7;
  strncpy(encrypt_data.Encr_Data,"MSN1TJG",
            encrypt_data.Encr_Data_Len);

  if (0 != QsyVerifyValidationLstEntry((Qsy_Qual_Name_T *)&VLD_LST,
                                       &entry_info,
                                       &encrypt_data))
     perror("QsyVerifyValidationLstEntry()");

}


API introduced: V4R1

[ Back to top | Security APIs | APIs by category ]