diff options
author | Jason King <jasonbking@users.noreply.github.com> | 2020-10-07 13:48:24 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-07 13:48:24 -0500 |
commit | 18250a42a4b94a65ba1d41b8184d618853b621d1 (patch) | |
tree | 5de6b9130a796231cf484d2246be3504e3f7c588 | |
parent | 267754f92779bb92e7d82453a55be74c42a0a96a (diff) | |
download | illumos-joyent-release-20201008.tar.gz |
OS-8237 C_DeriveKey() doesn't always set object handle value (#336)release-20201008
Reviewed by: Dan McDonald <danmcd@joyent.com>
Reviewed by: Mike Zeller <mike.zeller@joyent.com>
Approved by: Mike Zeller <mike.zeller@joyent.com>
-rw-r--r-- | usr/src/lib/pkcs11/pkcs11_softtoken/common/softKeysUtil.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr/src/lib/pkcs11/pkcs11_softtoken/common/softKeysUtil.c b/usr/src/lib/pkcs11/pkcs11_softtoken/common/softKeysUtil.c index 42eff40de7..667a220451 100644 --- a/usr/src/lib/pkcs11/pkcs11_softtoken/common/softKeysUtil.c +++ b/usr/src/lib/pkcs11/pkcs11_softtoken/common/softKeysUtil.c @@ -946,8 +946,6 @@ common: return (rv); } - *phKey = secret_key->handle; - /* Validate the key type and key length */ rv = soft_key_derive_check_length(secret_key, hash_size); if (rv != CKR_OK) { @@ -1065,6 +1063,8 @@ common: soft_delete_token_object(secret_key, B_FALSE, B_FALSE); } + *phKey = secret_key->handle; + return (rv); } |