mirror of
https://github.com/libssh2/libssh2.git
synced 2026-10-24 03:48:58 +03:00
tidy-up: comments
Fix typos/wording/consistency. Some spotted by Github Code Quality. Closes #2084
This commit is contained in:
@@ -155,7 +155,7 @@ static int hostkey_method_ssh_rsa_initPEM(LIBSSH2_SESSION *session,
|
||||
}
|
||||
|
||||
/*
|
||||
* Load a Private Key from a memory
|
||||
* Load a Private Key from memory
|
||||
*/
|
||||
static int hostkey_method_ssh_rsa_initPEMFromMemory(
|
||||
LIBSSH2_SESSION *session,
|
||||
@@ -1103,8 +1103,6 @@ static int hostkey_method_ssh_ed25519_init(LIBSSH2_SESSION *session,
|
||||
}
|
||||
|
||||
/*
|
||||
* hostkey_method_ssh_ed25519_cert_init
|
||||
*
|
||||
* Initialize the server hostkey cert
|
||||
*/
|
||||
static int hostkey_method_ssh_ed25519_cert_init(
|
||||
@@ -1146,7 +1144,7 @@ static int hostkey_method_ssh_ed25519_cert_init(
|
||||
return -1;
|
||||
|
||||
/*
|
||||
* we can't check for eob here because certs
|
||||
* we cannot check for eob here because certs
|
||||
* have more meta data we don't read
|
||||
*/
|
||||
|
||||
|
||||
@@ -42,15 +42,15 @@
|
||||
|
||||
struct known_host {
|
||||
struct list_node node;
|
||||
char *name; /* points to the name or the hash (allocated) */
|
||||
size_t name_len; /* needed for hashed data */
|
||||
int port; /* if non-zero, a specific port this key is for on this
|
||||
host */
|
||||
int typemask; /* plain, sha1, custom, ... */
|
||||
char *salt; /* points to binary salt (allocated) */
|
||||
size_t salt_len; /* size of salt */
|
||||
char *key; /* the (allocated) associated key. This is kept base64
|
||||
encoded in memory. */
|
||||
char *name; /* points to the name or the hash (allocated) */
|
||||
size_t name_len; /* needed for hashed data */
|
||||
int port; /* if non-zero, a specific port this key is for on
|
||||
this host */
|
||||
int typemask; /* plain, sha1, custom, ... */
|
||||
char *salt; /* points to binary salt (allocated) */
|
||||
size_t salt_len; /* size of salt */
|
||||
char *key; /* the (allocated) associated key. This is kept base64
|
||||
encoded in memory. */
|
||||
char *key_type_name; /* the (allocated) key type name */
|
||||
size_t key_type_len; /* size of key_type_name */
|
||||
char *comment; /* the (allocated) optional comment text, may be
|
||||
|
||||
@@ -470,10 +470,8 @@ int ssh2_rsa_new_private_frommemory(ssh2_rsa_ctx **rsa,
|
||||
|
||||
mbedtls_rsa_init(*rsa);
|
||||
|
||||
/*
|
||||
mbedtls checks in "mbedtls/pkparse.c:1184" if "key[keylen - 1] != '\0'"
|
||||
private-key from memory fails if the last byte is not a null byte
|
||||
*/
|
||||
/* mbedtls checks in "mbedtls/pkparse.c:1184" if "key[keylen - 1] != '\0'"
|
||||
private-key from memory fails if the last byte is not a null byte */
|
||||
filedata_nullterm = mbedtls_calloc(filedata_len + 1, 1);
|
||||
if(!filedata_nullterm) {
|
||||
return -1;
|
||||
@@ -761,10 +759,8 @@ int ssh2_pub_priv_keyfilememory(LIBSSH2_SESSION *session,
|
||||
void *privatekeydata_nullterm;
|
||||
size_t pwd_len;
|
||||
|
||||
/*
|
||||
mbedtls checks in "mbedtls/pkparse.c:1184" if "key[keylen - 1] != '\0'"
|
||||
private-key from memory fails if the last byte is not a null byte
|
||||
*/
|
||||
/* mbedtls checks in "mbedtls/pkparse.c:1184" if "key[keylen - 1] != '\0'"
|
||||
private-key from memory fails if the last byte is not a null byte */
|
||||
privatekeydata_nullterm = mbedtls_calloc(privatekeydata_len + 1, 1);
|
||||
if(!privatekeydata_nullterm) {
|
||||
return -1;
|
||||
|
||||
@@ -1522,7 +1522,7 @@ static ssize_t sftp_read(LIBSSH2_SFTP_HANDLE *handle,
|
||||
sizeof(struct sftp_pipeline_chunk));
|
||||
if(!chunk)
|
||||
return ssh2_err(session, LIBSSH2_ERROR_ALLOC,
|
||||
"malloc fail for FXP_WRITE");
|
||||
"malloc fail for FXP_READ");
|
||||
|
||||
chunk->offset = filep->offset_sent;
|
||||
chunk->len = size;
|
||||
@@ -3201,7 +3201,7 @@ static int sftp_fstatvfs(LIBSSH2_SFTP_HANDLE *handle, LIBSSH2_SFTP_STATVFS *st)
|
||||
SSH2_FREE(session, data);
|
||||
}
|
||||
return ssh2_err(session, LIBSSH2_ERROR_SFTP_PROTOCOL,
|
||||
"SFTP rename packet too short");
|
||||
"SFTP fstatvfs packet too short");
|
||||
}
|
||||
else if(rc) {
|
||||
sftp->fstatvfs_state = ssh2_NB_state_idle;
|
||||
|
||||
@@ -205,8 +205,8 @@ $ write pt "=prompt OpenVMS 8.3 or later is not installed on your system."
|
||||
$ write pt "This product requires OpenVMS 8.3 or later to function."
|
||||
$ write pt ""
|
||||
$ write pt "1 NEED_SSL"
|
||||
$ write pt "=prompt HP SSL 1.3 or later is not installed on your system."
|
||||
$ write pt "This product requires HP SSL 1.3 or later to function."
|
||||
$ write pt "=prompt HP OpenSSL 1.3 or later is not installed on your system."
|
||||
$ write pt "This product requires HP OpenSSL 1.3 or later to function."
|
||||
$ write pt ""
|
||||
$ write pt "1 RELEASE_NOTES"
|
||||
$ write pt "=prompt Release notes and the libssh2 help library are available in [gnv.usr.share.doc.libssh2] directory."
|
||||
|
||||
Reference in New Issue
Block a user