diff options
author | Rob Austein <sra@hactrn.net> | 2016-06-13 12:51:21 -0400 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2016-06-13 12:51:21 -0400 |
commit | a7fedbfe7c5fd8c408d400a73a844c081b0f1834 (patch) | |
tree | 330ea8cbc38db0fb9812f4e4bfdbaa41ca08b4c8 | |
parent | f266fbc28d1f76c5712d2e60876aa3748ecdd9b6 (diff) |
Set return value properly in C_CreateObject().
-rw-r--r-- | pkcs11.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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); |