aboutsummaryrefslogtreecommitdiffstats
path: root/libparc/parc/security/parc_Signer.h
diff options
context:
space:
mode:
authorAlberto Compagno <acompagn+fdio@cisco.com>2018-04-16 15:28:53 +0000
committerGerrit Code Review <gerrit@fd.io>2018-04-16 15:28:53 +0000
commit07d0a90b6f52fa920ab3a4a9984b0ba1fbb7f9f8 (patch)
treef3810af54c63c0f1bb5226e84897411c41b40d03 /libparc/parc/security/parc_Signer.h
parentd609ef19bac231a47b65cf5a6a797c142ebc625d (diff)
parent799484812a3fdd9d5d6e71c5fc4b483043347bca (diff)
Merge "Added method to retrieve the signature length from the signer. Fixed bug on parc-publickey" into cframework/master
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