MessageCertificateX509.CreateAndStoreSelfSignedCertificate Method (String, String, String, StoreLocation, String[], DateTime, DateTime)

 

Creates a self-signed certificate and stores it in the certificate store.

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

Syntax

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

Parameters

  • friendlyName
    Type: System.String

    A friendly name for the certificate.

  • storeName
    Type: System.String

    The name of the certificate store.

  • 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