Back to product page

Generate method


Generates new self-signed certificate.

Type

None

Syntax

  • Basic
object.Generate
The Generate(object) syntax has these parts:
objectAn expression evaluating to an object of type Certificate.

Remarks

Sometimes when you need to test something you're working on, you need *some* certificate that can be used with your program. You can do so with Generate method. It will create new selfsigned certificate (and hold it in memory until saved) that is self-signed. Such certificates are probably not valid anywhere else except on your computer - because other computer cannot verify certificate using trusted Certificate Authority.

Parameters for certificate generating will be used from available properties, such as CommonName, BitCount, etc...

Please note that prior to generating new certificate you MUST generate private key from which this certificate will be derived. You can do so using GenerateKey method. Do that before you enter parameters specified in above paragraph, since GenerateKey will clear out all certificate information!

Platforms

Windows