CertUtils.CreateSelfSignedCertificate Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Method to generate a self signed certificate
public static System.Security.Cryptography.X509Certificates.X509Certificate2 CreateSelfSignedCertificate (int validForHours, string subscriptionId, string certificateNamePrefix, string issuer = "CN=Windows Azure Tools", string password = "");
static member CreateSelfSignedCertificate : int * string * string * string * string -> System.Security.Cryptography.X509Certificates.X509Certificate2
Public Shared Function CreateSelfSignedCertificate (validForHours As Integer, subscriptionId As String, certificateNamePrefix As String, Optional issuer As String = "CN=Windows Azure Tools", Optional password As String = "") As X509Certificate2
Parameters
- validForHours
- Int32
number of hours for which the certificate is valid.
- subscriptionId
- String
subscriptionId in question
- certificateNamePrefix
- String
prefix for the certificate name
- issuer
- String
issuer for the certificate
- password
- String
certificate password
Returns
certificate as an object