Signed-off-by: James Turnbull <[EMAIL PROTECTED]>
---
 lib/puppet/sslcertificates/ca.rb |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/lib/puppet/sslcertificates/ca.rb b/lib/puppet/sslcertificates/ca.rb
index 7386318..2237849 100644
--- a/lib/puppet/sslcertificates/ca.rb
+++ b/lib/puppet/sslcertificates/ca.rb
@@ -379,9 +379,14 @@ class Puppet::SSLCertificates::CA
     def sign_with_key(signable, digest = OpenSSL::Digest::SHA1.new)
         cakey = nil
         if @config[:password]
-            cakey = OpenSSL::PKey::RSA.new(
-                File.read(@config[:cakey]), @config[:password]
-            )
+            begin
+                cakey = OpenSSL::PKey::RSA.new(
+                    File.read(@config[:cakey]), @config[:password]
+                )
+            rescue
+                raise Puppet::Error,
+                    "Decrypt of CA private key with password stored in 
@config[:capass] not possible"
+            end
         else
             cakey = OpenSSL::PKey::RSA.new(
                 File.read(@config[:cakey])
-- 
1.5.3.3


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to