Fixes to TLS ODL keystore provider 95/66995/2
authorTim Rozet <trozet@redhat.com>
Tue, 9 Jan 2018 21:22:04 +0000 (16:22 -0500)
committerTim Rozet <trozet@redhat.com>
Thu, 11 Jan 2018 03:01:23 +0000 (03:01 +0000)
commitbc0a7a960679c92ea83127e1925f38273b6de9d3
tree5da8635c72f3077c4cb10da495fb490b865fd123
parentd37427e6ef5ac0e40ee841c46409d50ae0a570e3
Fixes to TLS ODL keystore provider

File exist checks were done in in the odl_keystore type.  Checks within
a type are done before puppet is applied.  Therefore the file has to
exist before puppet is ran, which excludes another puppet resource from
being able to create the files at run time.

The JKS provider for the keystore was incorrectly passing the CA
certificate as a file to create the p12 keystore, instead of as a X509
certificate object.

Changes Include:
 - Checks to ensure key files, ca cert, and public cert are moved from
   the type into the jks provider.
 - CA cert is now correctly created as and OpenSSL:X509 object before
   being passed into the p12 keystore create.

Change-Id: Iaf3e66fa44dee3987817177e2210230ee2d3325c
Signed-off-by: Tim Rozet <trozet@redhat.com>
lib/puppet/provider/odl_keystore/jks.rb
lib/puppet/type/odl_keystore.rb