backup: add support for openssl 1.1.0 options

The command for listing available algorithms have changed:
old: openssl list-message-digest-algorithms
new: openssl list -digest-algorithms
This commit is contained in:
Marek Marczykowski-Górecki 2018-02-14 04:06:16 +01:00
parent 04635e7e80
commit a821034653
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -702,8 +702,12 @@ def get_supported_hmac_algo(hmac_algorithm=None):
yield hmac_algorithm
if hmac_algorithm != 'scrypt':
yield 'scrypt'
proc = subprocess.Popen(['openssl', 'list-message-digest-algorithms'],
stdout=subprocess.PIPE)
proc = subprocess.Popen(
'openssl list-message-digest-algorithms || '
'openssl list -digest-algorithms',
shell=True,
stdout=subprocess.PIPE,
stderr=subprocess.DEVNULL)
try:
for algo in proc.stdout.readlines():
algo = algo.decode('ascii')