aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
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;
}
/**