summaryrefslogtreecommitdiffstats
path: root/spec/integration
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-04-19 14:50:18 -0500
committerLuke Kanies <luke@madstop.com>2008-04-19 14:50:18 -0500
commit809fc77bc767fb3acabc83d55183686200b1e384 (patch)
tree26f0fa4954f693168f7f366c5ea8653531de3ac6 /spec/integration
parent16056a24c65a7c6485b65f15700ff3971781031b (diff)
Finishing the interface between the CA and the CRL.
Certificate revocation now works, the CA knows how to generate the CRL, and the SSL::Host class knows how to configure the CRL class for indirection.
Diffstat (limited to 'spec/integration')
-rwxr-xr-xspec/integration/ssl/certificate_authority.rb16
1 files changed, 15 insertions, 1 deletions
diff --git a/spec/integration/ssl/certificate_authority.rb b/spec/integration/ssl/certificate_authority.rb
index 9d331ac91..d70800737 100755
--- a/spec/integration/ssl/certificate_authority.rb
+++ b/spec/integration/ssl/certificate_authority.rb
@@ -18,7 +18,7 @@ describe Puppet::SSL::CertificateAuthority do
Puppet.settings[:confdir] = @dir
Puppet.settings[:vardir] = @dir
- Puppet::SSL::Host.ca_location = :only
+ Puppet::SSL::Host.ca_location = :local
@ca = Puppet::SSL::CertificateAuthority.new
end
@@ -44,6 +44,20 @@ describe Puppet::SSL::CertificateAuthority do
@ca.host.certificate.should be_instance_of(Puppet::SSL::Certificate)
end
+ it "should be able to generate a new host certificate" do
+ @ca.generate("newhost")
+
+ Puppet::SSL::Certificate.find("newhost").should be_instance_of(Puppet::SSL::Certificate)
+ end
+
+ it "should be able to revoke a host certificate" do
+ @ca.generate("newhost")
+
+ @ca.revoke("newhost")
+
+ lambda { @ca.verify("newhost") }.should raise_error
+ end
+
describe "when signing certificates" do
before do
@host = Puppet::SSL::Host.new("luke.madstop.com")