EldoS
Navigation
Web site
Support
Table Of Contents

Filter: C#  VB.NET  Pascal  ActiveX  DLL 


TElSecureClient.OnCertificateNeeded

TElSecureClient     See also    


 

This event is fired when the protocol requires a client certificate.
This event is deprecated. Use OnCertificateNeededEx event instead of OnCertificateNeeded.

 
 

Declaration

[C#]
    event TSBCertificateNeededEvent OnCertificateNeeded();
    delegate void TSBCertificateNeededEvent(object Sender, ref byte[] CertificateBuffer, ref int CertificateSize, ref byte[] PrivateKeyBuffer, ref int PrivateKeySize, TClientCertificateType CertificateType);

    enum TClientCertificateType {ccRSA = 0, ccDSS = 1, ccRSADH = 2, ccDSSDH = 3}

[VB.NET]
    Event OnCertificateNeeded As TSBCertificateNeededEvent
     Delegate Sub TSBCertificateNeededEvent(ByVal Sender As Object, ByRef CertificateBuffer As Byte(), ByRef CertificateSize As Integer, ByRef PrivateKeyBuffer As Byte(), ByRef PrivateKeySize As Integer, ByVal CertificateType As TClientCertificateType)

    Enum TClientCertificateType ccRSA ccDSS ccRSADH ccDSSDH End Enum

[Pascal]
    property OnCertificateNeeded : TSBCertificateNeededEvent;
    TSBCertificateNeededEvent = procedure (Sender : TObject; CertificateBuffer : pointer; var CertificateSize : LongInt; PrivateKeyBuffer : pointer; var PrivateKeySize : LongInt; CertificateType : TClientCertificateType) of object;

    TClientCertificateType = (ccRSA, ccDSS, ccRSADH, ccDSSDH);

[VB6]
    Event IElSecureClientXEvents.OnCertificateNeeded(CertificateType As TxSBCertificateType, CertificateBuffer As Byte(), CertificateSize As Long, PrivateKeyBuffer, PrivateKeySize As Long)

    Enum TxSBCertificateType SB_CT_RSA SB_CT_DSS SB_CT_RSADH SB_CT_DSSDH End Enum

[ActiveX]
    HRESULT IElSecureClientXEvents.OnCertificateNeeded ([in] TxSBCertificateType CertificateType, [out] VARIANT* CertificateBuffer, [in] long CertificateSize, [out] VARIANT* PrivateKeyBuffer, [in] long PrivateKeySize);

    typedef enum tagTxSBCertificateType{
      SB_CT_RSA = 0,
      SB_CT_DSS = 1,
      SB_CT_RSADH = 2,
      SB_CT_DSSDH = 3
    } TxSBCertificateType;

[DLL]
    __stdcall void SBClientSetOnCertificateNeeded(HANDLE handle, OnCertificateNeededProc code, long UserData);
    __stdcall (*OnCertificateNeededProc)(HANDLE handle, void* CertificateBuffer, int CertificateSize, void* PrivateKeyBuffer, int PrivateKeySize, int CertificateType);
 
 

Parameters

  • [DLL]handle - handle to the TElSecureClient object that was returned by Constructor
  • [DLL]Code - pointer to the callback function that is called when connection is opened
  • [DLL]UserData - application-defined data that is passed back to the callback function
  • CertificateBuffer - Contains a buffer for the certificate. [ActiveX]Buffer should be allocated by event handler. It must contain a one-dimensional zero-based safe array with elements of type unsigned char (byte).
  • CertificateSize - When the event handler is called, this parameter contains the size of the buffer passed via CertificateBuffer. The event handler should put the data to the buffer and return the size of the data in CertificateSize. [ActiveX]The use of this parameter is deprecated. Please ignore its value. Simply return the certificate and corresponding private key blobs to the CertificateBuffer parameter.
  • PrivateKeyBuffer - Contains a buffer for the private key that corresponds to the given certificate. [ActiveX]Buffer should be allocated by event handler. It must contain a one-dimensional zero-based safe array with elements of type unsigned char (byte).
  • PrivateKeySize - When the event handler is called, this parameter contains the size of the buffer passed via PrivateKeyBuffer. The event handler should put the data to the buffer and return the size of the data in PrivateKeySize. [ActiveX]The use of this parameter is deprecated. Please ignore its value. Simply return the certificate and corresponding private key blobs to the PrivateKeyBuffer parameter.
  • CertificateType - specifies the type of certificate requested.
 
 

Values:

[.NET] [Pascal] [ActiveX] [DLL] Value
ccRSA SB_CT_RSA 0 (0x00)
ccDSS SB_CT_DSS 1 (0x01)
ccRSADH SB_CT_RSADH 2 (0x02)
ccDSSDH SB_CT_DSSDH 3 (0x03)
Declared in
[.NET] [Pascal]
Namespace: SBClient
Assembly: SecureBlackbox.SSLClient
Unit: SBClient

 
 

Description

    This event is fired by TElSecureClient when the negotiated protocol requires a client-side X509 certificate to be used during session.

 
 

See also:     OnCertificateValidate    

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