From de7f7b6cab9d239e71e99650b066218e308a74d6 Mon Sep 17 00:00:00 2001 From: Dirk Date: Mon, 12 Nov 2018 20:46:35 +0100 Subject: [PATCH] Check for OpenSSL + use unames --- utils/update_client_sim_data.pl | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/utils/update_client_sim_data.pl b/utils/update_client_sim_data.pl index 6a17964..074a2fe 100755 --- a/utils/update_client_sim_data.pl +++ b/utils/update_client_sim_data.pl @@ -4,12 +4,21 @@ use strict; use Data::Dumper; use JSON; -# we get all data from here -my $json = `curl 'https://api.dev.ssllabs.com/api/v3/getClients'`; +my @spec; +my %ciphers; my @spec; my %ciphers; -foreach my $line ( split /\n/, `../bin/openssl.Linux.x86_64 ciphers -V 'ALL:COMPLEMENTOFALL:\@STRENGTH'`) { +my $ossl = "bin/openssl." . `uname -s` . "." . `uname -m`; +$ossl =~ s/\R//g; # remove LFs + +die "Unable to open $ossl" unless -f $ossl; +my $ossl = "$ossl" . " ciphers -V 'ALL:COMPLEMENTOFALL:\@STRENGTH'"; + +# we get all data from here +my $json = `curl 'https://api.dev.ssllabs.com/api/v3/getClients'`; + +foreach my $line ( split /\n/, `$ossl`) { my @fields = split /\s+/, $line; my $hex = ""; foreach my $byte ( split /,/, $fields[1] ) {