aboutsummaryrefslogtreecommitdiff
path: root/pkcs11.c
diff options
context:
space:
mode:
Diffstat (limited to 'pkcs11.c')
-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);