aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorDaniel Wyatt <[email protected]>2019-05-27 19:55:27 -0400
committerDaniel Wyatt <[email protected]>2019-05-27 19:55:27 -0400
commit853d500199eadc04801616915632860c9eb10663 (patch)
tree661527ed4f81086ac53507c238c2e6a90523ba63 /src/lib
parentf35047d702031d2972b60955c84023656af431b9 (diff)
Fix PKCS#11 C_Sign output size.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/prov/pkcs11/p11.h9
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;
}
/**