diff options
author | Alberto Compagno <acompagn+fdio@cisco.com> | 2019-03-08 14:09:28 +0100 |
---|---|---|
committer | Alberto Compagno <acompagn+fdio@cisco.com> | 2019-03-08 14:09:28 +0100 |
commit | e493821fa35ebffd3ca97328bcd2deca1ef245bf (patch) | |
tree | 5b561d232c7bc5c76a2e42ea93bf114606a693f2 /libparc | |
parent | 0defedfd7246fdfc9ecc050691cdf7d3ec2ed2cc (diff) |
[CICN-19] Fixed missing allocation for holding the signature in SignDigest
Change-Id: Ie7bcb3c0404caffb11037b4c72f954d88c9c1e0e
Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com>
Diffstat (limited to 'libparc')
-rw-r--r-- | libparc/parc/security/parc_PublicKeySigner.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libparc/parc/security/parc_PublicKeySigner.c b/libparc/parc/security/parc_PublicKeySigner.c index 7d274398..5992c744 100644 --- a/libparc/parc/security/parc_PublicKeySigner.c +++ b/libparc/parc/security/parc_PublicKeySigner.c @@ -303,7 +303,7 @@ _SignDigest(PARCPublicKeySigner *signer, const PARCCryptoHash *digestToSign) RSA *rsa = EVP_PKEY_get1_RSA(privateKey); - uint8_t * sig = parcMemory_Allocate(RSA_size(rsa)); + signature_buf = parcMemory_Allocate(RSA_size(rsa)); _SignDigestRSA(digestToSign, privateKeyBuffer, opensslDigestType, signature_buf, &signLenght); RSA_free(rsa); break; @@ -318,7 +318,7 @@ _SignDigest(PARCPublicKeySigner *signer, const PARCCryptoHash *digestToSign) EC_KEY *ec_key = EVP_PKEY_get1_EC_KEY(privateKey); - uint8_t * sig = parcMemory_Allocate(ECDSA_size(ec_key)); + signature_buf = parcMemory_Allocate(ECDSA_size(ec_key)); _SignDigestECDSA(digestToSign, privateKeyBuffer, opensslDigestType, signature_buf, &signLenght); EC_KEY_free(ec_key); break; |