From 81cdb0b1e56c69c95df6668f180aa0e44e251105 Mon Sep 17 00:00:00 2001 From: piyushawasthi Date: Sun, 10 Jun 2018 23:38:30 -0700 Subject: [PATCH 1/2] Fixed FFI destroy object messages during chef run Signed-off-by: piyushawasthi --- lib/win32/certstore.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/win32/certstore.rb b/lib/win32/certstore.rb index cd8afb9..1e8cc8c 100644 --- a/lib/win32/certstore.rb +++ b/lib/win32/certstore.rb @@ -118,7 +118,7 @@ def add_finalizer(certstore_handler) end def self.finalize(certstore_handler) - proc { puts "DESTROY OBJECT #{certstore_handler}" } + proc { "#{certstore_handler}" } end # To close all open certificate store at the end From c86e3c1d4bb19bc7add40938d4927d230ae92778 Mon Sep 17 00:00:00 2001 From: piyushawasthi Date: Mon, 11 Jun 2018 00:53:03 -0700 Subject: [PATCH 2/2] Fixes for ruby 2.0 Signed-off-by: piyushawasthi --- lib/win32/certstore/mixin/assertions.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/win32/certstore/mixin/assertions.rb b/lib/win32/certstore/mixin/assertions.rb index e9aed84..fcfba97 100644 --- a/lib/win32/certstore/mixin/assertions.rb +++ b/lib/win32/certstore/mixin/assertions.rb @@ -22,7 +22,7 @@ module Mixin module Assertions # Validate certificate store name def validate_store(store_name) - unless valid_store_name.include?(store_name&.upcase) + unless valid_store_name.include?(store_name.to_s.upcase) raise ArgumentError, "Invalid Certificate Store." end end @@ -82,7 +82,7 @@ def lookup_error(failed_operation = nil) # ROOT -> Root certificates. # SPC -> Software Publisher Certificate. def valid_store_name - %w{MY CA ROOT SPC} + %w{MY CA ROOT AUTHROOT DISALLOWED SPC TRUST TRUSTEDPEOPLE TRUSTEDPUBLISHER CLIENTAUTHISSUER TRUSTEDDEVICES SMARTCARDROOT WEBHOSTING REMOTE\ DESKTOP} end end end