aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2016-06-13 12:51:21 -0400
committerRob Austein <sra@hactrn.net>2016-06-13 12:51:21 -0400
commita7fedbfe7c5fd8c408d400a73a844c081b0f1834 (patch)
tree330ea8cbc38db0fb9812f4e4bfdbaa41ca08b4c8
parentf266fbc28d1f76c5712d2e60876aa3748ecdd9b6 (diff)
Set return value properly in C_CreateObject().
-rw-r--r--pkcs11.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/pkcs11.c b/pkcs11.c
index 1ac9326..641c032 100644
--- a/pkcs11.c
+++ b/pkcs11.c
@@ -3366,19 +3366,19 @@ CK_RV C_CreateObject(CK_SESSION_HANDLE hSession,
if (*cka_class == CKO_PUBLIC_KEY && *cka_key_type == CKK_RSA &&
!p11_object_create_rsa_public_key(session, handle, flags))
- goto fail;
+ lose(CKR_FUNCTION_FAILED);
if (*cka_class == CKO_PUBLIC_KEY && *cka_key_type == CKK_EC &&
!p11_object_create_ec_public_key(session, handle, flags))
- goto fail;
+ lose(CKR_FUNCTION_FAILED);
if (*cka_class == CKO_PRIVATE_KEY && *cka_key_type == CKK_RSA &&
!p11_object_create_rsa_private_key(session, handle, flags, pTemplate, ulCount))
- goto fail;
+ lose(CKR_FUNCTION_FAILED);
if (*cka_class == CKO_PRIVATE_KEY && *cka_key_type == CKK_EC &&
!p11_object_create_ec_private_key(session, handle, flags, pTemplate, ulCount))
- goto fail;
+ lose(CKR_FUNCTION_FAILED);
if (!sql_exec("COMMIT"))
lose(CKR_FUNCTION_FAILED);