nm_iam_add_user_fingerprint()

DESCRIPTION

Add a public key fingerprint to an existing user while the system is running.

The fingerprint can be assigned a name to help identify which client device it belongs to. The name can be NULL.

DECLARATION

enum nm_iam_error nm_iam_add_user_fingerprint(struct nm_iam* iam, const char* username, const char* fingerprint, const char* name)

PARAMETERS

iam:
[in] IAM module to manipulate
username:
[in] the username of the user
fingerprint:
[in] hex encoded public key fingerprint
name:
[in] name to assign to the fingerprint

RETURNS

  • NM_IAM_ERROR_INVALID_FINGERPRINT: if the specified fingerprint is invalid.
  • NM_IAM_ERROR_NO_SUCH_USER: if the specified user does not exist.
  • NM_IAM_ERROR_INVALID_ARGUMENT: if the fingerprint length was not 64.
  • NM_IAM_ERROR_OK: if the fingerprint was set successfully for the user.