You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2026-05-22 10:15:16 +02:00
Remove dependency on LibC hash filter.
Perl provides Digest::SHA for hashing so there is no need to expose this via LibC anymore.
This commit is contained in:
@@ -11,6 +11,7 @@ use strict;
|
||||
use warnings FATAL => qw(all);
|
||||
use Carp qw(confess);
|
||||
|
||||
use Digest::SHA qw(sha1_hex);
|
||||
use Exporter qw(import);
|
||||
our @EXPORT = qw();
|
||||
use Storable qw(dclone);
|
||||
@@ -19,7 +20,6 @@ use pgBackRest::Archive::Common;
|
||||
use pgBackRest::Common::Log;
|
||||
use pgBackRest::Config::Config;
|
||||
use pgBackRest::DbVersion;
|
||||
use pgBackRest::LibC qw(:crypto);
|
||||
use pgBackRest::Protocol::Storage::Helper;
|
||||
|
||||
use pgBackRestTest::Env::Host::HostBackupTest;
|
||||
@@ -492,7 +492,7 @@ sub walGenerateContentChecksum
|
||||
{name => 'hParam', required => false, trace => true},
|
||||
);
|
||||
|
||||
return cryptoHashOne('sha1', ${$self->walGenerateContent($strPgVersion, $hParam)});
|
||||
return sha1_hex(${$self->walGenerateContent($strPgVersion, $hParam)});
|
||||
}
|
||||
|
||||
####################################################################################################################################
|
||||
@@ -513,7 +513,7 @@ sub walGenerate
|
||||
|
||||
my $rtWalContent = $self->walGenerateContent($strPgVersion, {iSourceNo => $iSourceNo});
|
||||
my $strWalFile =
|
||||
"${strWalPath}/${strWalSegment}" . ($bChecksum ? '-' . cryptoHashOne('sha1', $rtWalContent) : '') .
|
||||
"${strWalPath}/${strWalSegment}" . ($bChecksum ? '-' . sha1_hex($rtWalContent) : '') .
|
||||
(defined($bPartial) && $bPartial ? '.partial' : '');
|
||||
|
||||
# Put the WAL segment and the ready file
|
||||
|
||||
Reference in New Issue
Block a user