Skip to content

Commit 77d1c50

Browse files
damaestroelasticdog
authored andcommitted
Specify MD5 as the digest to create a key from the passphrase. (backwards compatibility)
1 parent 89a362e commit 77d1c50

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

transcrypt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ save_helper_scripts() {
284284
cipher=$(git config --get --local transcrypt.cipher)
285285
password=$(git config --get --local transcrypt.password)
286286
salt=$(openssl dgst -hmac "${filename}:${password}" -sha256 "$filename" | tail -c 16)
287-
ENC_PASS=$password openssl enc -$cipher -pass env:ENC_PASS -e -a -S "$salt" -in "$tempfile"
287+
ENC_PASS=$password openssl enc -$cipher -md MD5 -pass env:ENC_PASS -e -a -S "$salt" -in "$tempfile"
288288
fi
289289
fi
290290
EOF
@@ -295,7 +295,7 @@ save_helper_scripts() {
295295
trap 'rm -f "$tempfile"' EXIT
296296
cipher=$(git config --get --local transcrypt.cipher)
297297
password=$(git config --get --local transcrypt.password)
298-
tee "$tempfile" | ENC_PASS=$password openssl enc -$cipher -pass env:ENC_PASS -d -a 2> /dev/null || cat "$tempfile"
298+
tee "$tempfile" | ENC_PASS=$password openssl enc -$cipher -md MD5 -pass env:ENC_PASS -d -a 2> /dev/null || cat "$tempfile"
299299
EOF
300300

301301
cat <<-'EOF' > "${GIT_DIR}/crypt/textconv"
@@ -305,7 +305,7 @@ save_helper_scripts() {
305305
if [[ -s $filename ]]; then
306306
cipher=$(git config --get --local transcrypt.cipher)
307307
password=$(git config --get --local transcrypt.password)
308-
ENC_PASS=$password openssl enc -$cipher -pass env:ENC_PASS -d -a -in "$filename" 2> /dev/null || cat "$filename"
308+
ENC_PASS=$password openssl enc -$cipher -md MD5 -pass env:ENC_PASS -d -a -in "$filename" 2> /dev/null || cat "$filename"
309309
fi
310310
EOF
311311

0 commit comments

Comments
 (0)