diff options
| author | Brice Figureau <brice-puppet@daysofwonder.com> | 2009-12-28 19:41:24 +0100 |
|---|---|---|
| committer | James Turnbull <james@lovedthanlost.net> | 2010-01-18 23:17:21 +1100 |
| commit | a9fb82b0026e75a670fec553b17de3b0f091c2a5 (patch) | |
| tree | 26ef68872617a636115ff10dea90e1f71d776a88 /lib/puppet/application | |
| parent | a967b93a51ce509cf8631d78b8be8d4ab6da5657 (diff) | |
| download | puppet-a9fb82b0026e75a670fec553b17de3b0f091c2a5.tar.gz puppet-a9fb82b0026e75a670fec553b17de3b0f091c2a5.tar.xz puppet-a9fb82b0026e75a670fec553b17de3b0f091c2a5.zip | |
Feature #2839 - fingerprint certificate
This patch adds two things:
* certificate fingerprinting in --list mode
* a puppetca action called "--fingerprint" to display fingerprints
of given certificates
It is also possible to use --digest to specify a specific digest
algorithm.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
Diffstat (limited to 'lib/puppet/application')
| -rw-r--r-- | lib/puppet/application/puppetca.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/puppet/application/puppetca.rb b/lib/puppet/application/puppetca.rb index adc1a6ff5..6ef867762 100644 --- a/lib/puppet/application/puppetca.rb +++ b/lib/puppet/application/puppetca.rb @@ -6,7 +6,7 @@ Puppet::Application.new(:puppetca) do should_parse_config - attr_accessor :mode, :all, :ca + attr_accessor :mode, :all, :ca, :digest def find_mode(opt) modes = Puppet::SSL::CertificateAuthority::Interface::INTERFACE_METHODS @@ -22,6 +22,10 @@ Puppet::Application.new(:puppetca) do @all = true end + option("--digest DIGEST", "-d") do |arg| + @digest = arg + end + option("--debug", "-d") do |arg| Puppet::Util::Log.level = :debug end @@ -44,7 +48,7 @@ Puppet::Application.new(:puppetca) do end begin @ca.apply(:revoke, :to => hosts) if @mode == :destroy - @ca.apply(@mode, :to => hosts) + @ca.apply(@mode, :to => hosts, :digest => @digest) rescue => detail puts detail.backtrace if Puppet[:trace] puts detail.to_s |
