Skip to content

Commit 5c5e8ef

Browse files
authored
Use welcoming language (#67)
1 parent 5d95eba commit 5c5e8ef

File tree

3 files changed

+20
-4
lines changed

3 files changed

+20
-4
lines changed

Sources/NIOSSH/TransportProtection/AESGCM.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ extension AESGCMTransportProtection: NIOSSHTransportProtection {
9898
let sealedBox = try AES.GCM.SealedBox(nonce: AES.GCM.Nonce(data: self.inboundNonce), ciphertext: ciphertextView, tag: tagView)
9999
plaintext = try AES.GCM.open(sealedBox, using: self.inboundEncryptionKey, authenticating: lengthView)
100100

101-
// All good! A quick sanity check to verify that the length of the plaintext is ok.
101+
// All good! A quick soundness check to verify that the length of the plaintext is ok.
102102
guard plaintext.count % Self.cipherBlockSize == 0, plaintext.count == ciphertextView.count else {
103103
throw NIOSSHError.invalidDecryptedPlaintextLength
104104
}

docker/docker-compose.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ services:
2222
- CAP_NET_RAW
2323
- CAP_NET_BIND_SERVICE
2424

25-
sanity:
25+
soundness:
2626
<<: *common
27-
command: /bin/bash -xcl "./scripts/sanity.sh"
27+
command: /bin/bash -xcl "./scripts/soundness.sh"
2828

2929
test:
3030
<<: *common

scripts/sanity.sh renamed to scripts/soundness.sh

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,24 @@ else
3535
printf "\033[0;32mokay.\033[0m\n"
3636
fi
3737

38+
printf "=> Checking for unacceptable language... "
39+
# This greps for unacceptable terminology. The square bracket[s] are so that
40+
# "git grep" doesn't find the lines that greps :).
41+
unacceptable_terms=(
42+
-e blacklis[t]
43+
-e whitelis[t]
44+
-e slav[e]
45+
-e sanit[y]
46+
)
47+
if git grep --color=never -i "${unacceptable_terms[@]}" > /dev/null; then
48+
printf "\033[0;31mUnacceptable language found.\033[0m\n"
49+
git grep -i "${unacceptable_terms[@]}"
50+
exit 1
51+
fi
52+
printf "\033[0;32mokay.\033[0m\n"
53+
3854
printf "=> Checking license headers...\n"
39-
tmp=$(mktemp /tmp/.swift-nio-sanity_XXXXXX)
55+
tmp=$(mktemp /tmp/.swift-nio-soundness_XXXXXX)
4056

4157
for language in swift-or-c bash dtrace; do
4258
printf " * checking $language... "

0 commit comments

Comments
 (0)