我有一个用openssl
.我已将存储库移至新主机。原始主机使用的是:
» openssl version
OpenSSL 1.0.2g 1 Mar 2016
当前主机正在使用:
» openssl version
OpenSSL 1.1.0g 2 Nov 2017
这些是我对git
存储库的过滤器:
[filter "openssl"]
smudge = ~/.gitencrypt/SALT-20131126-01/smudge_filter_openssl
clean = ~/.gitencrypt/SALT-20131126-01/clean_filter_openssl
[diff "openssl"]
textconv = ~/.gitencrypt/SALT-20131126-01/diff_filter_openssl
编码过滤器:
» cat ~/.gitencrypt/SALT-20131126-01/clean_filter_openssl
#!/bin/bash
# 24 or less hex characters
SALT_FIXED=mysalt
PASS_FIXED=mypass
openssl enc -base64 -aes-256-ecb -S $SALT_FIXED -k $PASS_FIXED
解码滤波器:
» cat ~/.gitencrypt/SALT-20131126-01/diff_filter_openssl
#!/bin/bash
# No salt is needed for decryption.
PASS_FIXED=mypass
# Error messages are redirect to /dev/null.
openssl enc -d -base64 -aes-256-ecb -k $PASS_FIXED -in "$1" 2> /dev/null || cat "$1"
我已读过OpenSSL 使用的默认哈希值发生了变化。我尝试强制使用旧的哈希:
» git show HEAD~1:myfile > /tmp/xxx
» openssl enc -d -md md5 -base64 -aes-256-ecb -k mypass -in /tmp/xxx
但仍然给我带来问题:
error reading input file
我还能尝试什么?