Message.GetCertificateFromMessage Method (CertificatePurposes)
Retrieves the X509-based certificate from a message.
Namespace: Microsoft.ConfigurationManagement.Messaging.Framework
Assembly: Microsoft.ConfigurationManagement.Messaging (in Microsoft.ConfigurationManagement.Messaging.dll)
Syntax
public MessageCertificateX509 GetCertificateFromMessage(
CertificatePurposes certificatePurpose
)
public:
virtual MessageCertificateX509^ GetCertificateFromMessage(
CertificatePurposes certificatePurpose
) sealed
Public Function GetCertificateFromMessage (
certificatePurpose As CertificatePurposes
) As MessageCertificateX509
Parameters
certificatePurpose
Type: Microsoft.ConfigurationManagement.Messaging.Framework.CertificatePurposesThe purpose of the certificate being retrieved from the message. None and All types are not supported and will cause an exception to be raised. Do not pass in this as a flag, only a single bit, or the behavior is undefined.
Return Value
Type: Microsoft.ConfigurationManagement.Messaging.Framework.MessageCertificateX509
Certificate object matching the request.
Implements
IMessage.GetCertificateFromMessage(CertificatePurposes)
Exceptions
Exception | Condition |
---|---|
ArgumentException | |
ArgumentOutOfRangeException | Raised if no match is found that meets the purpose. |
See Also
Message Class
Microsoft.ConfigurationManagement.Messaging.Framework Namespace
Return to top