GenerateCertificateCreateSelfSignedCertificate(String, Int32, Int32) Method

Creates a self signed certificate that can be used in SSL communications.

Definition

Namespace: SnapDB.Security
Assembly: SnapDB (in SnapDB.dll) Version: 1.0.102.0 -- Release Build+29075351d0e5aa4dea46a5c520805222f672dc2e
public static X509Certificate2 CreateSelfSignedCertificate(
	string subjectDirName,
	int signatureBits,
	int keyStrength
)

Parameters

subjectDirName  String
A valid DirName formatted string. Example: CN=ServerName
signatureBits  Int32
Bit strength of signature algorithm. Supported Lengths are 160,256, and 384
keyStrength  Int32
RSA key strength. Typically a multiple of 1024.

Return Value

X509Certificate2
An X509Certificate2 object representing the self-signed certificate.

See Also