mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-07 02:39:48 +09:00
Fix various spelling issues reported by codespell
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
This commit is contained in:
@@ -7,7 +7,7 @@ echo "Cipher : $CIPHER ; Destination : $DEST (`ssh $DEST uname -a`)"
|
||||
echo "Local ssh version: `ssh -V 2>&1`"
|
||||
echo "Ping latency to $DEST":
|
||||
ping -q -c 1 -n $DEST
|
||||
echo "Destination $DEST SSHD vesion : `echo | nc $DEST 22 | head -n1`"
|
||||
echo "Destination $DEST SSHD version : `echo | nc $DEST 22 | head -n1`"
|
||||
echo "ssh login latency :`(time -f user:%U ssh $DEST 'id > /dev/null') 2>&1`"
|
||||
./generate.py | dd bs=4096 count=100000 | time ssh -c $CIPHER $DEST "dd bs=4096 of=/dev/null" 2>&1
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ echo "Cipher : $CIPHER ; Destination : $DEST (`ssh $DEST uname -a`)"
|
||||
echo "Local ssh version: `samplessh -V 2>&1`"
|
||||
echo "Ping latency to $DEST":
|
||||
ping -q -c 1 -n $DEST
|
||||
echo "Destination $DEST SSHD vesion : `echo | nc $DEST 22 | head -n1`"
|
||||
echo "Destination $DEST SSHD version : `echo | nc $DEST 22 | head -n1`"
|
||||
echo "ssh login latency :`(time -f user:%U samplessh $DEST 'id > /dev/null') 2>&1`"
|
||||
./generate.py | dd bs=4096 count=100000 | strace samplessh -c $CIPHER $DEST "dd bs=4096 of=/dev/null" 2>&1
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@ static void torture_client_config_system(void **state)
|
||||
* configuration files retains OpenSSH semantics (the per-user overrides
|
||||
* the system-wide values).
|
||||
* The function ssh_options_parse_config() has hardcoded path to the
|
||||
* system-wide configuraion file so we try to emmulate the behavior by parsing
|
||||
* system-wide configuration file so we try to emulate the behavior by parsing
|
||||
* the files separately in the same order.
|
||||
*/
|
||||
static void torture_client_config_emulate(void **state)
|
||||
|
||||
@@ -189,7 +189,7 @@ static void torture_connect_uninitialized(UNUSED_PARAM(void **state))
|
||||
ssh_session session;
|
||||
struct passwd *pwd;
|
||||
|
||||
/* Make sure the library is unitialized */
|
||||
/* Make sure the library is uninitialized */
|
||||
while (is_ssh_initialized()) {
|
||||
rc = ssh_finalize();
|
||||
assert_return_code(rc, errno);
|
||||
|
||||
@@ -172,7 +172,7 @@ static void torture_rekey_send(void **state)
|
||||
bytes / c->in_cipher->blocksize);
|
||||
assert_int_equal(c->out_cipher->max_blocks,
|
||||
bytes / c->out_cipher->blocksize);
|
||||
/* We should have less encrypted packets than transfered (first are not encrypted) */
|
||||
/* We should have less encrypted packets than transferred (first are not encrypted) */
|
||||
assert_true(c->out_cipher->packets < s->ssh.session->send_seq);
|
||||
assert_true(c->in_cipher->packets < s->ssh.session->recv_seq);
|
||||
/* Copy the initial secret hash = session_id so we know we changed keys later */
|
||||
@@ -276,7 +276,7 @@ static void torture_rekey_recv(void **state)
|
||||
c = s->ssh.session->current_crypto;
|
||||
assert_int_equal(c->in_cipher->max_blocks, bytes / c->in_cipher->blocksize);
|
||||
assert_int_equal(c->out_cipher->max_blocks, bytes / c->out_cipher->blocksize);
|
||||
/* We should have less encrypted packets than transfered (first are not encrypted) */
|
||||
/* We should have less encrypted packets than transferred (first are not encrypted) */
|
||||
assert_true(c->out_cipher->packets < s->ssh.session->send_seq);
|
||||
assert_true(c->in_cipher->packets < s->ssh.session->recv_seq);
|
||||
/* Copy the initial secret hash = session_id so we know we changed keys later */
|
||||
@@ -471,7 +471,7 @@ static void torture_rekey_different_kex(void **state)
|
||||
bytes / c->in_cipher->blocksize);
|
||||
assert_int_equal(c->out_cipher->max_blocks,
|
||||
bytes / c->out_cipher->blocksize);
|
||||
/* We should have less encrypted packets than transfered (first are not encrypted) */
|
||||
/* We should have less encrypted packets than transferred (first are not encrypted) */
|
||||
assert_true(c->out_cipher->packets < s->ssh.session->send_seq);
|
||||
assert_true(c->in_cipher->packets < s->ssh.session->recv_seq);
|
||||
/* Copy the initial secret hash = session_id so we know we changed keys later */
|
||||
@@ -497,7 +497,7 @@ static void torture_rekey_different_kex(void **state)
|
||||
rc = ssh_options_set(s->ssh.session, SSH_OPTIONS_KEY_EXCHANGE, kex2);
|
||||
assert_ssh_return_code(s->ssh.session, rc);
|
||||
|
||||
/* send ignore packets of up to 1KB to trigger rekey. Send litle bit more
|
||||
/* send ignore packets of up to 1KB to trigger rekey. Send little bit more
|
||||
* to make sure the rekey it completes with all different ciphers (paddings */
|
||||
memset(data, 0, sizeof(data));
|
||||
memset(data, 'A', 128);
|
||||
@@ -575,7 +575,7 @@ static void torture_rekey_server_different_kex(void **state)
|
||||
rc = ssh_options_set(s->ssh.session, SSH_OPTIONS_KEY_EXCHANGE, kex2);
|
||||
assert_ssh_return_code(s->ssh.session, rc);
|
||||
|
||||
/* send ignore packets of up to 1KB to trigger rekey. Send litle bit more
|
||||
/* send ignore packets of up to 1KB to trigger rekey. Send little bit more
|
||||
* to make sure the rekey it completes with all different ciphers (paddings */
|
||||
memset(data, 0, sizeof(data));
|
||||
memset(data, 'A', 128);
|
||||
|
||||
@@ -17,16 +17,16 @@ set(CTEST_BUILD_OPTIONS "-DUNIT_TESTING=ON -WITH_SFTP=ON -DWITH_SERVER=ON -DWITH
|
||||
|
||||
#set(CTEST_CUSTOM_MEMCHECK_IGNORE torture_rand)
|
||||
|
||||
## The Model to set: Nightly, Continous, Experimental
|
||||
## The Model to set: Nightly, Continuous, Experimental
|
||||
set(CTEST_MODEL "Experimental")
|
||||
|
||||
## The branch
|
||||
#set(CTEST_GIT_BRANCH "--branch v0-5")
|
||||
|
||||
## Wether to enable memory checking.
|
||||
## Whether to enable memory checking.
|
||||
set(WITH_MEMCHECK FALSE)
|
||||
|
||||
## Wether to enable code coverage.
|
||||
## Whether to enable code coverage.
|
||||
set(WITH_COVERAGE FALSE)
|
||||
|
||||
#######################################################################
|
||||
|
||||
@@ -95,7 +95,7 @@ You can either pick up my branch or workaround them locally:
|
||||
### Reproduce locally
|
||||
|
||||
Clone the above repository from https://github.com/google/oss-fuzz/, apply
|
||||
changes from previous secion if needed, setup local clone of libssh repository
|
||||
changes from previous section if needed, setup local clone of libssh repository
|
||||
and build the fuzzers locally (where `~/devel/libssh` is path to local libssh
|
||||
checkout):
|
||||
|
||||
@@ -111,7 +111,7 @@ This should give you the same error/leak/crash as you see on the testcase
|
||||
detail in oss-fuzz.com.
|
||||
|
||||
I find it very useful to run libssh in debug mode, to see what happened and
|
||||
what exit path was taken to get to the error. Fortunatelly, we can simply
|
||||
what exit path was taken to get to the error. Fortunately, we can simply
|
||||
pass environment variables to the container:
|
||||
|
||||
python infra/helper.py reproduce -eLIBSSH_VERBOSITY=9 libssh ssh_client_fuzzer ~/Downloads/clusterfuzz-testcase-ssh_client_fuzzer-4637376441483264
|
||||
|
||||
@@ -74,7 +74,7 @@ eval echo "$cmd"
|
||||
out=$(eval $cmd)
|
||||
ret=$?
|
||||
if [ $ret -ne 0 ]; then
|
||||
echo "Loging failed"
|
||||
echo "Logging in failed"
|
||||
echo "$out"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -110,7 +110,7 @@ int auth_pubkey_cb(UNUSED_PARAM(ssh_session session),
|
||||
}
|
||||
|
||||
/* TODO */
|
||||
/* Check wheter the user and public key are in authorized keys list */
|
||||
/* Check whether the user and public key are in authorized keys list */
|
||||
|
||||
/* Authenticated */
|
||||
printf("Authenticated\n");
|
||||
|
||||
@@ -97,8 +97,8 @@ static void cleanup_pcap(struct session_data_st *sdata)
|
||||
}
|
||||
|
||||
/* Do not free the pcap data context here since its ownership was
|
||||
* transfered to the session object, which will take care of its cleanup.
|
||||
* Morover it is still in use so we can very simply crash by freeing
|
||||
* transferred to the session object, which will take care of its cleanup.
|
||||
* Moreover it is still in use so we can very simply crash by freeing
|
||||
* it here.
|
||||
*/
|
||||
sdata->pcap = NULL;
|
||||
@@ -161,7 +161,7 @@ static int authenticate_kbdint(ssh_session session,
|
||||
initial_prompt[0] = "username: ";
|
||||
initial_prompt[1] = "password: ";
|
||||
|
||||
/* Prompt for aditional prompts */
|
||||
/* Prompt for additional prompts */
|
||||
retype_prompt[0] = "retype password: ";
|
||||
|
||||
if ((session == NULL) || (message == NULL) || (sdata == NULL)) {
|
||||
|
||||
@@ -176,7 +176,7 @@ extern LIBSSH_THREAD int ssh_log_level;
|
||||
"Host time4\n" \
|
||||
"\tRekeyLimit default 9600\n"
|
||||
|
||||
/* Multiple IdentityFile settings all are aplied */
|
||||
/* Multiple IdentityFile settings all are applied */
|
||||
#define LIBSSH_TESTCONFIG_STRING13 \
|
||||
"IdentityFile id_rsa_one\n" \
|
||||
"IdentityFile id_ecdsa_two\n"
|
||||
@@ -974,13 +974,13 @@ static void torture_config_proxyjump(void **state,
|
||||
_parse_config(session, file, string, SSH_OK);
|
||||
assert_true(session->opts.ProxyCommand == NULL);
|
||||
|
||||
/* If also ProxyCommand is specifed, the first is applied */
|
||||
/* If also ProxyCommand is specified, the first is applied */
|
||||
torture_reset_config(session);
|
||||
ssh_options_set(session, SSH_OPTIONS_HOST, "only-command");
|
||||
_parse_config(session, file, string, SSH_OK);
|
||||
assert_string_equal(session->opts.ProxyCommand, PROXYCMD);
|
||||
|
||||
/* If also ProxyCommand is specifed, the first is applied */
|
||||
/* If also ProxyCommand is specified, the first is applied */
|
||||
torture_reset_config(session);
|
||||
ssh_options_set(session, SSH_OPTIONS_HOST, "only-jump");
|
||||
_parse_config(session, file, string, SSH_OK);
|
||||
@@ -1381,7 +1381,7 @@ static void torture_config_nonewlineoneline_string(void **state)
|
||||
|
||||
/* ssh_config_get_cmd() does three things:
|
||||
* * Strips leading whitespace
|
||||
* * Terminate the characted on the end of next quotes-enclosed string
|
||||
* * Terminate the character on the end of next quotes-enclosed string
|
||||
* * Terminate on the end of line
|
||||
*/
|
||||
static void torture_config_parser_get_cmd(void **state)
|
||||
|
||||
@@ -430,7 +430,7 @@ static void torture_knownhosts_get_algorithms_names(void **state)
|
||||
}
|
||||
|
||||
#ifndef HAVE_DSA
|
||||
/* Do not remove this test if we completly remove DSA support! */
|
||||
/* Do not remove this test if we completely remove DSA support! */
|
||||
static void torture_knownhosts_get_algorithms_names_unsupported(void **state)
|
||||
{
|
||||
const char *knownhosts_file = *state;
|
||||
|
||||
@@ -230,7 +230,7 @@ static void torture_options_set_pubkey_accepted_types(void **state) {
|
||||
/* simulate the SHA2 extension was negotiated */
|
||||
session->extensions = SSH_EXT_SIG_RSA_SHA256;
|
||||
|
||||
/* previous configuration did not list the SHA2 extension algoritms, so
|
||||
/* previous configuration did not list the SHA2 extension algorithms, so
|
||||
* it should not be used */
|
||||
type = ssh_key_type_to_hash(session, SSH_KEYTYPE_RSA);
|
||||
assert_int_equal(type, SSH_DIGEST_SHA1);
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* This test checks if the messages accepted by the packet filter were intented
|
||||
* This test checks if the messages accepted by the packet filter were intended
|
||||
* to be accepted.
|
||||
*
|
||||
* The process consists in 2 steps:
|
||||
|
||||
@@ -690,7 +690,7 @@ static void torture_pki_rsa_key_size(void **state)
|
||||
rc = ssh_pki_signature_verify(session, sign, pubkey, INPUT, sizeof(INPUT));
|
||||
assert_ssh_return_code(session, rc);
|
||||
|
||||
/* Set the minumum RSA key size to 4k */
|
||||
/* Set the minimum RSA key size to 4k */
|
||||
rc = ssh_options_set(session, SSH_OPTIONS_RSA_MIN_SIZE, &length);
|
||||
assert_ssh_return_code(session, rc);
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ static void test_ssh_accept_interrupt(void **state)
|
||||
server = ssh_new();
|
||||
assert_non_null(server);
|
||||
|
||||
/* Send interupt in 1 second */
|
||||
/* Send interrupt in 1 second */
|
||||
rc = pthread_create(&interrupt_pthread, NULL, int_thread, NULL);
|
||||
assert_return_code(rc, errno);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user