gnome-keyring r1516 - in trunk: . pkcs11/gck
- From: nnielsen svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-keyring r1516 - in trunk: . pkcs11/gck
- Date: Sat, 7 Feb 2009 23:23:35 +0000 (UTC)
Author: nnielsen
Date: Sat Feb 7 23:23:35 2009
New Revision: 1516
URL: http://svn.gnome.org/viewvc/gnome-keyring?rev=1516&view=rev
Log:
Return -1 when an attribute buffer was provided but too small.
Correct according to PKCS#11.
Modified:
trunk/ChangeLog
trunk/pkcs11/gck/gck-attributes.c
Modified: trunk/pkcs11/gck/gck-attributes.c
==============================================================================
--- trunk/pkcs11/gck/gck-attributes.c (original)
+++ trunk/pkcs11/gck/gck-attributes.c Sat Feb 7 23:23:35 2009
@@ -83,7 +83,10 @@
CK_RV
gck_attribute_set_data (CK_ATTRIBUTE_PTR attr, gconstpointer value, gsize n_value)
{
- return gck_util_return_data (attr->pValue, &(attr->ulValueLen), value, n_value);
+ CK_RV rv = gck_util_return_data (attr->pValue, &(attr->ulValueLen), value, n_value);
+ if (rv == CKR_BUFFER_TOO_SMALL)
+ attr->ulValueLen = (CK_ULONG)-1;
+ return rv;
}
CK_RV
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]