Discuss this help topic in SecureBlackbox Forum

TElX509Certificate.LoadFromStreamPFX

TElX509Certificate     See also     


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


Reads the certificate from the stream. Certificate is contained in PFX format.

Declaration

[C#/Java]
    int LoadFromStreamPFX(System.IO.Stream Stream, string Password, int Count);

[VB.NET]
    Function LoadFromStreamPFX(ByVal Stream As System.IO.Stream, ByVal Password As String, ByVal Count As Integer) As Integer

[Pascal]
    function LoadFromStreamPFX(Stream : TStream; Password : string; Count : integer = 0) : integer;

[C++]
    int32_t LoadFromStreamPFX(TStream &Stream, const std::string &Password, int32_t Count);
    int32_t LoadFromStreamPFX(TStream *Stream, const std::string &Password, int32_t Count);

[PHP]
    integer LoadFromStreamPFX(TStream $Stream, string $Password, integer $Count)

Parameters

  • Stream - The stream from which the certificate is loaded.
  • Count - Optional parameter that specified the number of bytes to be read. If this parameter is zero, the whole stream (from current position till the end) is read.
  • Password - Specifies the passphrase to decrypt the certificate data. If the certificate is not encrypted, set this parameter to an empty string.

Return value

    0 on success.
    PKCS12 error code otherwise.

Description

    Use this method to read the certificate from the stream. The read operation is started at current stream position and finished when the end of the stream is reached or when the number of bytes specified in Count parameter is read. The certificate must have been saved in PFX format.

See also:     LoadFromStreamAuto     LoadFromStream     LoadFromBufferPFX     SaveToStreamPFX    

Discuss this help topic in SecureBlackbox Forum