#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
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.
*CURLIB | The current library is used to locate the validation list. If there is no current library, QGPL (general purpose library) is used. |
*LIBL | The library list is used to locate the validation list. |
A pointer to the entry ID information. The format of the Qsy_Entry_ID_Info_T structure is as follows:
int | Entry_ID_Len | The number of bytes of data that is provided as the entry ID. Possible values are from 1 through 100. |
unsigned int | Entry_ID_CCSID | An integer that represents the CCSID for the entry ID. Valid CCSID values are in the range 1 through 65535. This field is not used to verify the entry. |
unsigned char | Entry_ID[100] | The data that is used to identify this entry in the validation list. |
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:
int | Encr_Data_Len | The number of bytes of data to be encrypted and compared to the encrypted data in the validation list entry. Possible values are 1 through 600. |
unsigned int | Encr_Data_CCSID | An integer that represents the CCSID for the data to encrypt. Valid CCSID values are in the range 0 through 65535. This value is not used to verify the entry. |
unsigned char | Encr_Data[600] | The data to be encrypted and compared to the encrypted data that is found for the specified entry ID in the validation list. |
0 | QsyVerifyValidationLstEntry() was successful. |
-1 | QsyVerifyValidationLstEntry() was not successful.
The errno global variable is set to indicate the error. |
-2 | QsyVerifyValidationLstEntry() was not successful because the encrypted data was incorrect. |
If QsyVerifyValidationLstEntry() is not successful, errno indicates one of the following errors:
3401 | [EACCES]
The current user does not have *USE authority to the validation list object, or does not have *EXECUTE authority to the validation list object library. |
3406 | [EAGAIN]
The validation list object is currently locked by another process. |
3484 | [EDAMAGE]
The validation list object is damaged. |
3021 | [EINVAL]
Parameter value is not valid. |
3025 | [ENOENT]
The validation list object was not found. |
3026 | [ENOREC]
Specified entry does not exist. |
3474 | [EUNKNOWN]
Unknown system state. Check the job log for a CPF9872 message. |
See Code disclaimer information for information pertaining to code examples.
The following example validates the entry for a user named FRED in the validation list object WEBUSRS.
#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()"); }
Top | Security APIs | APIs by category |