# encoding: utf-8
# copyright: 2017, The Authors

title 'itds_advisory2'

control 'CVE-2018-1388' do
  impact 0.91
  title 'CVE-2018-1388'
  desc 'GSKit V7 may disclose side channel information via 
        discrepencies between valid and invalid PKCS#1 padding. 
  '

  tag 'aix'
  tag 'ldap', 'itds', 'isds', 'gskit'
  tag :score, '9.1'
  ref 'https://aix.software.ibm.com/aix/efixes/security/itds_advisory2.asc'

  only_if do
    os.aix?
  end

  describe command('/usr/bin/lslpp -Lqc idsldap.srvbase64bit63.rte') do
    its('stdout') { should_not match(/:6\.3\.0\.[0-9]:/) }
    its('stdout') { should_not match(/:6\.3\.0\.[1-3][0-9]:/) }
    its('stdout') { should_not match(/:6\.3\.0\.4[0-8]:/) }
  end

  describe command('/usr/bin/lslpp -Lqc idsldap.cltbase63.rte') do
    its('stdout') { should_not match(/:6\.3\.0\.[0-9]:/) }
    its('stdout') { should_not match(/:6\.3\.0\.[1-3][0-9]:/) }
    its('stdout') { should_not match(/:6\.3\.0\.4[0-8]:/) }
  end
end
