Skip to content

Commit 18c0279

Browse files
committed
Check for SSL server instead of server purpose
1 parent c24f7e3 commit 18c0279

File tree

5 files changed

+19
-19
lines changed

5 files changed

+19
-19
lines changed

spec/acceptance/apache_spec.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
describe x509_certificate('/etc/pki/katello/certs/katello-apache.crt') do
1919
it { should be_certificate }
2020
it { should be_valid }
21-
it { should have_purpose 'server' }
21+
it { should have_purpose 'SSL server' }
2222
its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}/) }
2323
its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}/) }
2424
its(:keylength) { should be >= 4096 }
@@ -33,7 +33,7 @@
3333
describe x509_certificate("/root/ssl-build/#{fact('fqdn')}/#{fact('fqdn')}-apache.crt") do
3434
it { should be_certificate }
3535
it { should be_valid }
36-
it { should have_purpose 'server' }
36+
it { should have_purpose 'SSL server' }
3737
its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}/) }
3838
its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}/) }
3939
its(:keylength) { should be >= 4096 }
@@ -76,7 +76,7 @@ class { '::certs::apache':
7676
describe x509_certificate('/etc/pki/katello/certs/katello-apache.crt') do
7777
it { should be_certificate }
7878
# Doesn't have to be valid - can be expired since it's a static resource
79-
it { should have_purpose 'server' }
79+
it { should have_purpose 'SSL server' }
8080
its(:issuer) { should match_without_whitespace(/CN = Fake LE Intermediate X1/) }
8181
its(:subject) { should match_without_whitespace(/CN = example.partial.solutions/) }
8282
its(:keylength) { should be >= 2048 }
@@ -111,7 +111,7 @@ class { 'certs::apache':
111111
describe x509_certificate("/root/ssl-build/#{fact('fqdn')}/#{fact('fqdn')}-apache.crt") do
112112
it { should be_certificate }
113113
it { should be_valid }
114-
it { should have_purpose 'server' }
114+
it { should have_purpose 'SSL server' }
115115
its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}/) }
116116
its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}/) }
117117
its(:keylength) { should be >= 4096 }
@@ -157,7 +157,7 @@ class { '::certs::apache':
157157
describe x509_certificate('/etc/pki/katello/certs/katello-apache.crt') do
158158
it { should be_certificate }
159159
# Doesn't have to be valid - can be expired since it's a static resource
160-
it { should have_purpose 'server' }
160+
it { should have_purpose 'SSL server' }
161161
its(:issuer) { should match_without_whitespace(/CN = Fake LE Intermediate X1/) }
162162
its(:subject) { should match_without_whitespace(/CN = example.partial.solutions/) }
163163
its(:keylength) { should be >= 2048 }

spec/acceptance/candlepin_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
describe x509_certificate("/root/ssl-build/#{fqdn}/#{fqdn}-tomcat.crt") do
5050
it { should be_certificate }
5151
it { should be_valid }
52-
it { should have_purpose 'server' }
52+
it { should have_purpose 'SSL server' }
5353
its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}/) }
5454
its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}/) }
5555
its(:keylength) { should be >= 4096 }
@@ -215,7 +215,7 @@ class { 'certs::candlepin':
215215
describe x509_certificate("/root/ssl-build/localhost/localhost-tomcat.crt") do
216216
it { should be_certificate }
217217
it { should be_valid }
218-
it { should have_purpose 'server' }
218+
it { should have_purpose 'SSL server' }
219219
its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}/) }
220220
its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, O = Katello, OU = SomeOrgUnit, CN = localhost/) }
221221
its(:keylength) { should be >= 4096 }
@@ -329,7 +329,7 @@ class { 'certs::candlepin':
329329
describe x509_certificate("/root/ssl-build/#{fqdn}/#{fqdn}-tomcat.crt") do
330330
it { should be_certificate }
331331
it { should be_valid }
332-
it { should have_purpose 'server' }
332+
it { should have_purpose 'SSL server' }
333333
its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}/) }
334334
its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}/) }
335335
its(:keylength) { should be >= 4096 }

spec/acceptance/certs_tar_extract_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class { 'certs':
4040
describe x509_certificate('/etc/pki/katello/certs/katello-apache.crt') do
4141
it { should be_certificate }
4242
it { should be_valid }
43-
it { should have_purpose 'server' }
43+
it { should have_purpose 'SSL server' }
4444
its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}/) }
4545
its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, O = Katello, OU = SomeOrgUnit, CN = foreman-proxy.example.com/) }
4646
its(:keylength) { should be >= 4096 }
@@ -55,7 +55,7 @@ class { 'certs':
5555
describe x509_certificate('/root/ssl-build/foreman-proxy.example.com/foreman-proxy.example.com-apache.crt') do
5656
it { should be_certificate }
5757
it { should be_valid }
58-
it { should have_purpose 'server' }
58+
it { should have_purpose 'SSL server' }
5959
its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fact('fqdn')}/) }
6060
its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, O = Katello, OU = SomeOrgUnit, CN = foreman-proxy.example.com/) }
6161
its(:keylength) { should be >= 4096 }

