Add proper error descriptions when object insertion fails.
Put a read-only transaction around retrieving the objects from the database.
Only additional checks should be specified, remove checks here that are already done by default for the given attribute class.
Remove objectId parameter from findAttribute use the _objectId field directly.
Also create/update attribute objects in the current DBObject as we will not be retrieving non-modifiable attributes when they already have been retrieved once.
Attributes CKA_VALUE_BITS and CKA_PRIME_BITS are unsigned long values not binary strings.
Introduce additional test with CKA_ID and CKA_SUBJECT attributes to test with binary strings.
Implement in-memory transactions inside DBObject for attributes that are non-mutable in the database.
Notes on building SoftHSMv2 on OS X 10.8.5