summaryrefslogtreecommitdiffstats
path: root/test/network/client
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-06-18 19:51:17 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-06-18 19:51:17 +0000
commit2d07334c9b4e8bf06af5c4fc046984f26b4167ac (patch)
tree144466dd3563255d7b2272aff89a20459b3692f4 /test/network/client
parent6e16d9feb1468aae964115833a223cd07c37036e (diff)
downloadpuppet-2d07334c9b4e8bf06af5c4fc046984f26b4167ac.tar.gz
puppet-2d07334c9b4e8bf06af5c4fc046984f26b4167ac.tar.xz
puppet-2d07334c9b4e8bf06af5c4fc046984f26b4167ac.zip
Modifying the CA server so that it will not send back a cert whose public key does not match the csr. We have been getting a lot of instances of this, so this should cut down that problem.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2612 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test/network/client')
-rwxr-xr-xtest/network/client/ca.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/network/client/ca.rb b/test/network/client/ca.rb
index 0fdbda537..26fb72f40 100755
--- a/test/network/client/ca.rb
+++ b/test/network/client/ca.rb
@@ -2,6 +2,7 @@
$:.unshift("../../lib") if __FILE__ =~ /\.rb$/
+require 'mocha'
require 'puppettest'
require 'puppet/network/client/ca'
require 'puppet/sslcertificates/support'
@@ -48,6 +49,7 @@ class TestClientCA < Test::Unit::TestCase
File.unlink(Puppet[:hostprivkey])
@client = Puppet::Network::Client.ca.new :CA => @ca
+ @ca.expects(:getcert).returns("yay") # not a valid cert
# Now make sure it fails, since we'll get the old cert but have new keys
assert_raise(Puppet::Network::Client::CA::InvalidCertificate, "Did not fail on invalid cert") do
@client.request_cert