EldoS
Navigation
Web site
Support
Table Of Contents
View Table Of Contents | Send comments on this topic

Filter: C#  VB.NET  Pascal  ActiveX  DLL 


ElCustomCertStorage.LoadFromBufferPFX

CustomCertStorage     See also    


 

Use this method to load multiple certificates stored in PFX (PKCS12) format.

 
 

Declaration

[C#]
    int LoadFromBufferPFX([in] byte[] Buffer, [in] string Password);

[VB.NET]
    Function LoadFromBufferPFX(ByVal Buffer As Byte(), ByVal Password As String) As Integer

[Pascal]
    function LoadFromBufferPFX(Buffer : pointer; Size : integer; Password : string) : integer;

[VB6]
    Sub IElCustomCertStorageX3.LoadFromBufferPFX(Buffer As Byte(), Password As String)

[ActiveX]
    HRESULT _stdcall IElCustomCertStorageX3.LoadFromBufferPFX([in] VARIANT Buffer, [in] BSTR Password );

[DLL]
    not applicable;
 
 

Parameters

  • Buffer - Buffer with PKCS12 data
  • Size - Size of Buffer in bytes
  • Password - Password to decrypt certificates
 
 

Return value

    0 if certificates were successfully loaded.
    PKCS12 error code otherwise.

 
 

PKCS12 Error codes

[.NET] [Pascal] [ActiveX] [DLL] Value Description
SB_PKCS12_ERROR_INVALID_ASN_DATA 793 (0x1F01) Buffer doesn't contain a valid PFX sequence
SB_PKCS12_ERROR_NO_DATA 7938 (0x1F02) The PFX message doesn't contain any certificate
SB_PKCS12_ERROR_INVALID_DATA 7939 (0x1F03) Some parameters of PFX message are invalid
SB_PKCS12_ERROR_INVALID_VERSION 7940 (0x1F04) PFX message version is invalid
SB_PKCS12_ERROR_INVALID_CONTENT 7941 (0x1F05) PFX message contains invalid content
SB_PKCS12_ERROR_INVALID_AUTHENTICATED_SAFE_DATA 7942 (0x1F06) AuthenticatedSafe part of PFX message is invalid
SB_PKCS12_ERROR_INVALID_MAC_DATA 7943 (0x1F07) MAC part of PFX message PFX message is invalid
SB_PKCS12_ERROR_INVALID_SAFE_CONTENTS 7944 (0x1F08) The entity located in PFX message has invalid content type.
SB_PKCS12_ERROR_INVALID_SAFE_BAG 7945 (0x1F09) The entity located in PFX message has invalid format
SB_PKCS12_ERROR_INVALID_SHROUDED_KEY_BAG 7946 (0x1F0A) The private key contained in PFX message has invalid format
SB_PKCS12_ERROR_UNKNOWN_PBE_ALGORITHM 7947 (0x1F0B)
  • Saving: invalid PBE algorithm specified
  • Loading: unknown PBE algorithm was used to encrypt the message.
  • SB_PKCS12_ERROR_INTERNAL_ERROR 7948 (0x1F0C) Internal error occured. Please contact EldoS support for details.
    SB_PKCS12_ERROR_INVALID_PBE_ALGORITHM_PARAMS 7949 (0x1F0D) PBE algorithm params (iteration count and salt) are invalid
    SB_PKCS12_ERROR_INVALID_CERT_BAG 7950 (0x1F0E) The certificate contained in PFX message has invalid format
    SB_PKCS12_ERROR_UNSUPPORTED_CERTIFICATE_TYPE 7951 (0x1F0F) The certificate contained in PFX message has unsupported type
    SB_PKCS12_ERROR_INVALID_PRIVATE_KEY 7952 (0x1F10) The private key contained in PFX message has invalid format
    SB_PKCS12_ERROR_INVALID_MAC 7953 (0x1F11) MAC verification failed
    SB_PKCS12_ERROR_NO_CERTIFICATES 7954 (0x1F12) Saving: nothing to save
    SB_PKCS12_ERROR_INVALID_PASSWORD 7955 (0x1F13) Invalid password was specified. Can not decrypt certificate.
    SB_PKCS12_ERROR_BUFFER_TOO_SMALL 7956 (0x1F14) Buffer doesn't have enough space to store encoded certificate
    Declared in
    [.NET] [Pascal]
    Namespace: SBPKCS12
    Assembly: SecureBlackbox
    Unit: SBPKCS12

     
     

    Description

        Use this method to load certificates which are stored in PFX format. PFX format supports storing of private keys.

     
     

    See also:     LoadFromStreamPFX SaveToBufferPFX SaveToStreamPFX

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