]> git.openstreetmap.org Git - chef.git/commitdiff
Add osmfoundation.org certificate
authorTom Hughes <tom@compton.nu>
Mon, 23 Feb 2015 10:36:29 +0000 (10:36 +0000)
committerTom Hughes <tom@compton.nu>
Mon, 23 Feb 2015 10:40:05 +0000 (10:40 +0000)
cookbooks/civicrm/recipes/default.rb
cookbooks/ssl/files/default/crm.osmfoundation.pem [deleted file]
cookbooks/ssl/files/default/osmfoundation.pem [new file with mode: 0644]
cookbooks/ssl/files/default/startcom.pem [new file with mode: 0644]
cookbooks/ssl/recipes/default.rb
cookbooks/wordpress/providers/site.rb
cookbooks/wordpress/resources/site.rb
cookbooks/wordpress/templates/default/apache.erb

index 7865752e36edc591c8948905e5ec1837b8d79b7a..33005cb03a113f071c73e840ef58da443f5fa8ff 100644 (file)
@@ -17,7 +17,7 @@
 # limitations under the License.
 #
 
 # limitations under the License.
 #
 
-node.default[:ssl][:certificates] = node[:ssl][:certificates] | ["crm.osmfoundation"]
+node.default[:ssl][:certificates] = node[:ssl][:certificates] | ["osmfoundation"]
 
 include_recipe "wordpress"
 include_recipe "mysql"
 
 include_recipe "wordpress"
 include_recipe "mysql"
@@ -39,7 +39,8 @@ end
 
 wordpress_site "crm.osmfoundation.org" do
   ssl_enabled true
 
 wordpress_site "crm.osmfoundation.org" do
   ssl_enabled true
-  ssl_certificate "crm.osmfoundation"
+  ssl_certificate "osmfoundation"
+  ssl_certificate_chain "startcom"
   database_name "civicrm"
   database_user "civicrm"
   database_password database_password
   database_name "civicrm"
   database_user "civicrm"
   database_password database_password
