Discuss this help topic in SecureBlackbox Forum

TElCertificateRequest.Generate

TElCertificateRequest     See also     


Filter: C#/Java  VB.NET  Pascal  C++  PHP  


Generates new Certificate Request using previously set subject information

Declaration

[C#/Java]
    void Generate(int PublicKeyAlgorithm, int Bits, int SignatureAlgorithm);
    void Generate(TElAlgorithmIdentifier PublicKeyAlgorithm, int Bits, TElAlgorithmIdentifier SignatureAlgorithm);

[VB.NET]
    Sub Generate(ByVal PublicKeyAlgorithm As Integer, ByVal Bits As Integer, ByVal SignatureAlgorithm As Integer)
    Sub Generate(ByVal PublicKeyAlgorithm As TElAlgorithmIdentifier, ByVal Bits As Integer, ByVal SignatureAlgorithm As TElAlgorithmIdentifier)

[Pascal]
    procedure Generate(PublicKeyAlgorithm : integer; Bits : integer; SignatureAlgorithm : integer);

[C++]
    void Generate(int32_t PublicKeyAlgorithm, int32_t Bits, int32_t SignatureAlgorithm);
    void Generate(TElAlgorithmIdentifier &PublicKeyAlgorithm, int32_t Bits, TElAlgorithmIdentifier &SignatureAlgorithm);
    void Generate(TElAlgorithmIdentifier *PublicKeyAlgorithm, int32_t Bits, TElAlgorithmIdentifier *SignatureAlgorithm);

[PHP]
    void Generate(integer $PublicKeyAlgorithm, integer $Bits, integer $SignatureAlgorithm)
    void Generate(TElAlgorithmIdentifier $PublicKeyAlgorithm, integer $Bits, TElAlgorithmIdentifier $SignatureAlgorithm)

Parameters

  • PublicKeyAlgorithm - specifies the type of the key to be generated. Possible values are listed below.
  • Bits - The number of bits in resulting public key.
  • SignatureAlgorithm - specifies the algorithm which is used to sign the content of Certificate Request.

Values:

The following algorithms may be used as public key algorithms:


The following algorithms may be used as signature algorithms:

Description

    Use this method to generate new certificate request. New public and private key are also generated.

    Note, that the signature algorithm should correspond with public key algorithm. I.e. if the public key algorithm is set to SB_CERT_ALGORITHM_ID_RSA_ENCRYPTION, the signature algorithm should be set to one of SB_CERT_ALGORITHM_MD2_RSA_ENCRYPTION, SB_CERT_ALGORITHM_MD5_RSA_ENCRYPTION or SB_CERT_ALGORITHM_SHA1_RSA_ENCRYPTION.

    You can use exising key material (eg. the one from the PKCS#11 device) by setting KeyMaterial and PreserveKeyMaterial properties. If you don't set them, new key material is generated.

See also:     KeyMaterial property     PreserveKeyMaterial property     SaveToBuffer method    

Discuss this help topic in SecureBlackbox Forum