3.4.5.2.8.3 IVdsServiceIscsi::SetInitiatorSharedSecret (Opnum 8)

The SetInitiatorSharedSecret method sets the initiator CHAP shared secret that is used for mutual CHAP authentication when the initiator authenticates the target. For more information on CHAP, see [MS-CHAP].<74>

 HRESULT SetInitiatorSharedSecret(
   [in, unique] VDS_ISCSI_SHARED_SECRET* pInitiatorSharedSecret,
   [in] VDS_OBJECT_ID targetId
 );

pInitiatorSharedSecret: A pointer to a VDS_ISCSI_SHARED_SECRET structure that contains the CHAP shared secret that is used for mutual CHAP authentication when the initiator authenticates the target.

targetId: This parameter is reserved and not used by the protocol. Callers MUST pass in GUID_NULL. Callers MUST pass in GUID_NULL.

Return Values: The method MUST return zero or a non-error HRESULT (as specified in [MS-ERREF]) to indicate success, or return an implementation-specific nonzero error code to indicate failure. For the HRESULT values predefined by the Virtual Disk Service Remote Protocol, see section 2.2.3.

When the server receives this message, it MUST validate the following parameters:

  • Verify that pInitiatorSharedSecret is not NULL.

  • Verify that targetId is GUID_NULL.

The server MUST set the CHAP shared secret that pInitiatorSharedSecret specifies in the iSCSI initiator, and return an HRESULT indicating failure or success.