Functions | |
| DBusKeyring * | _dbus_keyring_ref (DBusKeyring *keyring) |
| Increments reference count of the keyring. | |
| void | _dbus_keyring_unref (DBusKeyring *keyring) |
| Decrements refcount and finalizes if it reaches zero. | |
| DBusKeyring * | _dbus_keyring_new_homedir (const DBusString *username, const DBusString *context, DBusError *error) |
| Creates a new keyring that lives in the ~/.dbus-keyrings directory of the given user. | |
| dbus_bool_t | _dbus_keyring_validate_context (const DBusString *context) |
| Checks whether the context is a valid context. | |
| int | _dbus_keyring_get_best_key (DBusKeyring *keyring, DBusError *error) |
| Gets a recent key to use for authentication. | |
| dbus_bool_t | _dbus_keyring_is_for_user (DBusKeyring *keyring, const DBusString *username) |
| Checks whether the keyring is for the given username. | |
| dbus_bool_t | _dbus_keyring_get_hex_key (DBusKeyring *keyring, int key_id, DBusString *hex_key) |
| Gets the hex-encoded secret key for the given ID. | |
The secret keys are not kept in locked memory, and are written to a file in the user's homedir. However they are transient (only used by a single server instance for a fixed period of time, then discarded). Also, the keys are not sent over the wire.
| int _dbus_keyring_get_best_key | ( | DBusKeyring * | keyring, | |
| DBusError * | error | |||
| ) |
Gets a recent key to use for authentication.
If no recent key exists, creates one. Returns the key ID. If a key can't be written to the keyring file so no recent key can be created, returns -1. All valid keys are > 0.
| keyring | the keyring | |
| error | error on failure |
Definition at line 971 of file dbus-keyring.c.
| dbus_bool_t _dbus_keyring_get_hex_key | ( | DBusKeyring * | keyring, | |
| int | key_id, | |||
| DBusString * | hex_key | |||
| ) |
Gets the hex-encoded secret key for the given ID.
Returns FALSE if not enough memory. Returns TRUE but empty key on any other error such as unknown key ID.
| keyring | the keyring | |
| key_id | the key ID | |
| hex_key | string to append hex-encoded key to |
Definition at line 1029 of file dbus-keyring.c.
| dbus_bool_t _dbus_keyring_is_for_user | ( | DBusKeyring * | keyring, | |
| const DBusString * | username | |||
| ) |
Checks whether the keyring is for the given username.
| keyring | the keyring | |
| username | the username to check |
Definition at line 1010 of file dbus-keyring.c.
| DBusKeyring* _dbus_keyring_new_homedir | ( | const DBusString * | username, | |
| const DBusString * | context, | |||
| DBusError * | error | |||
| ) |
Creates a new keyring that lives in the ~/.dbus-keyrings directory of the given user.
If the username is NULL, uses the user owning the current process.
| username | username to get keyring for, or NULL | |
| context | which keyring to get | |
| error | return location for errors |
Definition at line 715 of file dbus-keyring.c.
| DBusKeyring* _dbus_keyring_ref | ( | DBusKeyring * | keyring | ) |
Increments reference count of the keyring.
| keyring | the keyring |
Definition at line 675 of file dbus-keyring.c.
| void _dbus_keyring_unref | ( | DBusKeyring * | keyring | ) |
Decrements refcount and finalizes if it reaches zero.
| keyring | the keyring |
Definition at line 689 of file dbus-keyring.c.
Referenced by _dbus_auth_unref(), and _dbus_keyring_new_homedir().
| dbus_bool_t _dbus_keyring_validate_context | ( | const DBusString * | context | ) |
Checks whether the context is a valid context.
Contexts that might cause confusion when used in filenames are not allowed (contexts can't start with a dot or contain dir separators).
| context | the context |
Definition at line 875 of file dbus-keyring.c.
Referenced by _dbus_keyring_new_homedir().
1.5.3