Discuss this help topic in SecureBlackbox Forum

TElX509Certificate.LoadKeyFromFileAuto

TElX509Certificate     See also     


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


Reads the certificate's private key from file.

Declaration

[C#]
    int LoadKeyFromFileAuto(string Filename, string Password);

[VB.NET]
    Function LoadKeyFromFileAuto(ByVal Filename As String, ByVal Password As String) As Integer

[Pascal]
    function LoadKeyFromFileAuto(const Filename : string; const Password : string) : integer;

[C++]
    int32_t LoadKeyFromFileAuto(const std::string &Filename, const std::string &Password);

[PHP]
    integer LoadKeyFromFileAuto(string $Filename, string $Password)

[Java]
    int loadKeyFromFileAuto(String Filename, String Password);

Parameters

  • Filename - name of the file containing the key.
  • Password - password to access the key.

Return value

    0 on success.
    Error code otherwise.
    If the format of the certificate is not recognized, SB_X509_ERROR_UNRECOGNIZED_FORMAT (0x5009) error is reported.

Description

    This method attempts to read the certificate's private key from the file. It recognizes the format automatically; if the format is not recognized, SB_X509_ERROR_UNRECOGNIZED_FORMAT (0x5009) error is reported. The supported formats are: DER, PEM, PFX, PVK, NET, PKCS#8.

See also:     LoadKeyFromBufferAuto     LoadKeyFromStreamAuto    

Discuss this help topic in SecureBlackbox Forum