diff --git a/cookbooks/ssl/files/default/crm.osmfoundation.pem b/cookbooks/ssl/files/default/crm.osmfoundation.pem
deleted file mode 100644 (file)
index 3626197..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIFATCCAumgAwIBAgIDAlJkMA0GCSqGSIb3DQEBCwUAMFQxFDASBgNVBAoTC0NB
-Y2VydCBJbmMuMR4wHAYDVQQLExVodHRwOi8vd3d3LkN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c4sUFSHDGFH3
-bcwAUfOPTE741G+ir+1yltakfAoRWbf7wJWFaFIzJjSsEYbx9x4eoeeU+J0vGLHT
-1yXty57WWtclH1UoSte+1dqec0Gj949DOgMczygeiC25VrNyEnHw8SZudLLNDQIX
-4GNd0n02gKzyjipG4bRPXlyjfARF3OxZr/A2jgOzcAwPJmVWmORckpw5fWtTf1Kj
-D2cFgNRjzdHnGX1R77PdtXqsEPnap6f1W74H+PT3s1vIkqwT+meRqQITeIxAsu2B
-Ytk2ogRgWcqosb+SU4pQwvL/BeQocCdWZLt5wIkAuJjUvtVRl2WDJu+4ODT0Fjq0
-tveXh1C5uZAKPtTo97osvK9YsLVCwfrz+qTAUlVnZXBekmLsX8YslNdMP00P44oP
-zSdv2jEu1oFJR28epu77wz85WWo6Dam18xsSA8LE2ZPmi+xyCGuBTBpaP7yTCarh
-jOqt/dWOeWSgtXFmzGvhHet+k7bzzyITMHxBrSyIl+T97h50tbY1UB0x5vx6bU9F
-0izvC+d5RULNW240ZMsbcPx983USj9+4dUAJ5P9FMqtWcqWYLQ==
------END CERTIFICATE-----
diff --git a/cookbooks/ssl/files/default/osmfoundation.pem b/cookbooks/ssl/files/default/osmfoundation.pem
new file mode 100644 (file)
index 0000000..fae3688
--- /dev/null
@@ -0,0 +1,49 @@
+-----BEGIN CERTIFICATE-----
+MIIIzDCCB7SgAwIBAgIHBsLao8VPUzANBgkqhkiG9w0BAQsFADCBjDELMAkGA1UE
+BhMCSUwxFjAUBgNVBAoTDVN0YXJ0Q29tIEx0ZC4xKzApBgNVBAsTIlNlY3VyZSBE
+aWdpdGFsIENlcnRpZmljYXRlIFNpZ25pbmcxODA2BgNVBAMTL1N0YXJ0Q29tIENs
+YXNzIDIgUHJpbWFyeSBJbnRlcm1lZGlhdGUgU2VydmVyIENBMB4XDTE1MDIyMTAz
+MDg1OFoXDTE3MDIyMTAwNDk1OFowgacxCzAJBgNVBAYTAkdCMRMwEQYDVQQIEwpC
+aXJtaW5naGFtMRkwFwY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CBjgYIKwYBBQUHAQEEgYEwfzA5BggrBgEF
+BQcwAYYtaHR0cDovL29jc3Auc3RhcnRzc2wuY29tL3N1Yi9jbGFzczIvc2VydmVy
+L2NhMEIGCCsGAQUFBzAChjZodHRwOi8vYWlhLnN0YXJ0c3NsLmNvbS9jZXJ0cy9z
+dWIuY2xhc3MyLnNlcnZlci5jYS5jcnQwIwYDVR0SBBwwGoYYaHR0cDovL3d3dy5z
+dGFydHNzbC5jb20vMA0GCSqGSIb3DQEBCwUAA4IBAQAfe1P5cQXxgiaT2kNBIkCF
+LVIu8UCZnpkipshwuL8+TXQ0HGUC10Mw/sg6bSAMkBhtE7ffypBlgmI49FHmekae
+eAwygd1uubzInmtrXWhpNmQ3M4W53RJlOeU98TMkJiUcqx2kqBFyYbvT2G6u2nxQ
+6U9ytr2VZF59iQ9tE9hDM+aqVPjMQdk45TKdraDu1MW0Q/zRPBp+FLn7+nl83Zdd
+HEk0+GC4+fU4L5luprtmlkSESA2+beQ613OzKcwYMfClPCRTTooJbgK1OShRCgYm
+gqEPJj20V0So8A1pTcLB2VQ68Fwrj5ckqJrjXN1djneWcnIFzEG9UvJlCKxd2pPc
+-----END CERTIFICATE-----
diff --git a/cookbooks/ssl/files/default/startcom.pem b/cookbooks/ssl/files/default/startcom.pem
new file mode 100644 (file)
index 0000000..dbaeda6
--- /dev/null
@@ -0,0 +1,34 @@
+-----BEGIN CERTIFICATE-----
+MIIF2TCCA8GgAwIBAgIHHKs2Ry2cUTANBgkqhkiG9w0BAQsFADB9MQswCQYDVQQG
+EwJJTDEWMBQGA1UEChMNU3RhcnRDb20gTHRkLjErMCkGA1UECxMiU2VjdXJlIERp
+Z2l0YWwgQ2VydGlmaWNhdGUgU2lnbmluZzEpMCcGA1UEAxMgU3RhcnRDb20gQ2Vy
+dGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDcxMDE0MjA1NzA5WhcNMjIxMDE0MjA1
+NzA5WjCBjDELMAkGA1UEBhMCSUwxFjAUBgN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yb3zvcv566LEMsqGcvzPv6cw
+tf2R99WB4SEErQBM/+mLJ9r/8iTN/B8Pf9LR5YGSI3gW7msDLp0ASE+ugmUuh2/u
+agdfS1Zu95ZGQebd/kW5Yiqainbprb3Wc7O8MSvQLNVsa7xqOiWHqailDdeF8Wxs
+BQ70wWjLuyqBWKU+mcSf9x+EjqB60U3buAGcDYE0yoL+I2JNP22kUsBMXvJpSLHy
+36xEZGmwRinHrfDywJ1oI4qoZ3EiF77OiXp2vlRsk1yL8Bpuru2OrsIFrhNX5rnn
+cMgzuJ79SjDjmNQTa+5Ouebs387qoJ52apeq6t80RUL12k3Wh3Zt/85phnqBX9uy
+T86w4GdgOUSwRRCFZZcSed/Ul9h4IQyEmM67T2sPGdqFaZFBbBccxrn2FK7yoYB6
+4umV7yKKzP842/whVuyA/W2ihZEpA+qrA70sYESCADXnFGx2O0CDVdVc38coo1nV
+iXg+D+AG/dVXiiQcp2I4HYWTS/mTf/NE+mOYnu0miZ32/vhDbCX/B/kSPJ4RsNOA
+7uyrOwykcgOSFDbpvuaKOpGLrQwGqLODgm+p9TY5giMMjur9XH7TS1wz02dIz07u
+y2NwYWdV67vcnAt6QxRISap5RbaPviyQZxz4nFaSlTAwHoPaW1yuVS11tmsROMlR
+RNvbaAxIU4U67YaZSw==
+-----END CERTIFICATE-----
index c2e62d2288659f1adef5ab132ce5e2cdccdef5e5..f5239e67bf394e0a01f09647c03afeae9726d2f7 100644 (file)
@@ -22,14 +22,16 @@ keys = data_bag_item("ssl", "keys")
 package "openssl"
 package "ssl-cert"
 
 package "openssl"
 package "ssl-cert"
 
