From d2b7194430bfb422a9860c574b80fbfbbaebdf81 Mon Sep 17 00:00:00 2001 From: Charles McGarvey Date: Thu, 30 Nov 2017 18:32:48 -0700 Subject: [PATCH] use sha256 digest explicitly for aes-256-cbc --- lib/App/GroupSecret/Crypt.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/App/GroupSecret/Crypt.pm b/lib/App/GroupSecret/Crypt.pm index f5360be..9016348 100644 --- a/lib/App/GroupSecret/Crypt.pm +++ b/lib/App/GroupSecret/Crypt.pm @@ -227,7 +227,7 @@ sub decrypt_aes_256_cbc { $filepath = $temp->filename; } - my @cmd = (qw{openssl aes-256-cbc -d -pass stdin -in}, $filepath); + my @cmd = (qw{openssl aes-256-cbc -d -pass stdin -md sha256 -in}, $filepath); push @cmd, ('-out', $outfile) if $outfile; my ($in, $out); @@ -269,7 +269,7 @@ sub encrypt_aes_256_cbc { $filepath = $temp->filename; } - my @cmd = (qw{openssl aes-256-cbc -pass stdin -in}, $filepath); + my @cmd = (qw{openssl aes-256-cbc -pass stdin -md sha256 -in}, $filepath); push @cmd, ('-out', $outfile) if $outfile; my ($in, $out); -- 2.45.2