aboutsummaryrefslogtreecommitdiffstats
path: root/libparc/parc/security/parc_Signer.h
diff options
context:
space:
mode:
authorDevel <acompagn+fdio@cisco.com>2018-04-16 16:52:31 +0200
committerAlberto Compagno <acompagn+fdio@cisco.com>2018-04-16 15:23:49 +0000
commit799484812a3fdd9d5d6e71c5fc4b483043347bca (patch)
tree40993aeb725715bbb97bc353351e718639ba0d53 /libparc/parc/security/parc_Signer.h
parente4fcd260cb99434033a8ccfba12eee12dab190b9 (diff)
Added method to retrieve the signature length from the signer. Fixed bug on parc-publickey
Change-Id: If188601e83d0cebf42d2e868e1dce430eabfa1f2 Signed-off-by: Devel <acompagn+fdio@cisco.com>
Diffstat (limited to 'libparc/parc/security/parc_Signer.h')
-rwxr-xr-xlibparc/parc/security/parc_Signer.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/libparc/parc/security/parc_Signer.h b/libparc/parc/security/parc_Signer.h
index bd69c992..1e675c50 100755
--- a/libparc/parc/security/parc_Signer.h
+++ b/libparc/parc/security/parc_Signer.h
@@ -115,6 +115,15 @@ typedef struct parc_signer_interface {
* @return A PARCKeyStore instance.
*/
PARCKeyStore *(*GetKeyStore)(void *interfaceContext);
+
+ /**
+ * Return the key size for this Signer.
+ *
+ * @param [in] interfaceContext A pointer to a concrete PARCSigner instance.
+ *
+ * @return A size_t
+ */
+ size_t (*GetSignatureSize)(void *interfaceContext);
} PARCSigningInterface;
/**
@@ -384,4 +393,22 @@ PARCCryptoSuite parcSigner_GetCryptoSuite(const PARCSigner *signer);
* @endcode
*/
PARCKeyStore *parcSigner_GetKeyStore(const PARCSigner *signer);
+
+/**
+ * Given a `PARCSigner` instance, return the expected size of the signature.
+ *
+ * @param [in] signer A pointer to a `PARCSigner` instance.
+ *
+ * @return A size_t with the size of the key.
+ *
+ * Example:
+ * @code
+ * {
+ * PARCSigner *signer = parcSigner_Create(publicKeySigner, PARCRSASignerAsSigner);
+ *
+ * PARCKeyStore *keyStore = parcSigner_GetKeyStore(signer);
+ * }
+ * @endcode
+ */
+size_t parcSigner_GetSignatureSize(const PARCSigner *signer);
#endif // libparc_parc_Signer_h