Merge pull request #881 from dcooper16/libressl_enc_names

Fix problem with LibreSSL encryption names
This commit is contained in:
Dirk Wetter 2017-10-27 17:55:15 +02:00 committed by GitHub
commit a0fc34763f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -2686,6 +2686,11 @@ neat_list(){
kx="${3//Kx=/}" kx="${3//Kx=/}"
enc="${4//Enc=/}" enc="${4//Enc=/}"
# In two cases LibreSSL uses very long names for encryption algorithms
# and doesn't include the number of bits.
[[ "$enc" == "ChaCha20-Poly1305" ]] && enc="CHACHA20(256)"
[[ "$enc" == "GOST-28178-89-CNT" ]] && enc="GOST(256)"
strength="${enc//\)/}" # retrieve (). first remove traling ")" strength="${enc//\)/}" # retrieve (). first remove traling ")"
strength="${strength#*\(}" # exfiltrate (VAL strength="${strength#*\(}" # exfiltrate (VAL
enc="${enc%%\(*}" enc="${enc%%\(*}"