Sha256: f5ff250a5a3f36e77eaa439d1f4b4a8b4901f1a14b545fa1e1dba22df6c02ade
Contents?: true
Size: 454 Bytes
Versions: 96
Compression:
Stored size: 454 Bytes
Contents
module PkeyReader def read_pkey(filecontent, passphrase) raise_if_default(passphrase) OpenSSL::PKey.read(filecontent, passphrase) rescue OpenSSL::PKey::PKeyError raise Inspec::Exceptions::ResourceFailed, 'passphrase error' end def raise_if_default(passphrase) if passphrase.is_a? Inspec::Attribute::DEFAULT_ATTRIBUTE raise Inspec::Exceptions::ResourceFailed, 'Please provide default value for attribute' end end end
Version data entries
96 entries across 96 versions & 2 rubygems