Unverified Commit 72d5c98f authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

DBRIS: set TLS ciphersuites via API rather than patching IO::Socket::SSL

parent f8944949
Loading
Loading
Loading
Loading
+0 −1
Changes for doc/setup.md: 0 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -36,7 +36,6 @@ In the project root directory (where `cpanfile` resides, e.g., `/srv/www/travely

```
carton install --deployment
patch -p1 < doc/tls-ciphers.patch
```

Afterwards, either set `PERL5LIB=/srv/www/travelynx/local/lib/perl5` (or similar) before executing any travelynx commands (see configs in the examples directory), or wrap them with `carton exec`, e.g. `carton exec hypnotoad index.pl`

doc/tls-ciphers.patch

deleted100644 → 0
+0 −11
Changes for doc/tls-ciphers.patch: 0 added lines, 11 removed lines.
Original line number Diff line number Diff line
--- a/local/lib/perl5/IO/Socket/SSL.pm
+++ b/local/lib/perl5/IO/Socket/SSL.pm
@@ -3373,7 +3373,7 @@
 	    ) || return IO::Socket::SSL->error("Failed to set SSL cipher list");
 	}
     }
-    if ( my $cl = $arg_hash->{SSL_ciphersuites} ) {
+    if ( my $cl = 'TLS_AES_256_GCM_SHA384' ) {
 	return IO::Socket::SSL->error("no support for SSL_ciphersuites in Net::SSLeay")
 	    if ! $can_ciphersuites;
 	for (keys %ctx) {
+5 −0
Changes for lib/Travelynx/Helper/DBRIS.pm: 5 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -35,6 +35,11 @@ sub get_agent {
	my ($self) = @_;

	my $agent = $self->{user_agent};

	# Requird to workaround Akamai BMP UserAgent fingerprinting (which includes
	# the supported TLS cipher suites) employed by bahn.de
	$agent->tls_options( { SSL_ciphersuites => 'TLS_AES_256_GCM_SHA384' } );

	my $proxy;
	if ( my @proxies = @{ $self->{service_config}{'bahn.de'}{proxies} // [] } )
	{