Certificate.Create Certificate.Create Certificate.Create Method

Definition

Creates a certificate based on a certificate encryption algorithm or based on a certificate source type.

Overloads

Create(String, CertificateSourceType, String, String) Create(String, CertificateSourceType, String, String) Create(String, CertificateSourceType, String, String)

Creates a certificate on the database that has the specified certificate source type.

Create(String, CertificateSourceType) Create(String, CertificateSourceType) Create(String, CertificateSourceType)

Creates a certificate on the database that has the specified certificate source type.

Create(String, CertificateSourceType, String, String, String) Create(String, CertificateSourceType, String, String, String) Create(String, CertificateSourceType, String, String, String)

Creates a certificate on the database that has the specified certificate source type.

Create() Create() Create()

Creates a certificate on the database.

Create(String) Create(String) Create(String)

Creates a certificate based on a certificate encryption algorithm or based on a certificate source type.

Create(String, CertificateSourceType, String, String) Create(String, CertificateSourceType, String, String) Create(String, CertificateSourceType, String, String)

Creates a certificate on the database that has the specified certificate source type.

public:
 void Create(System::String ^ certificateSource, Microsoft::SqlServer::Management::Smo::CertificateSourceType sourceType, System::String ^ privateKeyPath, System::String ^ privateKeyDecryptionPassword);
public void Create (string certificateSource, Microsoft.SqlServer.Management.Smo.CertificateSourceType sourceType, string privateKeyPath, string privateKeyDecryptionPassword);
Public Sub Create (certificateSource As String, sourceType As CertificateSourceType, privateKeyPath As String, privateKeyDecryptionPassword As String)
Parameters
certificateSource
String String String

A String value that specifies the source of the certificate.

sourceType
CertificateSourceType CertificateSourceType CertificateSourceType

A CertificateSourceType object value that specifies the certificate source type.

privateKeyPath
String String String

A String value that specifies the system path for the private key.

privateKeyDecryptionPassword
String String String

A String value that specifies the password used for decryption of the private key.

Examples

Using Encryption

Create(String, CertificateSourceType) Create(String, CertificateSourceType) Create(String, CertificateSourceType)

Creates a certificate on the database that has the specified certificate source type.

public:
 void Create(System::String ^ certificateSource, Microsoft::SqlServer::Management::Smo::CertificateSourceType sourceType);
public void Create (string certificateSource, Microsoft.SqlServer.Management.Smo.CertificateSourceType sourceType);
Public Sub Create (certificateSource As String, sourceType As CertificateSourceType)
Parameters
certificateSource
String String String

A String value that specifies the source of the certificate.

sourceType
CertificateSourceType CertificateSourceType CertificateSourceType

An CertificateSourceType object value that specifies the certificate source type.

Examples

Using Encryption

Create(String, CertificateSourceType, String, String, String) Create(String, CertificateSourceType, String, String, String) Create(String, CertificateSourceType, String, String, String)

Creates a certificate on the database that has the specified certificate source type.

public:
 void Create(System::String ^ certificateSource, Microsoft::SqlServer::Management::Smo::CertificateSourceType sourceType, System::String ^ privateKeyPath, System::String ^ privateKeyDecryptionPassword, System::String ^ privateKeyEncryptionPassword);
public void Create (string certificateSource, Microsoft.SqlServer.Management.Smo.CertificateSourceType sourceType, string privateKeyPath, string privateKeyDecryptionPassword, string privateKeyEncryptionPassword);
Public Sub Create (certificateSource As String, sourceType As CertificateSourceType, privateKeyPath As String, privateKeyDecryptionPassword As String, privateKeyEncryptionPassword As String)
Parameters
certificateSource
String String String

A String value that specifies the source of the certificate.

sourceType
CertificateSourceType CertificateSourceType CertificateSourceType

A CertificateSourceType object value that specifies the certificate source type.

privateKeyPath
String String String

A String value that specifies the system path for the private key.

privateKeyDecryptionPassword
String String String

A String value that specifies the password used for decryption of the private key.

privateKeyEncryptionPassword
String String String

A String value that specifies the password used for encryption of the private key.

Examples

Using Encryption

Create() Create() Create()

Creates a certificate on the database.

public:
 virtual void Create();
public void Create ();
Public Sub Create ()

Examples

Using Encryption

Create(String) Create(String) Create(String)

Creates a certificate based on a certificate encryption algorithm or based on a certificate source type.

public:
 void Create(System::String ^ encryptionPassword);
public void Create (string encryptionPassword);
Public Sub Create (encryptionPassword As String)
Parameters
encryptionPassword
String String String

A String value that specifies the encryption password.

Examples

Using Encryption

Applies to