-cookbook_file "/etc/ssl/certs/rapidssl.pem" do
-  owner "root"
-  group "root"
-  mode 0444
-  backup false
+%w(rapidssl startcom).each do |certificate|
+  cookbook_file "/etc/ssl/certs/#{certificate}.pem" do
+    owner "root"
+    group "root"
+    mode 0444
+    backup false
+  end
 end
 
 end
 
-["openstreetmap", "tile.openstreetmap", "crm.osmfoundation"].each do |certificate|
+["openstreetmap", "tile.openstreetmap", "osmfoundation"].each do |certificate|
   if node[:ssl][:certificates].include?(certificate)
     cookbook_file "/etc/ssl/certs/#{certificate}.pem" do
       owner "root"
   if node[:ssl][:certificates].include?(certificate)
     cookbook_file "/etc/ssl/certs/#{certificate}.pem" do
       owner "root"
index 9ed0697c2c9b206c57b66d1b87f8c90592ccc93e..d5d6eb3c371119a900ac1be6df90d5e4f8b9f758 100644 (file)
@@ -131,7 +131,8 @@ action :create do
     variables :aliases => Array(new_resource.aliases),
               :urls => new_resource.urls,
               :ssl_enabled => new_resource.ssl_enabled,
     variables :aliases => Array(new_resource.aliases),
               :urls => new_resource.urls,
               :ssl_enabled => new_resource.ssl_enabled,
-              :ssl_certificate => new_resource.ssl_certificate
+              :ssl_certificate => new_resource.ssl_certificate,
+              :ssl_certificate_chain => new_resource.ssl_certificate_chain
     reload_apache false
   end
 
     reload_apache false
   end
 
index 4e712da34b0b4e749f8657f80e013f99c313828c..9b5e4dabfb503799bba99071b09386c3412a608d 100644 (file)
@@ -30,6 +30,7 @@ attribute :database_password, :kind_of => String, :required => true
 attribute :database_prefix, :kind_of => String, :default => "wp_"
 attribute :ssl_enabled, :kind_of => [TrueClass, FalseClass], :default => false
 attribute :ssl_certificate, :kind_of => String
 attribute :database_prefix, :kind_of => String, :default => "wp_"
 attribute :ssl_enabled, :kind_of => [TrueClass, FalseClass], :default => false
 attribute :ssl_certificate, :kind_of => String
+attribute :ssl_certificate_chain, :kind_of => String
 attribute :urls, :kind_of => Hash, :default => {}
 attribute :reload_apache, :kind_of => [TrueClass, FalseClass], :default => true
 
 attribute :urls, :kind_of => Hash, :default => {}
 attribute :reload_apache, :kind_of => [TrueClass, FalseClass], :default => true
 
index 3d0b97ade6042fb3f26a17de916c49acf66facc5..95ea84ff77949a9e7b838b51fff25271ee335164 100644 (file)
@@ -31,6 +31,9 @@
   SSLCertificateFile /etc/ssl/certs/<%= @ssl_certificate %>.pem
   SSLCertificateKeyFile /etc/ssl/private/<%= @ssl_certificate %>.key
 <% end -%>
   SSLCertificateFile /etc/ssl/certs/<%= @ssl_certificate %>.pem
   SSLCertificateKeyFile /etc/ssl/private/<%= @ssl_certificate %>.key
 <% end -%>
+<% if @ssl_certificate -%>
+  SSLCertificateChainFile /etc/ssl/certs/<%= @ssl_certificate_chain %>.pem
+<% end -%>
 
   CustomLog /var/log/apache2/<%= @name %>-access.log combined
   ErrorLog /var/log/apache2/<%= @name %>-error.log
 
   CustomLog /var/log/apache2/<%= @name %>-access.log combined
   ErrorLog /var/log/apache2/<%= @name %>-error.log