serverspec 2.41.6 → 2.41.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c055c97caf2f1a49b8a9636f73ecfe4b9b63ee7c03fbee33e61bc4a3bf3c03b3
4
- data.tar.gz: aabdb043508a030010e43e5da1a6d575a75de901c3c1e830e3afb2bf96aa6fdd
3
+ metadata.gz: 6e4825adcbf2c79093752621578ea9a307a0a58330742d0a1b8843016ac1b0fb
4
+ data.tar.gz: c1fbaa08a9df4cc5b6c76a69d7a2b06b37442af4a49319d30e81f791f68e1c31
5
5
  SHA512:
6
- metadata.gz: 2aca68fe8c54039f3a5187c20d69700dcbbf6fba3a57555c89cd13203bb8f2bc7c42fdb990252bf178b6402e894fa3fde552f9c7c5cb20f2e58c2f32be45ff7f
7
- data.tar.gz: 2d2f0baa539f472927d5287d5b26f6d22395f183718305dd1a123b77538c815a94362e794b363d8413c28f9d9e13de0f9cbdcc03c223959ecf9220767d3b39c4
6
+ metadata.gz: 87475efc90b46f44b6ecf14ad44deb16ba64818b9b45abd45b36d089f87f6f4cefa8e0f4674a6035c3b6ca9b07cd8422902f861d85bf6ed6a235d10d0b824d56
7
+ data.tar.gz: 6772e53f96bd63d7eec0ea4c876e00273bf3169604d25684ae9396361c55e2f92f30e797b2f2bfd11c54508f6bc3651928896703f32aa9302a707f14c30989d9
@@ -84,9 +84,9 @@ module Serverspec::Type
84
84
 
85
85
  # Normalize output between openssl versions.
86
86
  def normalize_dn(dn)
87
- return subject unless subject.start_with?('/')
88
- # normalize openssl >= 1.1 to < 1.1 output
89
- subject[1..-1].split('/').join(', ').gsub('=', ' = ')
87
+ return dn unless dn.start_with?('/')
88
+ # normalize openssl < 1.1 to >= 1.1 output
89
+ dn[1..-1].split('/').join(', ').gsub('=', ' = ')
90
90
  end
91
91
  end
92
92
  end
@@ -1,3 +1,3 @@
1
1
  module Serverspec
2
- VERSION = "2.41.6"
2
+ VERSION = "2.41.7"
3
3
  end
@@ -12,14 +12,24 @@ describe x509_certificate('test.pem') do
12
12
  it { should_not be_certificate }
13
13
  end
14
14
 
15
- describe x509_certificate('test.pem') do
16
- let(:stdout) { sample_subj }
17
- its(:subject) { should eq '/O=some/OU=thing' }
15
+ describe x509_certificate('test-openssl-1.0.pem') do
16
+ let(:stdout) { sample_subj_openssl_1_0 }
17
+ its(:subject) { should eq 'O = some, OU = thing' }
18
18
  end
19
19
 
20
- describe x509_certificate('test.pem') do
21
- let(:stdout) { sample_issuer }
22
- its(:issuer) { should eq '/O=some/OU=issuer' }
20
+ describe x509_certificate('test-openssl-1.1.pem') do
21
+ let(:stdout) { sample_subj_openssl_1_1 }
22
+ its(:subject) { should eq 'O = some, OU = thing' }
23
+ end
24
+
25
+ describe x509_certificate('test-openssl-1.0.pem') do
26
+ let(:stdout) { sample_issuer_openssl_1_0 }
27
+ its(:issuer) { should eq 'O = some, OU = issuer' }
28
+ end
29
+
30
+ describe x509_certificate('test-openssl-1.1.pem') do
31
+ let(:stdout) { sample_issuer_openssl_1_1 }
32
+ its(:issuer) { should eq 'O = some, OU = issuer' }
23
33
  end
24
34
 
25
35
  describe x509_certificate('test.pem') do
@@ -38,18 +48,30 @@ describe x509_certificate('test.pem') do
38
48
  its(:subject_alt_names) { should eq %w[DNS:*.example.com DNS:www.example.net IP:192.0.2.10] }
39
49
  end
40
50
 
41
- def sample_subj
51
+ def sample_subj_openssl_1_0
42
52
  <<'EOS'
43
53
  subject= /O=some/OU=thing
44
54
  EOS
45
55
  end
46
56
 
47
- def sample_issuer
57
+ def sample_subj_openssl_1_1
58
+ <<'EOS'
59
+ subject=O = some, OU = thing
60
+ EOS
61
+ end
62
+
63
+ def sample_issuer_openssl_1_0
48
64
  <<'EOS'
49
65
  issuer= /O=some/OU=issuer
50
66
  EOS
51
67
  end
52
68
 
69
+ def sample_issuer_openssl_1_1
70
+ <<'EOS'
71
+ issuer=O = some, OU = issuer
72
+ EOS
73
+ end
74
+
53
75
  def sample_validity
54
76
  <<'EOS'
55
77
  notBefore=Jul 1 11:11:00 2000 GMT
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: serverspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.41.6
4
+ version: 2.41.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gosuke Miyashita
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-18 00:00:00.000000000 Z
11
+ date: 2021-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec