diff options
author | Daniel Wyatt <[email protected]> | 2019-05-27 19:55:41 -0400 |
---|---|---|
committer | Daniel Wyatt <[email protected]> | 2019-05-27 19:55:41 -0400 |
commit | 4a759ef0164942d3908841cb047f00892921b753 (patch) | |
tree | 87ca24b6e8adcfbea5db0b8d2c8d1eb58f929589 /src/lib/prov | |
parent | 853d500199eadc04801616915632860c9eb10663 (diff) |
Fix PKCS#11 C_SignFinal output size.
Diffstat (limited to 'src/lib/prov')
-rw-r--r-- | src/lib/prov/pkcs11/p11.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/prov/pkcs11/p11.h b/src/lib/prov/pkcs11/p11.h index d941cd939..46545b925 100644 --- a/src/lib/prov/pkcs11/p11.h +++ b/src/lib/prov/pkcs11/p11.h @@ -2305,7 +2305,12 @@ class BOTAN_PUBLIC_API(2,0) LowLevel } signature.resize(signature_size); - return C_SignFinal(session, signature.data(), &signature_size, return_value); + if (!C_SignFinal(session, signature.data(), &signature_size, return_value)) + { + return false; + } + signature.resize(signature_size); + return true; } /** |