Discuss this help topic in SecureBlackbox Forum

TElWinCertStorage.Add

TElWinCertStorage     See also     


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


Adds the certificate to the system storage

Declaration

[C#/Java]
    void Add(TElX509Certificate Certificate, bool CopyPrivateKey /* = true */);
    void Add(TElX509Certificate Certificate, string StoreName, bool CopyPrivateKey /* = false */, bool Exportable /* = true */, bool Protected /* = true */);
    void Add(TElX509Certificate Certificate, bool BindToExistingPrivateKey, string StoreName, string PrivateKeyContainerName);

[VB.NET]
    Sub Add(ByVal Certificate As TElX509Certificate, ByVal CopyPrivateKey As Boolean = True)
    Sub Add(ByVal Certificate As TElX509Certificate, ByVal StoreName As String, ByVal CopyPrivateKey As Boolean = False, ByVal Exportable As Boolean = True, ByVal [Protected] As Boolean = True)
    Sub Add(ByVal Certificate As TElX509Certificate, ByVal BindToExistingPrivateKey As Boolean, ByVal StoreName As String, ByVal PrivateKeyContainerName As String)

[Pascal]
    procedure Add(Certificate : TElX509Certificate; CopyPrivateKey : boolean = true); overload;
    procedure Add(Certificate : TElX509Certificate; StoreName : string; CopyPrivateKey : boolean = true; Exportable : boolean = true; Protected : boolean = true);
    procedure Add(Certificate : TElX509Certificate; BindToExistingPrivateKey : boolean; const StoreName : string; const PrivateKeyContainerName : string);

[C++]
    void Add(TElX509Certificate &Certificate, bool CopyPrivateKey);
    void Add(TElX509Certificate *Certificate, bool CopyPrivateKey);
    void Add(TElX509Certificate &Certificate, const std::string &StoreName, bool CopyPrivateKey, bool Exportable, bool Protected);
    void Add(TElX509Certificate *Certificate, const std::string &StoreName, bool CopyPrivateKey, bool Exportable, bool Protected);
    void Add(TElX509Certificate &Certificate, bool BindToExistingPrivateKey, const std::string &StoreName, const std::string &PrivateKeyContainerName);
    void Add(TElX509Certificate *Certificate, bool BindToExistingPrivateKey, const std::string &StoreName, const std::string &PrivateKeyContainerName);

[PHP]
    void Add(TElX509Certificate $Certificate, bool $CopyPrivateKey)
    void Add(TElX509Certificate $Certificate, string $StoreName, bool $CopyPrivateKey, bool $Exportable, bool $Protected)
    void Add(TElX509Certificate $Certificate, bool $BindToExistingPrivateKey, string $StoreName, string $PrivateKeyContainerName)

Parameters

  • Certificate - Certificate object, initialized by LoadFromBuffer method
  • StoreName - System store name, where to put the certificate.
  • CopyPrivateKey - True - private key will be copied when certificate is added.
    False - private key will not be copied.
  • Exportable - True - private key will be marked as exportable.
    False - private key will not be marked as exportable.
  • Protected - True - private key will be marked as protected.
    False - private key will not be marked as protected.
  • BindToExistingPrivateKey - True - certificate will be bound to existing private key.
  • PrivateKeyContainerName - Specifies private key container.

Description

    Use this method to add certificate to system certificate store. If the store name is not specified, the certificate is added to the ROOT system store.

Note, that dependently on your system settings, Windows may ask you whether you want to add certificate to it's system store.

See also:     Remove     ListKeyContainers    

Discuss this help topic in SecureBlackbox Forum