diff --git a/.editorconfig b/.editorconfig index b39609a2..9c00dd2b 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,9 +1,15 @@ +# Copyright (C) The libssh2 project and its contributors. +# +# SPDX-License-Identifier: BSD-3-Clause + root = true -[*.{c, h}] -end_of_line = lf +[*] +charset = utf-8 insert_final_newline = true indent_style = space -indent_size = 4 trim_trailing_whitespace = true -max_line_length = 80 + +[*.{c,h}] +indent_size = 4 +max_line_length = 79 diff --git a/.github/SECURITY.md b/.github/SECURITY.md index bc8dcc48..e0b51749 100644 --- a/.github/SECURITY.md +++ b/.github/SECURITY.md @@ -1,3 +1,9 @@ + + # Security Policy See [SECURITY.md](https://github.com/libssh2/libssh2/blob/master/docs/SECURITY.md) for full details. diff --git a/.gitignore b/.gitignore index b17768e1..d9b96759 100644 --- a/.gitignore +++ b/.gitignore @@ -1,50 +1,51 @@ +# Copyright (C) The libssh2 project and its contributors. +# +# SPDX-License-Identifier: BSD-3-Clause + .deps .libs -*.a -*.lib -*.pdb -*.dll -*.def -*.exe -*.obj -*.gcno -*.gcda -.*.swp *-*-* -Debug -Release +*.a +*.def +*.dll +*.exe *.exp -Makefile -Makefile.in -Makefile.inc.cmake -stamp-h* +*.gcda +*.gcno +*.la +*.lib +*.lo +*.o +*.obj +*.pdb +*~ aclocal.m4 autom4te.cache +build compile -test-driver config.guess config.log config.status config.sub configure +Debug depcomp -libtool -ltmain.sh -missing -tap-driver.sh -test-driver +install-sh libssh2-*.tar.bz2 libssh2-*.tar.gz libssh2-*.tar.xz libssh2-*.zip -install-sh -*.o -*.lo -*.la -mkinstalldirs -tags libssh2.pc +libtool +ltmain.sh +Makefile +Makefile.in +Makefile.inc.cmake +missing +mkinstalldirs +Release +stamp-h* +tags TAGS -*~ -.DS_Store -build +tap-driver.sh +test-driver diff --git a/README.md b/README.md index 9d167c07..3772fee7 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,9 @@ + + # libssh2 - SSH2 library libssh2 is a library implementing the SSH2 protocol, available under diff --git a/REUSE.toml b/REUSE.toml index aad68990..76917885 100644 --- a/REUSE.toml +++ b/REUSE.toml @@ -15,40 +15,19 @@ SPDX-PackageDownloadLocation = "https://libssh2.org/" [[annotations]] path = [ ".github/ISSUE_TEMPLATE/bug_report.md", - ".github/SECURITY.md", "NEWS", "README", - "README.md", "RELEASE-NOTES", - "ci/spellcheck-words.txt", "docs/AUTHORS", - "docs/BINDINGS.md", "docs/HACKING-CRYPTO", - "docs/HACKING.md", - "docs/INSTALL_CMAKE.md", - "docs/SECURITY.md", "docs/TODO", "os400/README400", "tests/key_*", - "tests/openssh_server/.gitattributes", "tests/openssh_server/authorized_keys", "tests/openssh_server/ca_*", "tests/openssh_server/ssh_*", - "tests/openssh_server/sshd_config", "tests/test_read_algos.txt", - "vms/libssh2_config.h", - "vms/libssh2_*.dcl", - "vms/man2help.c", "vms/readme.vms", - # dotfiles - ".editorconfig", - ".gitignore", - "docs/.gitignore", - "example/.gitignore", - "m4/.gitignore", - "src/.gitignore", - "tests/.gitignore", - "tests/ossfuzz/.gitignore", ] SPDX-FileCopyrightText = "The libssh2 project and its contributors." SPDX-License-Identifier = "BSD-3-Clause" diff --git a/ci/codespell-ignore.words b/ci/codespell-ignore.words new file mode 100644 index 00000000..de561879 --- /dev/null +++ b/ci/codespell-ignore.words @@ -0,0 +1,6 @@ +# Copyright (C) The libssh2 project and its contributors. +# +# SPDX-License-Identifier: BSD-3-Clause +gord +pase +nam diff --git a/ci/spellcheck-words.txt b/ci/spellcheck-words.txt deleted file mode 100644 index 2f39b280..00000000 --- a/ci/spellcheck-words.txt +++ /dev/null @@ -1,3 +0,0 @@ -gord -pase -nam diff --git a/ci/spellcheck.sh b/ci/spellcheck.sh index 8e3e3649..312e1569 100755 --- a/ci/spellcheck.sh +++ b/ci/spellcheck.sh @@ -8,5 +8,5 @@ cd "$(dirname "$0")"/.. # shellcheck disable=SC2046 codespell --skip='docs/AUTHORS' \ - --ignore-words='ci/spellcheck-words.txt' \ + --ignore-words='ci/codespell-ignore.words' \ $(git ls-files) diff --git a/docs/.gitignore b/docs/.gitignore index 4ebc8aea..d01ca2ed 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -1 +1,5 @@ +# Copyright (C) The libssh2 project and its contributors. +# +# SPDX-License-Identifier: BSD-3-Clause + coverage diff --git a/docs/BINDINGS.md b/docs/BINDINGS.md index 63ad1b0d..89ad4d79 100644 --- a/docs/BINDINGS.md +++ b/docs/BINDINGS.md @@ -1,3 +1,9 @@ + + libssh2 bindings ================ diff --git a/docs/HACKING.md b/docs/HACKING.md index 11ddbd30..0d71e0b0 100644 --- a/docs/HACKING.md +++ b/docs/HACKING.md @@ -1,3 +1,9 @@ + + # libssh2 source code style guide - 4 level indent diff --git a/docs/INSTALL_CMAKE.md b/docs/INSTALL_CMAKE.md index 848bd1d7..eb250d09 100644 --- a/docs/INSTALL_CMAKE.md +++ b/docs/INSTALL_CMAKE.md @@ -1,3 +1,9 @@ + + License: see COPYING Source code: https://github.com/libssh2/libssh2 diff --git a/docs/SECURITY.md b/docs/SECURITY.md index 1a692575..ac07195e 100644 --- a/docs/SECURITY.md +++ b/docs/SECURITY.md @@ -1,3 +1,9 @@ + + libssh2 security ================ diff --git a/example/.gitignore b/example/.gitignore index 61cd3943..95a17149 100644 --- a/example/.gitignore +++ b/example/.gitignore @@ -1,3 +1,7 @@ +# Copyright (C) The libssh2 project and its contributors. +# +# SPDX-License-Identifier: BSD-3-Clause + direct_tcpip scp scp_nonblock diff --git a/m4/.gitignore b/m4/.gitignore index 38066ddf..9928e668 100644 --- a/m4/.gitignore +++ b/m4/.gitignore @@ -1,3 +1,7 @@ +# Copyright (C) The libssh2 project and its contributors. +# +# SPDX-License-Identifier: BSD-3-Clause + libtool.m4 ltoptions.m4 ltsugar.m4 diff --git a/src/.gitignore b/src/.gitignore index d0f3a32a..78e446ba 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -1,3 +1,7 @@ +# Copyright (C) The libssh2 project and its contributors. +# +# SPDX-License-Identifier: BSD-3-Clause + libssh2.pc libssh2_config.h libssh2_config.h.in diff --git a/tests/.gitignore b/tests/.gitignore new file mode 100644 index 00000000..5cf5fb56 --- /dev/null +++ b/tests/.gitignore @@ -0,0 +1,32 @@ +# Copyright (C) The libssh2 project and its contributors. +# +# SPDX-License-Identifier: BSD-3-Clause + +test_aa_warmup +test_agent_forward_ok +test_auth_keyboard_fail +test_auth_keyboard_info_request +test_auth_keyboard_ok +test_auth_password_fail_password +test_auth_password_fail_username +test_auth_password_ok +test_auth_pubkey_fail +test_auth_pubkey_fail-pat1 +test_auth_pubkey_fail-pat2 +test_auth_pubkey_ok_dsa +test_auth_pubkey_ok_ecdsa +test_auth_pubkey_ok_ecdsa_signed +test_auth_pubkey_ok_ed25519 +test_auth_pubkey_ok_ed25519_encrypted +test_auth_pubkey_ok_ed25519_mem +test_auth_pubkey_ok_rsa +test_auth_pubkey_ok_rsa_aes256gcm +test_auth_pubkey_ok_rsa_encrypted +test_auth_pubkey_ok_rsa_openssh +test_auth_pubkey_ok_rsa_sha2_256_signed +test_auth_pubkey_ok_rsa_signed +test_hostkey +test_hostkey_hash +test_read +test_simple +test_ssh2 diff --git a/tests/openssh_server/.gitattributes b/tests/openssh_server/.gitattributes index ebb9637c..30555c18 100644 --- a/tests/openssh_server/.gitattributes +++ b/tests/openssh_server/.gitattributes @@ -1,3 +1,7 @@ +# Copyright (C) The libssh2 project and its contributors. +# +# SPDX-License-Identifier: BSD-3-Clause + # OpenSSH requires LF EOLs in key files, even on Windows, where # a git checkout may set CRLF EOLs by default. * text eol=lf diff --git a/tests/openssh_server/sshd_config b/tests/openssh_server/sshd_config index 5cd2b898..9c1b7813 100644 --- a/tests/openssh_server/sshd_config +++ b/tests/openssh_server/sshd_config @@ -1,3 +1,7 @@ +# Copyright (C) The libssh2 project and its contributors. +# +# SPDX-License-Identifier: BSD-3-Clause + HostKeyAlgorithms +ssh-rsa PubkeyAcceptedKeyTypes +ssh-rsa,ssh-rsa-cert-v01@openssh.com MACs +hmac-sha1,hmac-sha1-96,hmac-sha2-256,hmac-sha2-512,hmac-md5,hmac-md5-96,umac-64@openssh.com,umac-128@openssh.com,hmac-sha1-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-md5-etm@openssh.com,hmac-md5-96-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com diff --git a/tests/ossfuzz/.gitignore b/tests/ossfuzz/.gitignore index 40d77db5..3c3a8336 100644 --- a/tests/ossfuzz/.gitignore +++ b/tests/ossfuzz/.gitignore @@ -1 +1,5 @@ +# Copyright (C) The libssh2 project and its contributors. +# +# SPDX-License-Identifier: BSD-3-Clause + ssh2_client_fuzzer diff --git a/vms/libssh2_make_example.dcl b/vms/libssh2_make_example.dcl index 17e71962..7ba289f2 100644 --- a/vms/libssh2_make_example.dcl +++ b/vms/libssh2_make_example.dcl @@ -1,3 +1,6 @@ +$! Copyright (C) The libssh2 project and its contributors. +$! +$! SPDX-License-Identifier: BSD-3-Clause $! $! $ olddir = f$environment("default") diff --git a/vms/libssh2_make_help.dcl b/vms/libssh2_make_help.dcl index 34bbb052..edf4de7c 100644 --- a/vms/libssh2_make_help.dcl +++ b/vms/libssh2_make_help.dcl @@ -1,4 +1,6 @@ +$! Copyright (C) The libssh2 project and its contributors. $! +$! SPDX-License-Identifier: BSD-3-Clause $! $! $ olddir = f$environment( "default" ) diff --git a/vms/libssh2_make_kit.dcl b/vms/libssh2_make_kit.dcl index f96c0abf..b1a03529 100644 --- a/vms/libssh2_make_kit.dcl +++ b/vms/libssh2_make_kit.dcl @@ -1,3 +1,7 @@ +$! Copyright (C) The libssh2 project and its contributors. +$! +$! SPDX-License-Identifier: BSD-3-Clause +$! $! $ olddir = f$environment("default") $ on error then goto End diff --git a/vms/libssh2_make_lib.dcl b/vms/libssh2_make_lib.dcl index a763445e..9fef8d9d 100644 --- a/vms/libssh2_make_lib.dcl +++ b/vms/libssh2_make_lib.dcl @@ -1,3 +1,6 @@ +$! Copyright (C) The libssh2 project and its contributors. +$! +$! SPDX-License-Identifier: BSD-3-Clause $! $! $ olddir = f$environment("default")