NSSSReadSharedSecret

Reads data from an existing Shared Secret to retrieve secret data from a user's SecretStore located on eDirectory.

Syntax

    #include <nssscl.h> 
     
    SS_EXTERN_LIBCALL(int) NSSSReadSharedSecret 
    (
     void                *handle, 
     SS_SH_SECRET_ID_T   *pSharedSecret, 
     SSS_CONTEXT_T       *context, 
     SS_OBJECT_DN_T      *targetObjDN, 
     unsigned long        ssFlags, 
     SS_PWORD_T          *epPassword, 
     SSS_READEXT_T       *readData, 
     SS_EXT_T            *ext
    );
    

Parameters

handle
(IN) Specifies the handle created by NSSSCreateSHSHandle.
pSharedSecret
(IN) Points to the user-populated SS_SH_SECRET_ID_T struct containing the shared secret type, name, and length.
context
(IN) Points to an optional structure that can be initialized by making a prior call to NSSSGetServiceInformation. The flags field of the structure can take on the following values to indicate the type of context used.NSSS_NCP_CTX_F—Directory Service API context indicator flagNSSS_LDAP_CTX_F—LDAP context indicator flag <reserved>
targetObjDN
(IN) Points to the optional RDN (relative distinguished name or "short name") of the target object that contains the user's secrets. The caller should have at least READ/WRITE privileges over the target object.

NOTE:For binding to server over LDAP/SSL this parameter is mandatory and it should be in fully qualified LDAP form ("cn=user, ou=users, o=novell").

ssFlags
(IN) Specifies the flags used when making the call to NSSSReadSecret.
epPassword
(IN) Points to an optional field to pass in the Master Password or the Enhanced Protection Password for reading a secret. When neither one of the passwords are present, you can pass in a NULL.
readData
(IN) Points to the extension to be set to read data stored in a user's secrets.
ext
(IN) Points to the extensions used for the secrets.

Return Values

Value

Description

NSSS_SUCCESS

The operation succeeded.

NSSS_E_SYSTEM_FAILURE

Some internal operation failed due to a failure such as improper memory allocation.

NSSS_E_UTF8_OP_FAILURE

The UTF8 string operations failed.

NSSS_E_INVALID_PARAM

The API parameter is not initialized.

NSSS_E_SECRET_ID_TOO_SHORT

The length of the Secret ID should be greater than zero.

Remarks

This function passes the handle, as well as a user-populated SS_SH_SECRET_ID_T structure, containing the shared secret type, name, and length. It also points to internally allocated key and value buffers

See Also