aboutsummaryrefslogtreecommitdiffstats
path: root/libparc/parc/security/parc_Signer.h
diff options
context:
space:
mode:
authorAlberto Compagno <acompagn+fdio@cisco.com>2019-02-06 12:05:58 +0100
committerAlberto Compagno <acompagn+fdio@cisco.com>2019-02-06 12:05:58 +0100
commitb77148ddc3def71e6c412c3afb5f1c20be2d77cd (patch)
tree53e6db3aa4f3fa6cb5cb5bd4e219cd0d50d7c0f4 /libparc/parc/security/parc_Signer.h
parent4e710f08b38954194e1a67159403f31b10ad7afb (diff)
[CICN-14] Removed copy of signature in libparc. The api now accepts a pointer to a buf where it stores the computed signature
Change-Id: I4427a6399b5e74197303bade4f96ea74b370b07b Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com>
Diffstat (limited to 'libparc/parc/security/parc_Signer.h')
-rwxr-xr-xlibparc/parc/security/parc_Signer.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/libparc/parc/security/parc_Signer.h b/libparc/parc/security/parc_Signer.h
index bee68fd2..9bb0c6a1 100755
--- a/libparc/parc/security/parc_Signer.h
+++ b/libparc/parc/security/parc_Signer.h
@@ -84,10 +84,12 @@ typedef struct parc_signer_interface {
*
* @param [in] interfaceContextPtr A pointer to a concrete PARCSigner instance.
* @param [in] hashToSign The output of the given digest to sign
+ * @param [in] signature Portion of memory that will contain the signature (expected to be large enough to contain the signature)
+ * @param [in] sig_len Size in bytes of the supplied buffer
*
* @return A pointer to a PARCSignature instance that must be released via parcSignature_Release()
*/
- PARCSignature *(*SignDigest)(void *interfaceContext, const PARCCryptoHash * parcDigest);
+ PARCSignature *(*SignDigest)(void *interfaceContext, const PARCCryptoHash * parcDigest, uint8_t * signature, uint32_t sign_len);
/**
* Return the PARSigningAlgorithm used for signing with the given `PARCSigner`
@@ -283,6 +285,8 @@ PARCCryptoHasher *parcSigner_GetCryptoHasher(const PARCSigner *signer);
*
* @param [in] signer A pointer to a PARCSigner instance.
* @param [in] hashToSign The output of the given digest
+ * @param [in] signature Portion of memory that will contain the signature (expected to be large enough to contain the signature)
+ * @param [in] sig_len Size in bytes of the supplied buffer
*
* @return A pointer to a PARCSignature instance that must be released via parcSignature_Release()
*
@@ -300,7 +304,7 @@ PARCCryptoHasher *parcSigner_GetCryptoHasher(const PARCSigner *signer);
* }
* @endcode
*/
-PARCSignature *parcSigner_SignDigest(const PARCSigner *signer, const PARCCryptoHash *hashToSign);
+PARCSignature *parcSigner_SignDigest(const PARCSigner *signer, const PARCCryptoHash *hashToSign, uint8_t * signature, uint32_t sig_len);
/**
* Compute the signature of a given `PARCBuffer`.
@@ -320,7 +324,7 @@ PARCSignature *parcSigner_SignDigest(const PARCSigner *signer, const PARCCryptoH
* }
* @endcode
*/
-PARCSignature *parcSigner_SignBuffer(const PARCSigner *signer, const PARCBuffer *buffer);
+PARCSignature *parcSigner_SignBuffer(const PARCSigner *signer, const PARCBuffer *buffer, uint8_t * signature, uint32_t sig_len);
/**
* Return the PARSigningAlgorithm used for signing with the given `PARCSigner`