summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn McCrae <john.mccrae@progress.com>2022-06-07 15:25:03 -0700
committerJohn McCrae <john.mccrae@progress.com>2022-06-07 15:25:03 -0700
commita09857ed3a35a02e026e2d4f9fe4a37820d40e7f (patch)
treed80fd630c7fa31c7c4dabc415844d945797ac4c2
parent900a0ec61d64ce6908b83732b831213a1898558f (diff)
downloadchef-a09857ed3a35a02e026e2d4f9fe4a37820d40e7f.tar.gz
correcting for linting error
Signed-off-by: John McCrae <john.mccrae@progress.com>
-rw-r--r--lib/chef/http/authenticator.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/http/authenticator.rb b/lib/chef/http/authenticator.rb
index 23d7b0024b..c795297397 100644
--- a/lib/chef/http/authenticator.rb
+++ b/lib/chef/http/authenticator.rb
@@ -188,7 +188,7 @@ class Chef
unless @win32registry.key_exists?(new_path)
@win32registry.create_key(new_path, true)
end
- require "securerandom"
+ require "securerandom" unless defined?(SecureRandom)
size = 14
password = SecureRandom.alphanumeric(size)
encrypted_pass = encrypt_pfx_pass(password)