I have the following check in Serverspec tests:
openssl_latest_version = 'OpenSSL 1.0.2h 3 May 2016'
describe command('openssl version') do
its(:stdout) { should match openssl_latest_version }
end
Is there a way to automatically fetch the string that the latest officially released OpenSSL returns on executing openssl version
? I.e. automatically set openssl_latest_version
based for example on some curl
call.
My intention is that the test should fail if installed version is later than the one currently published by OpenSSL as latest at the moment of running the test, but without human updating the parameters.
I do not want to check it against a version available in package manager for any specific OS version, I do not want to install latest version, I simply want the test to fail when the running version is different than the one announced as recent.