Skip to content

Commit

Permalink
Merge pull request #29 from hathitrust/curl-tls-1.2
Browse files Browse the repository at this point in the history
Force tls v1.2 for curl & zephir
  • Loading branch information
aelkiss authored Jan 18, 2024
2 parents e950671 + bfa9f80 commit 7e812a7
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
FROM perl:5.34
FROM perl:5.38

RUN apt-get update && apt-get install -y \
bsd-mailx \
msmtp \
netcat \
netcat-traditional \
pigz

RUN cpanm -n \
Data::Dumper \
DBD::mysql \
DBD::MariaDB \
DB_File \
DBI \
Devel::Cover \
Expand Down
2 changes: 1 addition & 1 deletion ftpslib/ftps_zephir_dir
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ echo "server: ${SERVER}, dir: ${dir}"
#/l/local/bin/curl -k -n --ftp-ssl-control --ftp-pasv --ftp-method nocwd ftp://${SERVER}/${dir}


curl --netrc-file $conf --ssl-reqd --ftp-pasv --ftp-method nocwd "ftp://${SERVER}/${dir}/"
curl --tls-max 1.2 --netrc-file $conf --ssl-reqd --ftp-pasv --ftp-method nocwd "ftp://${SERVER}/${dir}/"
2 changes: 1 addition & 1 deletion ftpslib/ftps_zephir_get
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ SERVER=ftps.cdlib.org
echo "server: ${SERVER}, remote file: ${remote_file}, local_file: ${local_file}"
#/l/local/bin/curl -n -k --ftp-ssl --ftp-pasv ftp://${SERVER}/${remote_file} --out ${local_file}

curl -s --netrc-file $conf --ssl-reqd --ftp-pasv ftp://${SERVER}/${remote_file} --output ${local_file}
curl --tls-max 1.2 -s --netrc-file $conf --ssl-reqd --ftp-pasv ftp://${SERVER}/${remote_file} --output ${local_file}
2 changes: 1 addition & 1 deletion ftpslib/ftps_zephir_send
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ echo "server is $server, dir is: ${dir}, sending $infile as $outfile"

#/l/local/bin/curl -k -n -T $infile --ftp-ssl --ftp-pasv ftp://$server/submissions/$outfile

curl --netrc-file $conf -T $infile --ssl-reqd --ftp-pasv ftp://$server/submissions/$outfile
curl --tls-max 1.2 --netrc-file $conf -T $infile --ssl-reqd --ftp-pasv ftp://$server/submissions/$outfile
2 changes: 1 addition & 1 deletion rightsDB.pm
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ sub ConnectToSdrDb
my $db_name = shift;

my $sdr_dbh;
$sdr_dbh = DBI->connect( "DBI:mysql:$db_name:$db_server", $db_user, $db_passwd,
$sdr_dbh = DBI->connect( "DBI:MariaDB:$db_name:$db_server", $db_user, $db_passwd,
{ RaiseError => 0, AutoCommit => 1 } ) || die "Cannot connect: $DBI::errstr";

return $sdr_dbh;
Expand Down

0 comments on commit 7e812a7

Please sign in to comment.