![]() |
SignDoc SDK (C)
5.0.0
|
Interface for creating an ECDSA signature. More...
#include <SignDocSDK-c.h>
Public Types | |
typedef SIGNDOC_Boolean(* | SIGNDOC_SignECDSA_sign) (void *aClosure, struct SIGNDOC_Source *aSource, const char *aHashAlgorithm, struct SIGNDOC_ByteArray *aOutput) |
Callback: Compute an ECDSA signature. More... | |
typedef int(* | SIGNDOC_SignECDSA_getSignatureSize) (void *aClosure) |
Callback: Get the size of the signature that will be computed by SIGNDOC_SignECDSA_sign. More... | |
typedef SIGNDOC_Boolean(* | SIGNDOC_SignECDSA_getSigningCertificate) (const void *aClosure, struct SIGNDOC_ByteArray *aOutput) |
Callback: Get the signing certificate. More... | |
typedef int(* | SIGNDOC_SignECDSA_getCertificateCount) (const void *aClosure) |
Callback: Get the number of available intermediate certificates. More... | |
typedef SIGNDOC_Boolean(* | SIGNDOC_SignECDSA_getCertificate) (const void *aClosure, int aIndex, struct SIGNDOC_ByteArray *aOutput) |
Callback: Get an intermediate certificate. More... | |
typedef const char *(* | SIGNDOC_SignECDSA_getErrorMessage) (const void *aClosure) |
Callback: Get an error message for the last operation. More... | |
Public Member Functions | |
struct SIGNDOC_SignECDSA * | SIGNDOC_SignECDSA_new (struct SIGNDOC_Exception **aEx, void *aClosure, SIGNDOC_SignECDSA_sign aSign, SIGNDOC_SignECDSA_getSignatureSize aGetSignatureSize, SIGNDOC_SignECDSA_getSigningCertificate aGetSigningCertificate, SIGNDOC_SignECDSA_getCertificateCount aGetCertificateCount, SIGNDOC_SignECDSA_getCertificate aGetCertificate, SIGNDOC_SignECDSA_getErrorMessage aGetErrorMessage) |
SIGNDOC_SignECDSA constructor. More... | |
void | SIGNDOC_SignECDSA_delete (struct SIGNDOC_SignECDSA *aObj) |
SIGNDOC_SignECDSA destructor. More... | |
Interface for creating an ECDSA signature.
Selection of the certificate is up to the implementation.
typedef SIGNDOC_Boolean( * SIGNDOC_SignECDSA_getCertificate) (const void *aClosure, int aIndex, struct SIGNDOC_ByteArray *aOutput) |
Callback: Get an intermediate certificate.
[in] | aClosure | A pointer to user-defined object. |
[in] | aIndex | The zero-based index of the intermediate certificate, see SIGNDOC_SignECDSA_getCertificateCount(). |
[in,out] | aOutput | The requested intermediate certificate shall be stored here (DER-encoded X.509). |
typedef int( * SIGNDOC_SignECDSA_getCertificateCount) (const void *aClosure) |
Callback: Get the number of available intermediate certificates.
[in] | aClosure | A pointer to user-defined object. |
typedef const char*( * SIGNDOC_SignECDSA_getErrorMessage) (const void *aClosure) |
Callback: Get an error message for the last operation.
After any function pointer of the SIGNDOC_SignECDSA object has been called, this function shall return an error message (possibly empty if the most recently called function pointer didn't fail).
[in] | aClosure | A pointer to user-defined object. |
typedef int( * SIGNDOC_SignECDSA_getSignatureSize) (void *aClosure) |
Callback: Get the size of the signature that will be computed by SIGNDOC_SignECDSA_sign.
[in] | aClosure | A pointer to user-defined object. |
typedef SIGNDOC_Boolean( * SIGNDOC_SignECDSA_getSigningCertificate) (const void *aClosure, struct SIGNDOC_ByteArray *aOutput) |
Callback: Get the signing certificate.
[in] | aClosure | A pointer to user-defined object. |
[in,out] | aOutput | The signing certificate shall be stored here (DER-encoded X.509). |
typedef SIGNDOC_Boolean( * SIGNDOC_SignECDSA_sign) (void *aClosure, struct SIGNDOC_Source *aSource, const char *aHashAlgorithm, struct SIGNDOC_ByteArray *aOutput) |
Callback: Compute an ECDSA signature.
[in] | aClosure | A pointer to user-defined object. |
[in] | aSource | An object providing data to be hashed and signed. |
[in] | aHashAlgorithm | The hash algorithm to be used for the signature:
|
[in,out] | aOutput | The ECDSA signature (a DER-encoded SEQUENCE) shall be stored here. It shall not be wrapped in an OCTET STRING. |
void SIGNDOC_SignECDSA_delete | ( | struct SIGNDOC_SignECDSA * | aObj | ) |
SIGNDOC_SignECDSA destructor.
[in] | aObj | A pointer to the SIGNDOC_SignECDSA object. |
struct SIGNDOC_SignECDSA * SIGNDOC_SignECDSA_new | ( | struct SIGNDOC_Exception ** | aEx, |
void * | aClosure, | ||
SIGNDOC_SignECDSA_sign | aSign, | ||
SIGNDOC_SignECDSA_getSignatureSize | aGetSignatureSize, | ||
SIGNDOC_SignECDSA_getSigningCertificate | aGetSigningCertificate, | ||
SIGNDOC_SignECDSA_getCertificateCount | aGetCertificateCount, | ||
SIGNDOC_SignECDSA_getCertificate | aGetCertificate, | ||
SIGNDOC_SignECDSA_getErrorMessage | aGetErrorMessage | ||
) |
SIGNDOC_SignECDSA constructor.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aClosure | A pointer to user-defined object that will be passed to the callbacks. |
[in] | aSign | Pointer to function implementing sign(). |
[in] | aGetSignatureSize | Pointer to function implementing getSignatureSize(). |
[in] | aGetSigningCertificate | Pointer to function implementing getSigningCertificate(). |
[in] | aGetCertificateCount | Pointer to function implementing getCertificateCount(). |
[in] | aGetCertificate | Pointer to function implementing getCertificate(). |
[in] | aGetErrorMessage | Pointer to function implementing getErrorMessage(). |