Skip to content

Commit

Permalink
Export cert in PEM format to fix tests that broke in Trusty travis wo…
Browse files Browse the repository at this point in the history
…rkers
  • Loading branch information
eheydrick authored and majormoses committed Sep 26, 2017
1 parent fc68b08 commit 1550f5e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
- `check-ssl-hsts-preload.rb`: Added check for testing preload status of HSTS
- `check-ssl-hsts-preloadable.rb`: Added check for testing if a domain can be HSTS preloaded

### Fixed
- `check-java-keystore-cert.rb`: Export cert in PEM format to fix tests that broke going from Precise to Trusty travis workers (@eheydrick)

## [1.4.0] - 2017-06-20
### Added
- `check-ssl-anchor.rb`: Add check for a specific root certificate signature. (@pgporada)
Expand Down
4 changes: 2 additions & 2 deletions bin/check-java-keystore-cert.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ class CheckJavaKeystoreCert < Sensu::Plugin::Check::CLI
def certificate_expiration_date
result = `keytool -keystore #{Shellwords.escape(config[:path])} \
-export -alias #{Shellwords.escape(config[:alias])} \
-storepass #{Shellwords.escape(config[:password])} 2>&1 | \
openssl x509 -enddate -inform der -noout 2>&1`
-storepass #{Shellwords.escape(config[:password])} -rfc 2>&1 | \
openssl x509 -enddate -noout 2>&1`

# rubocop:disable Style/SpecialGlobalVars
unknown 'could not get certificate from keystore' unless $?.success?
Expand Down

0 comments on commit 1550f5e

Please sign in to comment.