summaryrefslogtreecommitdiffstats
path: root/lib/ncrypto_nss.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ncrypto_nss.c')
-rw-r--r--lib/ncrypto_nss.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ncrypto_nss.c b/lib/ncrypto_nss.c
index b5bb753..d6ded4f 100644
--- a/lib/ncrypto_nss.c
+++ b/lib/ncrypto_nss.c
@@ -405,7 +405,7 @@ private_key_create (struct ncr_private_key **key, CK_KEY_TYPE type,
}
/* C_EncryptFinal is only available through this function. "Nice.". */
ss = PK11_DigestFinal (ctx, wrapped_item.data + wrapped_len,
- &wrapped_item.len, wrapped_len);
+ &wrapped_item.len, wrapped_item.len - wrapped_len);
PK11_DestroyContext (ctx, PR_TRUE);
if (ss != SECSuccess)
goto err_wrapped_item;