From 02108ba050233d9fb8ced2938098a885307b6ad7 Mon Sep 17 00:00:00 2001 From: Krishna Kola Date: Thu, 24 Oct 2019 15:17:05 -0400 Subject: [PATCH] fix for issue #19 --- controls/V-73611.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/controls/V-73611.rb b/controls/V-73611.rb index 89708c3..36d0af9 100644 --- a/controls/V-73611.rb +++ b/controls/V-73611.rb @@ -41,8 +41,10 @@ domain_role = command('wmic computersystem get domainrole | Findstr /v DomainRole').stdout.strip if domain_role == '4' || domain_role == '5' - describe command("Get-ChildItem -Path Cert:\\LocalMachine\\My | Findstr /v 'Thumbprint -- PSParentPath'") do - its('stdout') { should_not eq ' ' } + certs = command("Get-ChildItem -Path Cert:\\LocalMachine\\My | ConvertTo-JSON").stdout + describe "The domain controller's server certificate" do + subject { certs } + it { should_not cmp '' } end end