diff options
author | Devel <acompagn+fdio@cisco.com> | 2018-04-14 16:22:36 +0200 |
---|---|---|
committer | Devel <acompagn+fdio@cisco.com> | 2018-04-14 16:22:36 +0200 |
commit | f1a29ee82f6f6adf439064e1247d00168b579585 (patch) | |
tree | 7f45d41d77c3ed8e86ee5a52c673ce2773fc7679 /libparc/parc/security/parc_Signer.c | |
parent | 75a923f0ee362a039b51a141a719ce50597ca233 (diff) |
Added method to retrieve a PARCCryptoSuite from a PARCSigningAlgorithm and a PARCCryptoHashType
Change-Id: I98124a9315470ec2335dbc9dc079575c67f239c1
Signed-off-by: Devel <acompagn+fdio@cisco.com>
Diffstat (limited to 'libparc/parc/security/parc_Signer.c')
-rw-r--r-- | libparc/parc/security/parc_Signer.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libparc/parc/security/parc_Signer.c b/libparc/parc/security/parc_Signer.c index 2135070c..ec5b8a19 100644 --- a/libparc/parc/security/parc_Signer.c +++ b/libparc/parc/security/parc_Signer.c @@ -151,6 +151,16 @@ parcSigner_GetCryptoHashType(const PARCSigner *signer) return signer->interface->GetCryptoHashType(signer->instance); } +PARCCryptoSuite +parcSigner_GetCryptoSuite(const PARCSigner *signer) +{ + parcSigner_OptionalAssertValid(signer); + + PARCCryptoHashType hash = signer->interface->GetCryptoHashType(signer->instance); + PARCSigningAlgorithm signAlgo = signer->interface->GetSigningAlgorithm(signer->instance); + return parcCryptoSuite_GetFromSigningHash(signAlgo, hash); +} + PARCKeyStore * parcSigner_GetKeyStore(const PARCSigner *signer) { |