summaryrefslogtreecommitdiff
path: root/daemon
diff options
context:
space:
mode:
Diffstat (limited to 'daemon')
-rw-r--r--daemon/pk/gkr-pk-cert.c2
-rw-r--r--daemon/pk/gkr-pk-import.c2
-rw-r--r--daemon/pk/gkr-pk-object.c2
-rw-r--r--daemon/pk/gkr-pk-privkey.c6
-rw-r--r--daemon/pk/gkr-pk-pubkey.c6
-rw-r--r--daemon/pk/gkr-pk-util.c2
6 files changed, 10 insertions, 10 deletions
diff --git a/daemon/pk/gkr-pk-cert.c b/daemon/pk/gkr-pk-cert.c
index cb2e8cfa..96bdc3db 100644
--- a/daemon/pk/gkr-pk-cert.c
+++ b/daemon/pk/gkr-pk-cert.c
@@ -719,7 +719,7 @@ gkr_pk_cert_create (GkrPkManager* manager, GArray* array,
return CKR_ATTRIBUTE_VALUE_INVALID;
/* All the attributes that we used up */
- gkr_pk_attributes_consume (array, CKA_CERTIFICATE_TYPE, CKA_VALUE, -1);
+ gkr_pk_attributes_consume (array, CKA_CERTIFICATE_TYPE, CKA_VALUE, G_MAXULONG);
*object = GKR_PK_OBJECT (gkr_pk_cert_new (manager, 0, asn));
return CKR_OK;
diff --git a/daemon/pk/gkr-pk-import.c b/daemon/pk/gkr-pk-import.c
index 128d96bc..e1882e5c 100644
--- a/daemon/pk/gkr-pk-import.c
+++ b/daemon/pk/gkr-pk-import.c
@@ -522,7 +522,7 @@ gkr_pk_import_create (GkrPkManager* manager, GkrPkSession *session,
/* All the attributes that we used up */
gkr_pk_attributes_consume (array, CKA_VALUE, CKA_GNOME_IMPORT_TOKEN,
- CKA_GNOME_IMPORT_LABEL, -1);
+ CKA_GNOME_IMPORT_LABEL, G_MAXULONG);
return CKR_OK;
}
diff --git a/daemon/pk/gkr-pk-object.c b/daemon/pk/gkr-pk-object.c
index 9cc33185..14e3c205 100644
--- a/daemon/pk/gkr-pk-object.c
+++ b/daemon/pk/gkr-pk-object.c
@@ -539,7 +539,7 @@ gkr_pk_object_create (GkrPkSession *session,
g_return_val_if_fail (*object != NULL, CKR_GENERAL_ERROR);
/* Mark these bits as used */
- gkr_pk_attributes_consume (attrs, CKA_CLASS, CKA_TOKEN, -1);
+ gkr_pk_attributes_consume (attrs, CKA_CLASS, CKA_TOKEN, G_MAXULONG);
/*
* Check that all the remaining attributes are either already
diff --git a/daemon/pk/gkr-pk-privkey.c b/daemon/pk/gkr-pk-privkey.c
index e616a2a2..379e6b20 100644
--- a/daemon/pk/gkr-pk-privkey.c
+++ b/daemon/pk/gkr-pk-privkey.c
@@ -200,7 +200,7 @@ create_rsa_private (GArray *attrs, gcry_sexp_t *skey)
gkr_pk_attributes_consume (attrs, CKA_MODULUS, CKA_PUBLIC_EXPONENT,
CKA_PRIVATE_EXPONENT, CKA_PRIME_1, CKA_PRIME_2,
- CKA_EXPONENT_1, CKA_EXPONENT_2, CKA_COEFFICIENT, -1);
+ CKA_EXPONENT_1, CKA_EXPONENT_2, CKA_COEFFICIENT, G_MAXULONG);
ret = CKR_OK;
done:
@@ -249,7 +249,7 @@ create_dsa_private (GArray *attrs, gcry_sexp_t *skey)
}
gkr_pk_attributes_consume (attrs, CKA_PRIME, CKA_SUBPRIME,
- CKA_BASE, CKA_VALUE, -1);
+ CKA_BASE, CKA_VALUE, G_MAXULONG);
ret = CKR_OK;
done:
@@ -642,7 +642,7 @@ gkr_pk_privkey_create (GkrPkManager* manager, GArray* array,
if (!gkr_pk_attributes_ulong (array, CKA_KEY_TYPE, &type))
return CKR_TEMPLATE_INCOMPLETE;
- gkr_pk_attributes_consume (array, CKA_KEY_TYPE, -1);
+ gkr_pk_attributes_consume (array, CKA_KEY_TYPE, G_MAXULONG);
switch (type) {
case CKK_RSA:
diff --git a/daemon/pk/gkr-pk-pubkey.c b/daemon/pk/gkr-pk-pubkey.c
index 9c0702e3..b712d96a 100644
--- a/daemon/pk/gkr-pk-pubkey.c
+++ b/daemon/pk/gkr-pk-pubkey.c
@@ -152,7 +152,7 @@ create_rsa_public (GArray *attrs, gcry_sexp_t *skey)
goto done;
}
- gkr_pk_attributes_consume (attrs, CKA_MODULUS, CKA_PUBLIC_EXPONENT, -1);
+ gkr_pk_attributes_consume (attrs, CKA_MODULUS, CKA_PUBLIC_EXPONENT, G_MAXULONG);
ret = CKR_OK;
done:
@@ -191,7 +191,7 @@ create_dsa_public (GArray *attrs, gcry_sexp_t *skey)
}
gkr_pk_attributes_consume (attrs, CKA_PRIME, CKA_SUBPRIME,
- CKA_BASE, CKA_VALUE, -1);
+ CKA_BASE, CKA_VALUE, G_MAXULONG);
ret = CKR_OK;
done:
@@ -549,7 +549,7 @@ gkr_pk_pubkey_create (GkrPkManager* manager, GArray* array,
if (!gkr_pk_attributes_ulong (array, CKA_KEY_TYPE, &type))
return CKR_TEMPLATE_INCOMPLETE;
- gkr_pk_attributes_consume (array, CKA_KEY_TYPE, -1);
+ gkr_pk_attributes_consume (array, CKA_KEY_TYPE, G_MAXULONG);
switch (type) {
case CKK_RSA:
diff --git a/daemon/pk/gkr-pk-util.c b/daemon/pk/gkr-pk-util.c
index b552a47a..7eb7d3ad 100644
--- a/daemon/pk/gkr-pk-util.c
+++ b/daemon/pk/gkr-pk-util.c
@@ -491,7 +491,7 @@ gkr_pk_attributes_consume (GArray *attrs, ...)
/* Convert the var args into an array */
types = g_array_new (FALSE, TRUE, sizeof (CK_ATTRIBUTE_TYPE));
va_start (va, attrs);
- while ((type = va_arg (va, CK_ATTRIBUTE_TYPE)) != (CK_ULONG)-1)
+ while ((type = va_arg (va, CK_ATTRIBUTE_TYPE)) != G_MAXULONG)
g_array_append_val (types, type);
va_end (va);