summaryrefslogtreecommitdiffstats
path: root/lib/puppet/sslcertificates
diff options
context:
space:
mode:
authorIan Taylor <ian@lorf.org>2009-06-05 12:39:04 -0400
committerJames Turnbull <james@lovedthanlost.net>2009-06-06 09:12:00 +1000
commit4f2c066a97e59a89df64af4b25beac6f3f0553c2 (patch)
tree126540beec3c65448e01e1b48d27275ec4ee6ea4 /lib/puppet/sslcertificates
parent97e6975d69f239e24993315a25a3117b1daa48c3 (diff)
downloadpuppet-4f2c066a97e59a89df64af4b25beac6f3f0553c2.tar.gz
puppet-4f2c066a97e59a89df64af4b25beac6f3f0553c2.tar.xz
puppet-4f2c066a97e59a89df64af4b25beac6f3f0553c2.zip
Removed extra whitespace from end of lines
Diffstat (limited to 'lib/puppet/sslcertificates')
-rw-r--r--lib/puppet/sslcertificates/ca.rb30
-rw-r--r--lib/puppet/sslcertificates/certificate.rb6
-rw-r--r--lib/puppet/sslcertificates/inventory.rb6
3 files changed, 21 insertions, 21 deletions
diff --git a/lib/puppet/sslcertificates/ca.rb b/lib/puppet/sslcertificates/ca.rb
index 2a16a32ba..b0bcdb612 100644
--- a/lib/puppet/sslcertificates/ca.rb
+++ b/lib/puppet/sslcertificates/ca.rb
@@ -31,7 +31,7 @@ class Puppet::SSLCertificates::CA
[file, detail]
end
end
-
+
end
end
@@ -39,7 +39,7 @@ class Puppet::SSLCertificates::CA
File.join(Puppet[:csrdir], [hostname.downcase, "pem"].join("."))
end
- # this stores signed certs in a directory unrelated to
+ # this stores signed certs in a directory unrelated to
# normal client certs
def host2certfile(hostname)
File.join(Puppet[:signeddir], [hostname.downcase, "pem"].join("."))
@@ -142,15 +142,15 @@ class Puppet::SSLCertificates::CA
}
end
- # List signed certificates. This returns a list of hostnames, not actual
- # files -- the names can be converted to full paths with host2csrfile.
- def list_signed
- return Dir.entries(Puppet[:signeddir]).find_all { |file|
- file =~ /\.pem$/
- }.collect { |file|
- file.sub(/\.pem$/, '')
- }
- end
+ # List signed certificates. This returns a list of hostnames, not actual
+ # files -- the names can be converted to full paths with host2csrfile.
+ def list_signed
+ return Dir.entries(Puppet[:signeddir]).find_all { |file|
+ file =~ /\.pem$/
+ }.collect { |file|
+ file.sub(/\.pem$/, '')
+ }
+ end
# Create the root certificate.
def mkrootcert
@@ -207,7 +207,7 @@ class Puppet::SSLCertificates::CA
@crl.add_revoked(revoked)
store_crl
end
-
+
# Take the Puppet config and store it locally.
def setconfig(hash)
@config = {}
@@ -306,7 +306,7 @@ class Puppet::SSLCertificates::CA
end
end
- # TTL for new certificates in seconds. If config param :ca_ttl is set,
+ # TTL for new certificates in seconds. If config param :ca_ttl is set,
# use that, otherwise use :ca_days for backwards compatibility
def ttl
days = @config[:ca_days]
@@ -337,7 +337,7 @@ class Puppet::SSLCertificates::CA
end
end
end
-
+
private
def init_crl
if FileTest.exists?(@config[:cacrl])
@@ -355,7 +355,7 @@ class Puppet::SSLCertificates::CA
@crl
end
end
-
+
def store_crl
# Increment the crlNumber
e = @crl.extensions.find { |e| e.oid == 'crlNumber' }
diff --git a/lib/puppet/sslcertificates/certificate.rb b/lib/puppet/sslcertificates/certificate.rb
index f348cdcb8..191f553b0 100644
--- a/lib/puppet/sslcertificates/certificate.rb
+++ b/lib/puppet/sslcertificates/certificate.rb
@@ -98,9 +98,9 @@ class Puppet::SSLCertificates::Certificate
@encrypt = hash[:encrypt] || false
@replace = hash[:replace] || false
@issuer = hash[:issuer] || nil
-
+
if hash.include?(:type)
- case hash[:type]
+ case hash[:type]
when :ca, :client, :server; @type = hash[:type]
else
raise "Invalid Cert type %s" % hash[:type]
@@ -168,7 +168,7 @@ class Puppet::SSLCertificates::Certificate
# case p
# when 0; Puppet.info "key info: ." # BN_generate_prime
# when 1; Puppet.info "key info: +" # BN_generate_prime
-# when 2; Puppet.info "key info: *" # searching good prime,
+# when 2; Puppet.info "key info: *" # searching good prime,
# # n = #of try,
# # but also data from BN_generate_prime
# when 3; Puppet.info "key info: \n" # found good prime, n==0 - p, n==1 - q,
diff --git a/lib/puppet/sslcertificates/inventory.rb b/lib/puppet/sslcertificates/inventory.rb
index 295c416cb..b86ee0b90 100644
--- a/lib/puppet/sslcertificates/inventory.rb
+++ b/lib/puppet/sslcertificates/inventory.rb
@@ -4,7 +4,7 @@ module Puppet::SSLCertificates
module Inventory
# Add CERT to the inventory of issued certs in '$cadir/inventory.txt'
- # If no inventory exists yet, build an inventory and list all the
+ # If no inventory exists yet, build an inventory and list all the
# certificates that have been signed so far
def self.add(cert)
inited = false
@@ -30,8 +30,8 @@ module Puppet::SSLCertificates
def self.format(cert)
iso = '%Y-%m-%dT%H:%M:%S%Z'
- return "0x%04x %s %s %s" % [cert.serial,
- cert.not_before.strftime(iso),
+ return "0x%04x %s %s %s" % [cert.serial,
+ cert.not_before.strftime(iso),
cert.not_after.strftime(iso),
cert.subject]
end