History log of /haiku/src/servers/keystore/Keyring.cpp
Revision Date Author Comments
# 32057ce9 31-Mar-2013 Michael Lotz <mmlr@mlotz.ch>

If a keyring is empty, store a no data flag instead of failing.

Any fully empty keyring (no keys and no applications) would fail to add
the empty flat buffer and thus prevent the whole keystore database from
being stored. This could easily happen when you used separate keyrings
but the master keyring was left unused for example.

Adding a flag that tells that there is no data allows us to distinguish
between a case where the stored data is missing due to a problem versus
an actually empty buffer.


# c5469c39 25-Jun-2012 Michael Lotz <mmlr@mlotz.ch>

Add missing check for unlocked state.


# a82011ff 25-Jun-2012 Michael Lotz <mmlr@mlotz.ch>

Introduce keyring unlock key concept.

* Rename fKeyMessage to fUnlockKey and the KeyMessage() getter to
UnlockKey().
* Keep track of whether the keyring has an unlock key set.
* Store and restore that info separately.
* En- and decryption will depend on unlock key presence later.
* Add functions to set and remove an unlock key and query for it.


# bec02d0c 25-Jun-2012 Michael Lotz <mmlr@mlotz.ch>

Store each keyring in a message under a common keyrings field.

* Each keyring is now stored in a proper message which allows it to
contain additional meta data along side the flat data.
* Adding all keyring messages under a common field also allows to add
meta data to the keystore, as the keyrings don't use up random field
names anymore.
* Treat the master keyring as any other keyring and just add it to the
list. This allows to write/read the keystore database without special
casing the master keyring.


# d4d6d123 25-Jun-2012 Michael Lotz <mmlr@mlotz.ch>

Don't require a key when creating a new keyring.

There will be key setting/removal functions so the step of adding the
keyring and setting a key on it can be done individually.


# c8ae843f 24-Jun-2012 Michael Lotz <mmlr@mlotz.ch>

Rename keyring "access/revoke" to "unlock/lock".

The unlock/lock concept just seems easier to grasp and is used in
various similar tools as well.


# 67a46444 07-Feb-2012 Michael Lotz <mmlr@mlotz.ch>

Allow for all entries of an application to be removed.


# 0778e147 07-Feb-2012 Michael Lotz <mmlr@mlotz.ch>

Add application iteration method.


# d389650a 07-Feb-2012 Michael Lotz <mmlr@mlotz.ch>

Add application info handling into the Keyring class.


# 6ef5917d 07-Feb-2012 Michael Lotz <mmlr@mlotz.ch>

Only write and encrypt the flat buffer when modified.


# 1b3bb46a 07-Feb-2012 Michael Lotz <mmlr@mlotz.ch>

Restructure how keyrings are stored/restored.

* Pass them through a flat buffer that can later be encrypted and
decrypted in a central place.
* Remove the data argument from the constructor as keyrings are
now reading their data on their own.
* Prepare for additional application info storage in the keyring.


# 1dd765c9 07-Jan-2012 Michael Lotz <mmlr@mlotz.ch>

Store the key message from access/creation.

* Allow creating a Keyring with a key message.
* Store the key message when accessing.
* Add a few missing consts.


# ac9b28f0 06-Jan-2012 Michael Lotz <mmlr@mlotz.ch>

Implement basic keyring access logic and key request dialog.

* The keyring needs to be made accessible before allowing any
operation.
* Before executing commands the keyring is made accessible if
possible (the command is aborted as needed).
* Accessing a keyring opens up a preliminary key request dialog.
* If the default keyring is accessible and a keyring key for the
requested keyring is found, that key will be used to automatically
make the requested keyring accessible.


# 95eee1a3 04-Jan-2012 Michael Lotz <mmlr@mlotz.ch>

Make the keystore_server keyring aware.

* Move the *Key() functions into a Keyring class.
* Retrieve and select the right keyring for various commands.
* Implement adding/removing/enumerating keyrings.
* Rework the keystore database read/write to work with keyrings.
* Sync BKeyStore::IsKeyringAccessible() with the changed message.
* Remove leftover template code from registrar.


# 32057ce92279831f060782646fa67ea7161019f9 31-Mar-2013 Michael Lotz <mmlr@mlotz.ch>

If a keyring is empty, store a no data flag instead of failing.

Any fully empty keyring (no keys and no applications) would fail to add
the empty flat buffer and thus prevent the whole keystore database from
being stored. This could easily happen when you used separate keyrings
but the master keyring was left unused for example.

