Partager via


MessageCertificateX509.CreateSelfSignedCertificate Method (String, String, String[], DateTime, DateTime)

 

Creates a self-signed certificate.

Namespace:   Microsoft.ConfigurationManagement.Messaging.Framework
Assembly:  Microsoft.ConfigurationManagement.Messaging (in Microsoft.ConfigurationManagement.Messaging.dll)

Syntax

public static MessageCertificateX509 CreateSelfSignedCertificate(
    string subjectName,
    string friendlyName,
    string[] oidPurposes,
    DateTime issueByDate,
    DateTime expirationDate
)
public:
static MessageCertificateX509^ CreateSelfSignedCertificate(
    String^ subjectName,
    String^ friendlyName,
    array<String^>^ oidPurposes,
    DateTime issueByDate,
    DateTime expirationDate
)
Public Shared Function CreateSelfSignedCertificate (
    subjectName As String,
    friendlyName As String,
    oidPurposes As String(),
    issueByDate As Date,
    expirationDate As Date
) As MessageCertificateX509

Parameters

  • friendlyName
    Type: System.String

    A friendly name for the certificate.

  • oidPurposes
    Type: System.String[]

    Array of purposes for the object identifier (OID).

  • issueByDate
    Type: System.DateTime

    The date by which the certificate will be issued.

  • expirationDate
    Type: System.DateTime

    The expiration date of the certificate.

Return Value

Type: Microsoft.ConfigurationManagement.Messaging.Framework.MessageCertificateX509

Self-signed certificate to use for crypto operations.

See Also

MessageCertificateX509 Class
Microsoft.ConfigurationManagement.Messaging.Framework Namespace

Return to top