3.2.4.1 S_DSQMSetMachinePropertiesSignProc (Opnum 0)

This method is a callback method called by the server during a client call to S_DSQMSetMachineProperties. Through this method, the server provides a challenge that the client must sign to authenticate itself.

 [callback] HRESULT S_DSQMSetMachinePropertiesSignProc(
   [in, size_is(dwCallengeSize)] byte* abChallenge,
   [in, range(0,32)] unsigned long dwCallengeSize,
   [in] unsigned long dwContext,
   [in, out, size_is(dwSignatureMaxSize), length_is(*pdwSignatureSize)] 
     byte* abSignature,
   [in, out] unsigned long* pdwSignatureSize,
   [in, range(0,128)] unsigned long dwSignatureMaxSize
 );

abChallenge:  MUST be set by the caller to a pointer to a buffer that contains the challenge to be signed. The challenge SHOULD be cryptographically random.

dwCallengeSize:  MUST be set by the caller to the size in bytes of the challenge in the abChallenge parameter.

dwContext:  MUST be set by the caller to the value supplied by the client in the dwContext parameter of the corresponding call to the S_DSQMSetMachineProperties method. This parameter provides a way for the receiver to correlate the callback with the receiver's in-progress call to S_DSQMSetMachineProperties.

abSignature: MUST be set by the caller to a pointer to a buffer to contain the returned signature. MUST be set by the receiver to a signature over the challenge in abChallenge. The algorithm for creating this signature is specified by the following pseudocode.

 Initialize an MD5 hash context
  
 Add to the hash context the byte array abChallenge. The data length
        is defined by dwCallengeSize.
  
 Add to the hash context a DWORD data value equal to the number of 
        properties being set in the corresponding call to 
        S_DSQMSetMachineProperties.
  
 FOR each property in the corresponding call to 
     S_DSQMSetMachineProperties
  
     Add to the hash context the DWORD value of the property
            identifier (from aProp[])
  
     Add to the hash context the type-specific data value of the
            property (from apVar[]). The data value and length are
            defined by the variant type of the property
            (apVar[].vt)
 END FOR
  
  
 Sign the MD5 hash using the private key corresponding to the public key
 stored in the certificate in the property PROPID_QM_SIGN_PK associated
 with the machine object in the directory service.
 The machine object is the object specified by the pwcsPathName parameter
 in the corresponding call to S_DSQMSetMachineProperties.
 Set abSignature to the signed MD5 hash
  
 Set *pdwSignatureSize to the size in bytes of the signed MD5 hash.

pdwSignatureSize:  Size in bytes of the signature in the abSignature parameter. MUST be set by the receiver to the actual length in bytes of the signature returned in abSignature on output.

dwSignatureMaxSize:  MUST be set by the caller to the maximum length in bytes of the server signature to be returned in abSignature. If the signature is larger than the supplied buffer, the server MUST return MQ_ERROR_USER_BUFFER_TOO_SMALL (0xC00E0028).

Return Values:  This method is obsolete. The server SHOULD NOT call this method, and the client SHOULD return MQ_ERROR_NOT_SUPPORTED (0xC00E03EB).<146> If the method succeeds, the return value is 0. If the method fails, the return value is an implementation-specific error code.

ERROR_SUCCESS (0x00000000)

MQ_ERROR_NOT_SUPPORTED (0xC00E03EB)

Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC extension protocol, as specified in [MS-RPCE].