Skip to content

Commit f49be8d

Browse files
committed
work on config stuff
1 parent 86ed1ec commit f49be8d

File tree

5 files changed

+214
-229
lines changed

5 files changed

+214
-229
lines changed

.gitattributes

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
sensitive_file filter=crypt diff=crypt merge=crypt

bash_helpers.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,3 +220,21 @@ _openssl_list(){
220220
fi
221221
}
222222

223+
224+
# shellcheck disable=SC2155
225+
_check_config_poc(){
226+
# Notes on custom config
227+
# https://unix.stackexchange.com/questions/175648/use-config-file-for-my-shell-script
228+
mkdir -p "${VERSIONED_CONFIG_DPATH}"
229+
touch "${VERSIONED_TC_CONFIG}"
230+
git config -f "$VERSIONED_TC_CONFIG" --get transcrypt.cipher
231+
git config -f "$VERSIONED_TC_CONFIG" --get transcrypt.rotating.salt
232+
233+
# POC for using git to store cross-checkout configs
234+
extra_salt=$(openssl rand -hex 32)
235+
git config --file "${VERSIONED_TC_CONFIG}" transcrypt.cipher "aes-256-cbc"
236+
git config --file "${VERSIONED_TC_CONFIG}" transcrypt.use-pbkdf2 "true" --type=bool
237+
git config --file "${VERSIONED_TC_CONFIG}" transcrypt.digest "SHA512"
238+
git config --file "${VERSIONED_TC_CONFIG}" transcrypt.salt-method "auto"
239+
git config --file "${VERSIONED_TC_CONFIG}" transcrypt.extra-salt "${extra_salt}"
240+
}

sensitive_file

1.81 KB
Binary file not shown.

tests/local_test.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#./transcrypt -F -c aes-256-cbc -p "foobar" -md SHA512 -sm configured --use_pbkdf2=0
2+
./transcrypt -F -c aes-256-cbc -pbkdf2 -p "foobar" -md SHA512 -sm configured
3+
4+
./transcrypt -d
5+
6+
transcrypt --uninstall -y

0 commit comments

Comments
 (0)