Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
virtual P6R::P6ERR P6R::p6IKeystoreInit::openSigned ( const P6WCHAR pPath,
const P6WCHAR pKeystoreName 
)
pure virtual

Allows the caller access to the contents of a keystore.

If the keystore is not found then a new empty store is created.

All keystores are protected by a digital signature (see initialize() method above). If there is a problem with this signature either an eSignatureMismatch or eSignatureMismatch error will be returned and this open() method will fail. To recover access to the potentially damaged keystore the P6KEYSTORE_RECOVERBADSIG flag must be set in the initialize() method above. Note, this should only be done with care, since the keystore may have been tampered with or corrupted.

A keystore can be placed in a specific location on disk (see 'pPath' parameter of initialize()) or it can be created in a default location, which is P6R's database directory (typically ".../<p6r install directory>/data/db/"). If the caller uses a keystore name that collides with an existing keystore in the same directory, then an error of eSignatureMismatch or eSignatureMismatch will be returned, since the collision will look like an invalid signature error. Such an error is serious and the caller must determine its cause: either a database name collision when creating a new keystore or a true signature problem.

Parameters
pPath[ in ] File path where to create and access keystore databases. If NULL, then the keystore location will default to the P6R database directory.
pKeystoreName[ in ] A unique name for a database to store the keystore
Returns
SuccessP6R::eOk 
FailureP6R::eInvalidArgIf pPathName is NULL.
P6R::eNotInitializedA successful call to initialize was not made before this call.
P6R::eLockedMust call close() before calling open() again.
P6R::eSignatureMismatchThe signature protecting the keystore or the data saved in the keystore has been modified.
P6R::eSignatureMissingThe Signature protecting the keystore is missing.