EldoS
Navigation
Web site
Support
Table Of Contents

Filter: C#  VB.NET  Pascal  ActiveX  DLL 


TElX509Certificate.LoadFromStreamPEM

TElX509Certificate     See also    


 

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

 
 

Declaration

[C#]
    int LoadFromStreamPEM(System.IO.Stream Stream, [in] string PassPhrase, int Count /* = 0 */);

[VB.NET]
    Function LoadFromStreamPEM(ByVal Stream As System.IO.Stream, ByVal PassPhrase As String, ByVal Count As Integer = 0) As Integer

[Pascal]
    function LoadFromStreamPEM(Stream : TStream; PassPhrase : string; Count : integer = 0) : integer;

[VB6]
    not implemented;

[ActiveX]
    not implemented;

[DLL]
    not applicable;
 
 

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.
  • PassPhrase - Specifies the pass phrase to decrypt the certificate data. If certificate is not encrypted, set this parameter to empty string.
 
 

Return value

    0 on success.
    PEM error code otherwise.

 
 

PEM Error Codes

[.NET] [Pascal] Value Description
PEM_DECODE_RESULT_INVALID_FORMAT 7425 (0x1D01) Buffer doesn't contain a valid PEM sequence
PEM_DECODE_RESULT_INVALID_PASSPHRASE 7426 (0x1D02) A non-valid passphrase was specified
PEM_DECODE_RESULT_NOT_ENOUGH_SPACE 7427 (0x1D03) There is no enough space to write encoded/decoded data
PEM_DECODE_RESULT_UNKNOWN_CIPHER 7428 (0x1D04) The message was encrypted using unknown cipher
Declared in
[.NET] [Pascal]
Namespace: SBPEM
Assembly: SecureBlackbox
Unit: SBPEM

 
 

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 PEM format.

 
 

See also:     LoadFromStreamAuto     LoadFromStream     LoadFromBufferPEM     SaveToStreamPEM    

 
Contact Us | Terms of Use | Trademarks | Privacy Statement
Copyright (c) 1998-2012, EldoS Corporation