populate = false;
/* Signifies that data is being loaded */
- loading = p11_index_in_batch (index);
+ loading = p11_index_loading (index);
/* Signifies that this is being created by a caller, instead of loaded */
creating = (attrs == NULL && !loading);
* Treat these operations as loading, not modifying/creating, so we get
* around many of the rules that govern object creation
*/
- p11_index_batch (index);
+ p11_index_load (index);
/* A certificate */
if (p11_attrs_match (attrs, match_cert)) {
}
void
-p11_index_batch (p11_index *index)
+p11_index_load (p11_index *index)
{
return_if_fail (index != NULL);
}
bool
-p11_index_in_batch (p11_index *index)
+p11_index_loading (p11_index *index)
{
return_val_if_fail (index != NULL, false);
return index->changes ? true : false;
int p11_index_size (p11_index *index);
-void p11_index_batch (p11_index *index);
+void p11_index_load (p11_index *index);
void p11_index_finish (p11_index *index);
-bool p11_index_in_batch (p11_index *index);
+bool p11_index_loading (p11_index *index);
CK_RV p11_index_take (p11_index *index,
CK_ATTRIBUTE *attrs,
CK_ATTRIBUTE *attrs;
CK_RV rv;
- p11_index_batch (test.index);
+ p11_index_load (test.index);
attrs = NULL;
rv = p11_builder_build (test.builder, test.index, &attrs, p11_attrs_dup (input));
* A trusted cetrificate, trusted for server and client purposes,
* and explicitly rejects the email and timestamping purposes.
*/
- p11_index_batch (test.index);
+ p11_index_load (test.index);
rv = p11_index_take (test.index, p11_attrs_dup (cacert3_trusted_certificate), NULL);
assert_num_eq (CKR_OK, rv);
rv = p11_index_take (test.index, p11_attrs_dup (eku_extension_server_and_client), NULL);
* A distrusted certificate with a value, plus some extra
* extensions (which should be ignored).
*/
- p11_index_batch (test.index);
+ p11_index_load (test.index);
rv = p11_index_take (test.index, p11_attrs_dup (distrust_cert), NULL);
assert_num_eq (CKR_OK, rv);
rv = p11_index_take (test.index, p11_attrs_dup (eku_extension), NULL);
/*
* A distrusted certificate without a value.
*/
- p11_index_batch (test.index);
+ p11_index_load (test.index);
rv = p11_index_take (test.index, p11_attrs_dup (distrust_cert), NULL);
assert_num_eq (CKR_OK, rv);
p11_index_finish (test.index);
* A trusted certificate, should create trutsed nss trust
* and anchor assertions
*/
- p11_index_batch (test.index);
+ p11_index_load (test.index);
rv = p11_index_take (test.index, p11_attrs_dup (trusted_cert), &handle1);
assert_num_eq (CKR_OK, rv);
p11_index_finish (test.index);
assert (handle != 0);
/* Now we add a distrusted certificate, should update the objects */
- p11_index_batch (test.index);
+ p11_index_load (test.index);
rv = p11_index_take (test.index, p11_attrs_dup (distrust_cert), &handle2);
assert_num_eq (CKR_OK, rv);
p11_index_finish (test.index);
CK_OBJECT_HANDLE handle;
CK_RV rv;
- p11_index_batch (test.index);
+ p11_index_load (test.index);
rv = p11_index_take (test.index, p11_attrs_dup (trusted_without_id), NULL);
assert_num_eq (CKR_OK, rv);
p11_index_finish (test.index);
CK_ATTRIBUTE *attrs;
CK_RV rv;
- p11_index_batch (test.index);
+ p11_index_load (test.index);
rv = p11_index_take (test.index, p11_attrs_dup (input), NULL);
assert_num_eq (CKR_OK, rv);
rv = p11_index_take (test.index, p11_attrs_dup (stapled_ds_and_np), NULL);
on_change_batching = true;
on_change_called = 0;
- p11_index_batch (index);
+ p11_index_load (index);
- assert (p11_index_in_batch (index));
+ assert (p11_index_loading (index));
rv = p11_index_add (index, original, 2, NULL);
assert (rv == CKR_OK);
assert_num_eq (0, on_change_called);
/* Nested batch is a noop */
- p11_index_batch (index);
+ p11_index_load (index);
rv = p11_index_remove (index, handle);
assert (rv == CKR_OK);
*/
p11_index_finish (index);
- assert (!p11_index_in_batch (index));
+ assert (!p11_index_loading (index));
/*
* Only three calls, because later operations on the
/* This is a noop */
p11_index_finish (index);
- assert (!p11_index_in_batch (index));
+ assert (!p11_index_loading (index));
p11_index_free (index);
}
on_change_called = 0;
- p11_index_batch (index);
+ p11_index_load (index);
rv = p11_index_add (index, original, 2, NULL);
assert (rv == CKR_OK);
p11_index_finish (index);
return_val_if_fail (parsed->elem[i] != NULL, 0);
}
- p11_index_batch (token->index);
+ p11_index_load (token->index);
/* Now place all of these in the index */
rv = p11_index_replace_all (token->index, origin, CKA_CLASS, parsed);
{ CKA_INVALID },
};
- p11_index_batch (token->index);
+ p11_index_load (token->index);
rv = p11_index_take (token->index, p11_attrs_dup (builtin_root_list), NULL);
return_val_if_fail (rv == CKR_OK, 0);
p11_index_finish (token->index);