libssh
0.6.3
|
String manipulations used in libssh. More...
Functions | |
void | ssh_string_burn (struct ssh_string_struct *s) |
Destroy the data in a string so it couldn't appear in a core dump. More... | |
struct ssh_string_struct * | ssh_string_copy (struct ssh_string_struct *s) |
Copy a string, return a newly allocated string. More... | |
void * | ssh_string_data (struct ssh_string_struct *s) |
Get the payload of the string. More... | |
int | ssh_string_fill (struct ssh_string_struct *s, const void *data, size_t len) |
Fill a string with given data. More... | |
void | ssh_string_free (struct ssh_string_struct *s) |
Deallocate a SSH string object. More... | |
void | ssh_string_free_char (char *s) |
Deallocate a char string object. More... | |
struct ssh_string_struct * | ssh_string_from_char (const char *what) |
Create a ssh string using a C string. More... | |
const char * | ssh_string_get_char (struct ssh_string_struct *s) |
Get the the string as a C nul-terminated string. More... | |
size_t | ssh_string_len (struct ssh_string_struct *s) |
Return the size of a SSH string. More... | |
struct ssh_string_struct * | ssh_string_new (size_t size) |
Create a new SSH String object. More... | |
char * | ssh_string_to_char (struct ssh_string_struct *s) |
Convert a SSH string to a C nul-terminated string. More... | |
String manipulations used in libssh.
void ssh_string_burn | ( | struct ssh_string_struct * | s | ) |
Destroy the data in a string so it couldn't appear in a core dump.
[in] | s | The string to burn. |
References ssh_string_len().
Referenced by ssh_message_free(), and ssh_pki_export_privkey_file().
struct ssh_string_struct* ssh_string_copy | ( | struct ssh_string_struct * | s | ) |
Copy a string, return a newly allocated string.
The caller has to free the string.
[in] | s | String to copy. |
References ssh_string_len(), and ssh_string_new().
void* ssh_string_data | ( | struct ssh_string_struct * | s | ) |
Get the payload of the string.
s | The string to get the data from. |
Referenced by sftp_async_read(), sftp_read(), ssh_buffer_get_len(), ssh_channel_new(), ssh_get_pubkey_hash(), ssh_get_publickey_hash(), ssh_gssapi_get_creds(), ssh_message_free(), ssh_pki_export_privkey_file(), ssh_pki_export_pubkey_base64(), and ssh_pki_import_pubkey_base64().
int ssh_string_fill | ( | struct ssh_string_struct * | s, |
const void * | data, | ||
size_t | len | ||
) |
Fill a string with given data.
The string should be big enough.
s | An allocated string to fill with data. |
data | The data to fill the string with. |
len | Size of data. |
References ssh_string_len().
Referenced by sftp_write(), ssh_gssapi_get_creds(), ssh_message_free(), and ssh_pki_export_pubkey_base64().
void ssh_string_free | ( | struct ssh_string_struct * | s | ) |
Deallocate a SSH string object.
[in] | s | The SSH string to delete. |
Referenced by sftp_async_read(), sftp_attributes_free(), sftp_canonicalize_path(), sftp_close(), sftp_closedir(), sftp_extension_supported(), sftp_fstatvfs(), sftp_init(), sftp_mkdir(), sftp_open(), sftp_opendir(), sftp_read(), sftp_readlink(), sftp_rename(), sftp_rmdir(), sftp_setstat(), sftp_statvfs(), sftp_symlink(), sftp_unlink(), sftp_write(), ssh_channel_accept_x11(), ssh_channel_new(), ssh_channel_open_forward(), ssh_channel_open_reverse_forward(), ssh_channel_open_x11(), ssh_channel_request_env(), ssh_channel_request_exec(), ssh_channel_request_pty_size(), ssh_channel_request_send_exit_signal(), ssh_channel_request_send_signal(), ssh_channel_request_subsystem(), ssh_channel_request_x11(), ssh_channel_set_blocking(), ssh_disconnect(), ssh_forward_cancel(), ssh_forward_listen(), ssh_get_publickey_hash(), ssh_gssapi_get_creds(), ssh_handle_key_exchange(), ssh_message_auth_pubkey(), ssh_message_free(), ssh_pki_export_privkey_file(), ssh_pki_export_pubkey_base64(), ssh_pki_import_pubkey_base64(), ssh_send_debug(), ssh_send_ignore(), ssh_set_message_callback(), ssh_userauth_none(), ssh_userauth_password(), ssh_userauth_publickey(), and ssh_userauth_try_publickey().
void ssh_string_free_char | ( | char * | s | ) |
Deallocate a char string object.
[in] | s | The string to delete. |
Referenced by ssh_message_free(), and ssh_userauth_agent().
struct ssh_string_struct* ssh_string_from_char | ( | const char * | what | ) |
Create a ssh string using a C string.
[in] | what | The source 0-terminated C string. |
References ssh_string_new().
Referenced by sftp_canonicalize_path(), sftp_fstatvfs(), sftp_mkdir(), sftp_open(), sftp_opendir(), sftp_readlink(), sftp_rename(), sftp_rmdir(), sftp_setstat(), sftp_statvfs(), sftp_symlink(), sftp_unlink(), ssh_channel_accept_x11(), ssh_channel_new(), ssh_channel_open_forward(), ssh_channel_open_reverse_forward(), ssh_channel_open_x11(), ssh_channel_request_env(), ssh_channel_request_exec(), ssh_channel_request_pty_size(), ssh_channel_request_send_exit_signal(), ssh_channel_request_send_signal(), ssh_channel_request_subsystem(), ssh_channel_request_x11(), ssh_channel_set_blocking(), ssh_disconnect(), ssh_forward_cancel(), ssh_forward_listen(), ssh_gssapi_get_creds(), ssh_handle_key_exchange(), ssh_message_auth_pubkey(), ssh_message_free(), ssh_pki_export_pubkey_base64(), ssh_send_debug(), ssh_send_ignore(), ssh_set_message_callback(), ssh_userauth_none(), ssh_userauth_password(), ssh_userauth_publickey(), and ssh_userauth_try_publickey().
const char* ssh_string_get_char | ( | struct ssh_string_struct * | s | ) |
Get the the string as a C nul-terminated string.
This is only available as long as the SSH string exists.
[in] | s | The SSH string to get the C string from. |
References ssh_string_len().
Referenced by ssh_pki_export_privkey_file(), ssh_pki_export_pubkey_base64(), and ssh_pki_import_pubkey_base64().
size_t ssh_string_len | ( | struct ssh_string_struct * | s | ) |
Return the size of a SSH string.
[in] | s | The the input SSH string. |
Referenced by sftp_async_read(), sftp_read(), ssh_buffer_free(), ssh_channel_new(), ssh_get_pubkey_hash(), ssh_get_publickey_hash(), ssh_gssapi_get_creds(), ssh_message_free(), ssh_pki_export_privkey_file(), ssh_pki_export_pubkey_base64(), ssh_pki_import_pubkey_base64(), ssh_string_burn(), ssh_string_copy(), ssh_string_fill(), ssh_string_get_char(), and ssh_string_to_char().
struct ssh_string_struct* ssh_string_new | ( | size_t | size | ) |
Create a new SSH String object.
[in] | size | The size of the string. |
Referenced by sftp_write(), ssh_buffer_get_len(), ssh_gssapi_get_creds(), ssh_message_free(), ssh_pki_export_pubkey_base64(), ssh_string_copy(), and ssh_string_from_char().
char* ssh_string_to_char | ( | struct ssh_string_struct * | s | ) |
Convert a SSH string to a C nul-terminated string.
[in] | s | The SSH input string. |
References ssh_string_len().
Referenced by sftp_canonicalize_path(), sftp_extension_supported(), sftp_init(), sftp_opendir(), sftp_readlink(), ssh_channel_new(), ssh_get_issue_banner(), ssh_message_free(), and ssh_userauth_password().