<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -160,8 +160,12 @@ module Puppet
     end
 
     Puppet.setdefaults(:ssl,
-        :certname =&gt; [fqdn, &quot;The name to use when handling certificates.  Defaults
-            to the fully qualified domain name.&quot;],
+        # We have to downcase the fqdn, because the current ssl stuff (as oppsed to in master) doesn't have good facilities for 
+        # manipulating naming.
+        :certname =&gt; {:default =&gt; fqdn.downcase, :desc =&gt; &quot;The name to use when handling certificates.  Defaults
+            to the fully qualified domain name.&quot;,
+            :call_on_define =&gt; true, # Call our hook with the default value, so we're always downcased
+            :hook =&gt; proc { |value| raise(ArgumentError, &quot;Certificate names must be lower case; see #1168&quot;) unless value == value.downcase }},
         :certdnsnames =&gt; ['', &quot;The DNS names on the Server certificate as a colon-separated list.
             If it's anything other than an empty string, it will be used as an alias in the created
             certificate.  By default, only the server gets an alias set up, and only for 'puppet'.&quot;],</diff>
      <filename>lib/puppet/defaults.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,8 +5,9 @@ require File.dirname(__FILE__) + '/../spec_helper'
 require 'puppet/defaults'
 
 describe &quot;Puppet defaults&quot; do
+    after { Puppet.settings.clear }
+
     describe &quot;when setting the :factpath&quot; do
-        after { Puppet.settings.clear }
 
         it &quot;should add the :factpath to Facter's search paths&quot; do
             Facter.expects(:search).with(&quot;/my/fact/path&quot;)
@@ -14,4 +15,9 @@ describe &quot;Puppet defaults&quot; do
             Puppet.settings[:factpath] = &quot;/my/fact/path&quot;
         end
     end
+    describe &quot;when setting the :certname&quot; do
+        it &quot;should fail if the certname is not downcased&quot; do
+            lambda { Puppet.settings[:certname] = &quot;Host.Domain.Com&quot; }.should raise_error(ArgumentError)
+        end
+    end
 end</diff>
      <filename>spec/integration/defaults.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>6b69a86e48be082a6d03ce69f2700c4c874e222f</id>
    </parent>
    <parent>
      <id>5273b22b4fda6f9aa7a8366a1dfbae092594d391</id>
    </parent>
  </parents>
  <author>
    <name>Luke Kanies</name>
    <email>luke@madstop.com</email>
  </author>
  <url>http://github.com/shadoi/puppet/commit/49016bb29312bfeb6f41ce420159e6ffc477eebe</url>
  <id>49016bb29312bfeb6f41ce420159e6ffc477eebe</id>
  <committed-date>2008-06-16T08:56:55-07:00</committed-date>
  <authored-date>2008-06-16T08:56:55-07:00</authored-date>
  <message>Merge branch '0.24.x'

Conflicts:

	CHANGELOG
	lib/puppet/defaults.rb
	spec/integration/defaults.rb</message>
  <tree>7ce6fcf5f2c37519617915a3e79d487bdf5296ce</tree>
  <committer>
    <name>Luke Kanies</name>
    <email>luke@madstop.com</email>
  </committer>
</commit>
