CreateSelfSignedCertificate() public static méthode

Creates a self signed certificate that can be used in SSL communications
public static CreateSelfSignedCertificate ( string subjectDirName, int signatureBits, int keyStrength ) : X509Certificate2
subjectDirName string A valid DirName formated string. Example: CN=ServerName
signatureBits int Bitstrength of signature algorithm. Supported Lengths are 160,256, and 384
keyStrength int RSA key strength. Typically a multiple of 1024.
Résultat System.Security.Cryptography.X509Certificates.X509Certificate2
Exemple #1
0
        static SecureStreamClientBase()
        {
#if !SQLCLR
            try
            {
                s_tempCert = GenerateCertificate.CreateSelfSignedCertificate("CN=Local", 256, 1024);
            }
            catch
            {
            }
#endif
        }
Exemple #2
0
        static SecureStreamServerCertificate()
        {
#if !SQLCLR
            TempCertificate = GenerateCertificate.CreateSelfSignedCertificate("CN=Local", 256, 1024);
#endif
        }