Libssh2 publickey list fetch

From Libssh2

int libssh2_publickey_list_fetch(LIBSSH2_PUBLICKEY *pkey,
                                 unsigned long *num_keys,
                                 libssh2_publickey_list **pkey_list);

About

Retreive the list of authorized public keys associated with the currently logged in user. When finished with the vector returned via pkey_list, the structure must be freed using a call to libssh2_publickey_list_free().

Parameters

  • pkey
    Publickey instance as returned by libssh2_publickey_init().
  • num_keys
    When passed, will be populated with the count of public keys in the pkey_list vector.
  • pkey_list
    Populated with a vector of num_keys instances of libssh2_publickey_list structures.

Returns

  • On Success: 0
  • On Failure: -1