diff options
Diffstat (limited to 'lib/puppet/sslcertificates.rb')
-rwxr-xr-x | lib/puppet/sslcertificates.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/puppet/sslcertificates.rb b/lib/puppet/sslcertificates.rb index d543c5200..9196da61b 100755 --- a/lib/puppet/sslcertificates.rb +++ b/lib/puppet/sslcertificates.rb @@ -1,14 +1,19 @@ # The library for manipulating SSL certs. require 'puppet' -require 'openssl' + +begin + require 'openssl' +rescue LoadError + raise Puppet::Error, "You must have the Ruby openssl library installed" +end module Puppet module SSLCertificates def self.mkdir(dir) # this is all a bunch of stupid hackery unless FileTest.exists?(dir) - comp = Puppet::Type::Component.create( + comp = Puppet.type(:component).create( :name => "certdir creation" ) path = [''] |