Skip to content

Commit

Permalink
Merge pull request #593 from prehor/fix/pkcs8-encrypted-private-key
Browse files Browse the repository at this point in the history
Add support for PKCS#8 format to X509PrivateKey#encrypted?
  • Loading branch information
mizzy authored Aug 4, 2017
2 parents 7563092 + 4a52e18 commit 6e22e9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/serverspec/type/x509_private_key.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def valid?
end

def encrypted?
@runner.run_command("grep -wq \"^Proc-Type.*ENCRYPTED$\" #{name}").exit_status == 0
@runner.run_command("grep -Ewq \"^(Proc-Type.*ENCRYPTED|-----BEGIN ENCRYPTED PRIVATE KEY-----)$\" #{name}").exit_status == 0
end

def has_matching_certificate?(cert_file)
Expand Down

0 comments on commit 6e22e9e

Please sign in to comment.