Adding a flag that tells that there is no data allows us to distinguish
between a case where the stored data is missing due to a problem versus
an actually empty buffer.


# c5469c39398f17b4e96ff71702788e0cfc72c0ec 25-Jun-2012 Michael Lotz <mmlr@mlotz.ch>

Add missing check for unlocked state.


# a82011ff964f4e27f38d0d8ebbc1e04fdf9db22e 25-Jun-2012 Michael Lotz <mmlr@mlotz.ch>

Introduce keyring unlock key concept.

* Rename fKeyMessage to fUnlockKey and the KeyMessage() getter to
UnlockKey().
* Keep track of whether the keyring has an unlock key set.
* Store and restore that info separately.
* En- and decryption will depend on unlock key presence later.
* Add functions to set and remove an unlock key and query for it.


# bec02d0c2f483a804eb0b833d099b85b3660cdb0 25-Jun-2012 Michael Lotz <mmlr@mlotz.ch>

Store each keyring in a message under a common keyrings field.

* Each keyring is now stored in a proper message which allows it to
contain additional meta data along side the flat data.
* Adding all keyring messages under a common field also allows to add
meta data to the keystore, as the keyrings don't use up random field
names anymore.
* Treat the master keyring as any other keyring and just add it to the
list. This allows to write/read the keystore database without special
casing the master keyring.


# d4d6d1239322eeb4c100489eb76ed63afde449d6 25-Jun-2012 Michael Lotz <mmlr@mlotz.ch>

Don't require a key when creating a new keyring.

There will be key setting/removal functions so the step of adding the
keyring and setting a key on it can be done individually.


# c8ae843f3dcba6c16eda5d2b5db1f981ee69f448 24-Jun-2012 Michael Lotz <mmlr@mlotz.ch>

Rename keyring "access/revoke" to "unlock/lock".

The unlock/lock concept just seems easier to grasp and is used in
various similar tools as well.


# 67a46444549127d31e83e0c29351e564e4b70b16 07-Feb-2012 Michael Lotz <mmlr@mlotz.ch>

Allow for all entries of an application to be removed.


# 0778e1477dc3080ab2f40cb8159324eb88696779 07-Feb-2012 Michael Lotz <mmlr@mlotz.ch>

Add application iteration method.


# d389650a7af43f0b9930fd1257362e4ecd2d5a43 07-Feb-2012 Michael Lotz <mmlr@mlotz.ch>

Add application info handling into the Keyring class.


# 6ef5917d45654e4c72c75cee9cbfe8bce54ad027 07-Feb-2012 Michael Lotz <mmlr@mlotz.ch>

Only write and encrypt the flat buffer when modified.


# 1b3bb46aed33bd68bf5e4dba1625ad3211b31adc 07-Feb-2012 Michael Lotz <mmlr@mlotz.ch>

Restructure how keyrings are stored/restored.

* Pass them through a flat buffer that can later be encrypted and
decrypted in a central place.
* Remove the data argument from the constructor as keyrings are
now reading their data on their own.
* Prepare for additional application info storage in the keyring.


# 1dd765c92c41aeebcc877371e90a795ed4a78703 07-Jan-2012 Michael Lotz <mmlr@mlotz.ch>

Store the key message from access/creation.

* Allow creating a Keyring with a key message.
* Store the key message when accessing.
* Add a few missing consts.


# ac9b28f058fe4671b5034f6a3ed3f85091f53c5f 06-Jan-2012 Michael Lotz <mmlr@mlotz.ch>

Implement basic keyring access logic and key request dialog.

* The keyring needs to be made accessible before allowing any
operation.
* Before executing commands the keyring is made accessible if
possible (the command is aborted as needed).
* Accessing a keyring opens up a preliminary key request dialog.
* If the default keyring is accessible and a keyring key for the
requested keyring is found, that key will be used to automatically
make the requested keyring accessible.


# 95eee1a36302940cff0bcf81d943b9d59c60bac2 04-Jan-2012 Michael Lotz <mmlr@mlotz.ch>

Make the keystore_server keyring aware.

* Move the *Key() functions into a Keyring class.
* Retrieve and select the right keyring for various commands.
* Implement adding/removing/enumerating keyrings.
* Rework the keystore database read/write to work with keyrings.
* Sync BKeyStore::IsKeyringAccessible() with the changed message.
* Remove leftover template code from registrar.