SecureBlackbox 2020 C++ Edition

Questions / Feedback?

ExternalSign Event

Handles remote or external signing initiated by the server protocol.

Syntax

ANSI (Cross Platform)
virtual int FireExternalSign(OCSPServerExternalSignEventParams *e);
typedef struct {
int64 ConnectionID;
const char *OperationId;
const char *HashAlgorithm;
const char *Pars;
const char *Data;
char *SignedData; int reserved; } OCSPServerExternalSignEventParams; Unicode (Windows) virtual INT FireExternalSign(OCSPServerExternalSignEventParams *e);
typedef struct {
LONG64 ConnectionID;
LPCWSTR OperationId;
LPCWSTR HashAlgorithm;
LPCWSTR Pars;
LPCWSTR Data;
LPWSTR SignedData; INT reserved; } OCSPServerExternalSignEventParams;
- (void)onExternalSign:(long long)connectionID :(NSString*)operationId :(NSString*)hashAlgorithm :(NSString*)pars :(NSString*)data :(NSString**)signedData;
#define EID_OCSPSERVER_EXTERNALSIGN 7

virtual INT SECUREBLACKBOX_CALL FireExternalSign(LONG64 &lConnectionID, LPSTR &lpszOperationId, LPSTR &lpszHashAlgorithm, LPSTR &lpszPars, LPSTR &lpszData, LPSTR &lpszSignedData);

Remarks

Assign a handler to this event if you need to delegate a low-level signing operation to an external, remote, or custom signing engine. Depending on the settings, the handler will receive a hashed or unhashed value to be signed.

The event handler must pass the value of Data to the signer, obtain the signature, and pass it back to the component via SignedData parameter.

OperationId provides a comment about the operation and its origin. It depends on the exact component being used, and may be empty. HashAlgorithm specifies the hash algorithm being used for the operation, and Pars contain algorithm-dependent parameters.

The component uses base16 (hex) encoding for Data, SignedData, and Pars parameters. If your signing engine uses a different input and output encoding, you may need to decode and/or encode the data before and/or after the signing.

A sample MD5 hash encoded in base16: a0dee2a0382afbb09120ffa7ccd8a152 - lower case base16 A0DEE2A0382AFBB09120FFA7CCD8A152 - upper case base16

Copyright (c) 2022 /n software inc. - All rights reserved.
SecureBlackbox 2020 C++ Edition - Version 20.0 [Build 8166]