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