Поделиться через


PROPID_M_AUTHENTICATED_EX

 

Applies To: Windows 10, Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server Technical Preview, Windows Vista

(Read-only, introduced in MSMQ 2.0.) The PROPID_M_AUTHENTICATED_EX property indicates whether the message was authenticated at the request of the sending application and indicates what type of digital signature was used.

Property ID

PROPID_M_AUTHENTICATED_EX

Type Indicator

VT_UI1

MQPROPVARIANT Field

bVal

Property Value

This property can be set by Message Queuing to one of the following:

MQMSG_AUTHENTICATION_NOT_REQUESTED

The sending application did not request authentication. The destination queue manager did not attempt to authenticate the message when it accepted the message.

MQMSG_AUTHENTICATION_REQUESTED

Obsolete. This value is superseded by MQMSG_AUTHENTICATED_SIG10.

MQMSG_AUTHENTICATION_REQUESTED_EX

Obsolete. This value is superseded by MQMSG_AUTHENTICATED_SIG20. The sending application requested authentication with an MSMQ 2.0 signature.

MQMSG_AUTHENTICATED_SIG10

Introduced in MSMQ 3.0. Authentication was requested and the message was signed with an MSMQ 1.0 signature.

MQMSG_AUTHENTICATED_SIG20

Introduced in MSMQ 3.0. Authentication was requested and the message was signed with an MSMQ 2.0 signature.

MQMSG_AUTHENTICATED_SIG30

Introduced in MSMQ 3.0. Authentication was requested and the message was signed with an MSMQ 3.0 multiple-destination digital signature.

MQMSG_AUTHENTICATED_SIGXML

Introduced in MSMQ 3.0. Authentication was requested and the message was signed with an XML digital signature.

Remarks

This message property is used by the receiving application only when trying to determine if authentication was requested and what type of digital signature was used. Because messages that fail authentication are not placed in the destination queue, if authentication was requested and the message is in the queue, the message was authenticated. For information on the process that Message Queuing uses to authenticate messages, see How Message Queuing Authenticates Messages.

Note

It is not possible to look at the properties of a message and determine if a message failed authentication. Messages that fail authentication are discarded and are not delivered to the destination queue.

If the receiving application needs to check only whether authentication was requested, the application does not care what type of digital signature was used to sign the message, it should use PROPID_M_AUTHENTICATED. However, you cannot specify both message properties when calling MQReceiveMessage or MQReceiveMessageByLookupId.

Message Queuing can use several different types of digital signatures to authenticate messages. For information on these signatures and how the sending application specifies which signature to use, see Digital Signatures. The signature type can also be specified by registry entries. For information on specifying the type of digital signature using registry entries, see Digital Signature Registry Entries.

To see if authentication was requested, specify PROPID_M_AUTHENTICATED_EX in the MQMSGPROPS structure. Then call MQReceiveMessage or MQReceiveMessageByLookupId and examine the returned value. When retrieving this property, the type indicator can be set to VT_UI1 or VT_NULL. If you set the type indicator to VT_NULL, Message Queuing automatically changes the type indicator to VT_UI1 during the function call.

Equivalent COM Property

With COM components, the equivalent property is MSMQMessage.ReceivedAuthenticationLevel.

Example Code

The following code fragment shows how PROPID_M_AUTHENTICATED_EX is specified in arrays that can be used to initialize an MQMSGPROPS structure.

aMsgPropId[i] = PROPID_M_AUTHENTICATED_EX;  // Property ID  
aMsgPropVar[i].vt = VT_NULL;                // Type indicator  
i++;  

The following example is included in Using Message Queuing.

For an example of See
Ascertaining whether a message was authenticated and the type of digital signature used C/C++ Code Example: Validating Authentication

See Also

Message Properties
MQMSGPROPS
MQReceiveMessage
MQReceiveMessageByLookupId
PROPID_M_AUTHENTICATED
MSMQMessage.ReceivedAuthenticationLevel