Check for OpenSSL + use unames

This commit is contained in:
Dirk 2018-11-12 20:46:35 +01:00
parent f4ab795221
commit de7f7b6cab
1 changed files with 12 additions and 3 deletions

View File

@ -4,12 +4,21 @@ use strict;
use Data::Dumper; use Data::Dumper;
use JSON; use JSON;
# we get all data from here my @spec;
my $json = `curl 'https://api.dev.ssllabs.com/api/v3/getClients'`; my %ciphers;
my @spec; my @spec;
my %ciphers; 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 @fields = split /\s+/, $line;
my $hex = ""; my $hex = "";
foreach my $byte ( split /,/, $fields[1] ) { foreach my $byte ( split /,/, $fields[1] ) {