From 672e281c62cdae3fc9e675b0850465c61cbff5df Mon Sep 17 00:00:00 2001 From: luke Date: Tue, 27 Feb 2007 22:14:56 +0000 Subject: Fixing #142. As expected, trivial. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2232 980ebf18-57e1-0310-9a29-db15c13687c0 --- lib/puppet/sslcertificates/ca.rb | 3 +++ test/certmgr/ca.rb | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/lib/puppet/sslcertificates/ca.rb b/lib/puppet/sslcertificates/ca.rb index ea3822015..42ad57e48 100644 --- a/lib/puppet/sslcertificates/ca.rb +++ b/lib/puppet/sslcertificates/ca.rb @@ -243,6 +243,9 @@ class Puppet::SSLCertificates::CA Puppet.config.write(:cacert) do |f| f.puts @cert.to_pem end + Puppet.config.write(:capub) do |f| + f.puts @cert.public_key + end return cert end diff --git a/test/certmgr/ca.rb b/test/certmgr/ca.rb index d01725970..aca674f02 100755 --- a/test/certmgr/ca.rb +++ b/test/certmgr/ca.rb @@ -67,6 +67,15 @@ class TestCA < Test::Unit::TestCase assert_equal(list.sort, ca.list.sort, "list was not correct") end + + # #142 - test storing the public key + def test_store_public_key + ca = mkca + assert_nothing_raised do + ca.mkrootcert + end + assert(FileTest.exists?(Puppet[:capub]), "did not store public key") + end end # $Id$ -- cgit