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
subjectName
Type: System.StringThe certificate subject.
friendlyName
Type: System.StringA friendly name for the certificate.
storeName
Type: System.StringThe name of the certificate store.
storeLocation
Type: System.Security.Cryptography.X509Certificates.StoreLocationThe location of the certificate store.
oidPurposes
Type: System.String[]Array of purposes for the object identifier (OID).
issueByDate
Type: System.DateTimeThe date by which the certificate will be issued.
expirationDate
Type: System.DateTimeThe 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