geom_gate userland utility improvements
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

57 lines
2.2 KiB

  1. .TH libssh2_userauth_publickey_frommemory 3 "1 Sep 2014" "libssh2 1.5" "libssh2 manual"
  2. .SH NAME
  3. libssh2_userauth_publickey_frommemory - authenticate a session with a public key, read from memory
  4. .SH SYNOPSIS
  5. #include <libssh2.h>
  6. .nf
  7. int libssh2_userauth_publickey_frommemory(LIBSSH2_SESSION *session,
  8. const char *username,
  9. size_t username_len,
  10. const char *publickeydata,
  11. size_t publickeydata_len,
  12. const char *privatekeydata,
  13. size_t privatekeydata_len,
  14. const char *passphrase);
  15. .SH DESCRIPTION
  16. This function allows to authenticate a session with a public key read from memory.
  17. It's only supported when libssh2 is backed by OpenSSL.
  18. \fIsession\fP - Session instance as returned by
  19. .BR libssh2_session_init_ex(3)
  20. \fIusername\fP - Remote user name to authenticate as.
  21. \fIusername_len\fP - Length of username.
  22. \fIpublickeydata\fP - Buffer containing the contents of a public key file.
  23. \fIpublickeydata_len\fP - Length of public key data.
  24. \fIprivatekeydata\fP - Buffer containing the contents of a private key file.
  25. \fIprivatekeydata_len\fP - Length of private key data.
  26. \fIpassphrase\fP - Passphrase to use when decoding private key file.
  27. Attempt public key authentication using a PEM encoded private key file stored in memory.
  28. .SH RETURN VALUE
  29. Return 0 on success or negative on failure. It returns
  30. LIBSSH2_ERROR_EAGAIN when it would otherwise block. While
  31. LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se.
  32. .SH ERRORS
  33. \fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed.
  34. \fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
  35. \fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP -
  36. \fILIBSSH2_ERROR_PUBLICKEY_UNVERIFIED\fP - The username/public key
  37. combination was invalid.
  38. \fILIBSSH2_ERROR_AUTHENTICATION_FAILED\fP - Authentication using the supplied
  39. public key was not accepted.
  40. .SH AVAILABILITY
  41. libssh2_userauth_publickey_frommemory was added in libssh2 1.6.0
  42. .SH SEE ALSO
  43. .BR libssh2_session_init_ex(3)