Discuss this help topic in SecureBlackbox Forum

TElPDFAdvancedPublicKeySecurityHandler.OnRemoteSign

TElPDFAdvancedPublicKeySecurityHandler     See also     


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


This event is fired when remote signing is used.

Declaration

[C#]
    event TSBPDFRemoteSignEvent OnRemoteSign;
    delegate void TSBPDFRemoteSignEvent(Object Sender, byte[] Hash, ref byte[] SignedHash);

[VB.NET]
    Event OnRemoteSign As TSBPDFRemoteSignEvent
    Delegate Sub TSBPDFRemoteSignEvent(ByVal Sender As Object, ByVal Hash As Byte(), ByRef SignedHash As Byte())

[Pascal]
    property OnRemoteSign : TSBPDFRemoteSignEvent;
    TSBPDFRemoteSignEvent = procedure(Sender : TObject; const Hash : ByteArray; var SignedHash : ByteArray) of object;

[C++]
    void get_OnRemoteSign(TSBPDFRemoteSignEvent &pMethodOutResult, void * &pDataOutResult);
    void set_OnRemoteSign(TSBPDFRemoteSignEvent pMethodValue, void * pDataValue);
    typedef void (SB_CALLBACK *TSBPDFRemoteSignEvent)(void * _ObjectData, TObjectHandle Sender, const uint8_t pHash[], int32_t szHash, uint8_t pSignedHash[], int32_t &szSignedHash);

[PHP]
    TSBPDFRemoteSignEvent|callable|NULL get_OnRemoteSign()
    void set_OnRemoteSign(TSBPDFRemoteSignEvent|callable|NULL $Value)
    callable TSBPDFRemoteSignEvent(TObject $Sender, string $Hash, string &$SignedHash)

[Java]
    TSBPDFRemoteSignEvent getOnRemoteSign();
    void setOnRemoteSign(TSBPDFRemoteSignEvent Value);
    TSBPDFRemoteSignEvent.Callback OnRemoteSign = new TSBPDFRemoteSignEvent.Callback() {
        public byte[] TSBPDFRemoteSignEventCallback(TObject Sender, byte[] Hash) {
            //...
        }
    }

Parameters

  • Hash - contains the computed hash value.
  • SignedHash - the signed hash value should be passed ia this parameter.
  • pHash -
  • szHash - the length of pcHash.
  • pSignedHash -
  • szSignedHash - the length of pcSignedHash.

Description

     Assign a handler of this event if you need to delegate the low-level signing operation to an external, remote or custom signing engine. The handler will receive the hash value (by default) or the data (when configured accordingly) to be signed. The event handler must pass the received hash or data to the signer, obtain the signature and return it back to the component. The signature should be in CMS format.

If the remote signer expects the data and calculates the hash itself, set TElPDFAdvancedPublicKeySecurityHandler.RemoteSigningParams.ExternalHashCalculation property to true. This will tell the PDF component to pass the data instead of the hash in the Hash parameter. Note that for large documents, the need to pass the data can lead to excessive memory use and OutOfMemory errors.

See also:     RemoteSigningMode     TSBCMSRemoteSignCallback    

Discuss this help topic in SecureBlackbox Forum