spec/acceptance/foreman_proxy_spec.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
describe x509_certificate('/etc/foreman-proxy/ssl_cert.pem') do
2828
it { should be_certificate }
2929
it { should be_valid }
30-
it { should have_purpose 'server' }
30+
it { should have_purpose 'SSL server' }
3131
its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}/) }
3232
its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, O = FOREMAN, OU = SMART_PROXY, CN = #{fqdn}/) }
3333
its(:keylength) { should be >= 4096 }
@@ -56,7 +56,7 @@
5656
describe x509_certificate('/etc/foreman-proxy/ssl_ca.pem') do
5757
it { should be_certificate }
5858
it { should be_valid }
59-
it { should have_purpose 'server' }
59+
it { should have_purpose 'SSL server' }
6060
its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}/) }
6161
its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}/) }
6262
its(:keylength) { should be >= 4096 }
@@ -94,7 +94,7 @@
9494
describe x509_certificate('/etc/foreman-proxy/foreman_ssl_ca.pem') do
9595
it { should be_certificate }
9696
it { should be_valid }
97-
it { should have_purpose 'server' }
97+
it { should have_purpose 'SSL server' }
9898
its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}/) }
9999
its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}/) }
100100
its(:keylength) { should be >= 4096 }
@@ -103,7 +103,7 @@
103103
describe x509_certificate("/root/ssl-build/#{fqdn}/#{fqdn}-foreman-proxy.crt") do
104104
it { should be_certificate }
105105
it { should be_valid }
106-
it { should have_purpose 'server' }
106+
it { should have_purpose 'SSL server' }
107107
its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}/) }
108108
its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, O = FOREMAN, OU = SMART_PROXY, CN = #{fqdn}/) }
109109
its(:keylength) { should be >= 4096 }
@@ -187,7 +187,7 @@ class { '::certs::foreman_proxy':
187187
describe x509_certificate('/etc/foreman-proxy/ssl_cert.pem') do
188188
it { should be_certificate }
189189
# Doesn't have to be valid - can be expired since it's a static resource
190-
it { should have_purpose 'server' }
190+
it { should have_purpose 'SSL server' }
191191
its(:issuer) { should match_without_whitespace(/CN = Fake LE Intermediate X1/) }
192192
its(:subject) { should match_without_whitespace(/CN = example.partial.solutions/) }
193193
its(:keylength) { should be >= 2048 }
@@ -217,7 +217,7 @@ class { 'certs::foreman_proxy':
217217
describe x509_certificate("/root/ssl-build/#{fqdn}/#{fqdn}-foreman-proxy.crt") do
218218
it { should be_certificate }
219219
it { should be_valid }
220-
it { should have_purpose 'server' }
220+
it { should have_purpose 'SSL server' }
221221
its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}/) }
222222
its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, O = FOREMAN, OU = SMART_PROXY, CN = #{fqdn}/) }
223223
its(:keylength) { should be >= 4096 }

spec/acceptance/iop_advisor_engine_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
describe x509_certificate('/etc/iop-advisor-engine/server.cert') do
2929
it { should be_certificate }
3030
it { should be_valid }
31-
it { should have_purpose 'server' }
31+
it { should have_purpose 'SSL server' }
3232
its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}/) }
3333
its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, O = Katello, OU = SomeOrgUnit, CN = #{hostname}/) }
3434
its(:keylength) { should be >= 4096 }
@@ -57,7 +57,7 @@
5757
describe x509_certificate("/root/ssl-build/#{hostname}/#{hostname}-iop-advisor-server.crt") do
5858
it { should be_certificate }
5959
it { should be_valid }
60-
it { should have_purpose 'server' }
60+
it { should have_purpose 'SSL server' }
6161
its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}/) }
6262
its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, O = Katello, OU = SomeOrgUnit, CN = #{hostname}/) }
6363
its(:keylength) { should be >= 4096 }
@@ -88,7 +88,7 @@ class { 'certs::iop_advisor_engine':
8888
describe x509_certificate("/root/ssl-build/#{hostname}/#{hostname}-iop-advisor-server.crt") do
8989
it { should be_certificate }
9090
it { should be_valid }
91-
it { should have_purpose 'server' }
91+
it { should have_purpose 'SSL server' }
9292
its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}/) }
9393
its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, O = Katello, OU = SomeOrgUnit, CN = #{hostname}/) }
9494
its(:keylength) { should be >= 4096 }

0 commit comments

Comments
 (0)