The SenderCertificate property provides an array of bytes that represents the security certificate. The security certificate is used to authenticate messages.
Type: | Variant |
Run time: | read/write |
object.SenderCertificate
Syntax Element | Description |
---|---|
object | Message (MSMQMessage) object that defines the message. |
Security certificate (internal or external).
The sending application can specify an external certificate obtained from a certification authority or use the internal certificate provided by MSMQ.
When using external certificates, the receiving application can use all the information in the certificate to verify who sent the message. When using an internal certificate, this property is not useful to the receiving application.
There are two ways to specify the security information provided by a certificate. If the sending application is only going to use a certificate once, it should provide the complete certificate using SenderCertificate. If the sending application is going to use the same certificate over and over, it should call AttachCurrentSecurityContext. AttachCurrentSecurityContext retrieves and caches the needed information using a single call and then automatically passes the information along with the message when it is sent.
For information on using an external certificate, see Authenticating Messages Using an External Certificate.
For information on using an internal certificate, see Authenticating Messages Using an Internal Certificate.
Windows NT: Requires version 4.0 SP3 or later.
Windows: Requires Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in mqoai.h.
Import Library: Use mqoa.lib.
Unicode: Defined only as Unicode.