Skip to content

Commit

Permalink
solves bug zmanda#112
Browse files Browse the repository at this point in the history
  • Loading branch information
stefangweichinger committed Dec 14, 2019
1 parent 5fdd268 commit 9c79d55
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common-src/amcrypt-ossl-asym.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ encrypt() {
cat "${WORKDIR}/pass.ciphertext"

# encrypt data using the cipher key and print
pad | "${OPENSSL}" enc "-${CIPHER}" -nopad -e -pass "file:${WORKDIR}/pass" -nosalt
pad | "${OPENSSL}" enc -pbkdf2 "-${CIPHER}" -nopad -e -pass "file:${WORKDIR}/pass" -nosalt
[ $? -eq 0 ] || return 1
}

Expand Down Expand Up @@ -164,7 +164,7 @@ decrypt() {
[ $? -eq 0 ] || return 1

# use the cipher key to decrypt data
pad | "${OPENSSL}" enc "-${CIPHER}" -nopad -d -pass "file:${WORKDIR}/pass" -nosalt
pad | "${OPENSSL}" enc -pbkdf2 "-${CIPHER}" -nopad -d -pass "file:${WORKDIR}/pass" -nosalt

# N.B.: in the likely event that we're piping to gzip, the above command
# may return a spurious error if gzip closes the output stream early.
Expand Down

0 comments on commit 9c79d55

Please sign in to comment.