certmeister 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +5 -7
- data/README.md +14 -0
- data/Rakefile +0 -20
- data/certmeister.gemspec +0 -2
- data/contrib/config.ru +1 -1
- data/lib/certmeister/version.rb +2 -21
- metadata +2 -18
- data/.semver +0 -6
- data/signit.rb +0 -39
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0fae269aadcb7586df47b398aa563c9da8eff81
|
4
|
+
data.tar.gz: af9c8f585af0375c66a39b495579030d5789aab1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5abc6a80024b01e68c3baed7d2d00cf002d7cf3e73a40faf583fcaef95e1b8c3a25088df4be5d4969a5733be0bdc9f9c21c79606e7ceca1a8e7a99674460084f
|
7
|
+
data.tar.gz: 3b84043e2f9bec56c7229ee2b35296fdb23dea722e50c966b52c0306204b309fb4bb08fe8930c51ec1a2300cc6e6b2527bf58baf3ccf2362ecf91c2b22ad2a2f
|
data/Gemfile.lock
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
certmeister (0.3.
|
5
|
-
|
6
|
-
|
7
|
-
certmeister (= 0.3.1)
|
4
|
+
certmeister (0.3.2)
|
5
|
+
certmeister-rack (0.3.2)
|
6
|
+
certmeister (= 0.3.2)
|
8
7
|
rack (~> 1.5)
|
9
|
-
certmeister-redis (0.3.
|
10
|
-
certmeister (= 0.3.
|
8
|
+
certmeister-redis (0.3.2)
|
9
|
+
certmeister (= 0.3.2)
|
11
10
|
redis-sentinel (~> 1.4)
|
12
11
|
|
13
12
|
GEM
|
@@ -29,7 +28,6 @@ GEM
|
|
29
28
|
rspec-expectations (2.14.4)
|
30
29
|
diff-lcs (>= 1.1.3, < 2.0)
|
31
30
|
rspec-mocks (2.14.4)
|
32
|
-
semver2 (3.3.3)
|
33
31
|
|
34
32
|
PLATFORMS
|
35
33
|
ruby
|
data/README.md
CHANGED
@@ -48,3 +48,17 @@ redis-server --logfile /dev/null &
|
|
48
48
|
rake spec
|
49
49
|
kill %1; wait %1
|
50
50
|
```
|
51
|
+
|
52
|
+
## Releasing
|
53
|
+
|
54
|
+
If you work at Hetzner and need to release new versions of the gems, do this
|
55
|
+
(obviously only after making sure the tests run and you have no uncommitted
|
56
|
+
changes):
|
57
|
+
|
58
|
+
```
|
59
|
+
bundle exec rake bump:patch # or bump:minor or bump:major
|
60
|
+
bundle
|
61
|
+
git add .semver Gemfile.lock
|
62
|
+
git commit -m "Bump to version $(bundle exec semver)"
|
63
|
+
bundle exec release
|
64
|
+
```
|
data/Rakefile
CHANGED
@@ -11,26 +11,6 @@ task :build => :spec do
|
|
11
11
|
FileUtils.mv(Dir['*.gem'], 'pkg')
|
12
12
|
end
|
13
13
|
|
14
|
-
namespace :bump do
|
15
|
-
bump_version = ->(component) do
|
16
|
-
sh 'bundle', 'exec', 'semver', 'inc', component
|
17
|
-
puts "Remember to update Gemfile.lock with bundle install"
|
18
|
-
end
|
19
|
-
|
20
|
-
desc 'Bump version [major]'
|
21
|
-
task :major do
|
22
|
-
bump_version.call('major')
|
23
|
-
end
|
24
|
-
desc 'Bump version [minor]'
|
25
|
-
task :minor do
|
26
|
-
bump_version.call('minor')
|
27
|
-
end
|
28
|
-
desc 'Bump version [patch]'
|
29
|
-
task :patch do
|
30
|
-
bump_version.call('patch')
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
14
|
desc 'Tags version, pushes to remote, and pushes gem'
|
35
15
|
task :release => :build do
|
36
16
|
sh 'git', 'tag', '-m', "Released v#{Certmeister::VERSION}", "v#{Certmeister::VERSION}"
|
data/certmeister.gemspec
CHANGED
@@ -22,8 +22,6 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
23
23
|
spec.require_paths = ["lib"]
|
24
24
|
|
25
|
-
spec.add_dependency "semver2", "~> 3.3"
|
26
|
-
|
27
25
|
spec.add_development_dependency "bundler", "~> 1.5"
|
28
26
|
spec.add_development_dependency "rake", "~> 0"
|
29
27
|
spec.add_development_dependency "rspec", "~> 2.14"
|
data/contrib/config.ru
CHANGED
@@ -22,7 +22,7 @@ ca = Certmeister.new(
|
|
22
22
|
sign_policy: sign_policy,
|
23
23
|
fetch_policy: fetch_policy,
|
24
24
|
remove_policy: remove_policy,
|
25
|
-
store:
|
25
|
+
store: store,
|
26
26
|
ca_cert: File.read("../fixtures/ca.crt"),
|
27
27
|
ca_key: File.read("../fixtures/ca.key"),
|
28
28
|
)
|
data/lib/certmeister/version.rb
CHANGED
@@ -1,24 +1,5 @@
|
|
1
|
-
|
1
|
+
module Certmeister
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
module Certmeister
|
6
|
-
|
7
|
-
VERSION = SemVer.find.format("%M.%m.%p%s") unless defined?(VERSION)
|
8
|
-
|
9
|
-
end
|
10
|
-
|
11
|
-
rescue LoadError
|
12
|
-
|
13
|
-
$stderr.puts "warning: ignoring missing semver gem for initial bundle"
|
14
|
-
$stderr.puts "warning: please run bundle again to fix certmeister version number"
|
15
|
-
|
16
|
-
module Certmeister
|
17
|
-
|
18
|
-
VERSION = '0'
|
19
|
-
|
20
|
-
end
|
3
|
+
VERSION = '0.3.2' unless defined?(VERSION)
|
21
4
|
|
22
5
|
end
|
23
|
-
|
24
|
-
|
metadata
CHANGED
@@ -1,29 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: certmeister
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sheldon Hearn
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-02-
|
11
|
+
date: 2014-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: semver2
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ~>
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '3.3'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ~>
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '3.3'
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: bundler
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -80,7 +66,6 @@ files:
|
|
80
66
|
- .rspec
|
81
67
|
- .ruby-gemset
|
82
68
|
- .ruby-version
|
83
|
-
- .semver
|
84
69
|
- Gemfile
|
85
70
|
- Gemfile.lock
|
86
71
|
- LICENSE
|
@@ -119,7 +104,6 @@ files:
|
|
119
104
|
- lib/certmeister/store_error.rb
|
120
105
|
- lib/certmeister/test/memory_store_interface.rb
|
121
106
|
- lib/certmeister/version.rb
|
122
|
-
- signit.rb
|
123
107
|
- spec/certmeister/base_spec.rb
|
124
108
|
- spec/certmeister/config_spec.rb
|
125
109
|
- spec/certmeister/in_memory_store_spec.rb
|
data/.semver
DELETED
data/signit.rb
DELETED
@@ -1,39 +0,0 @@
|
|
1
|
-
# Inspired by https://gist.github.com/mitfik/1922961
|
2
|
-
|
3
|
-
require 'openssl'
|
4
|
-
require 'time'
|
5
|
-
|
6
|
-
if OpenSSL::Digest.const_defined?('SHA256')
|
7
|
-
@digest = OpenSSL::Digest::SHA256
|
8
|
-
elsif OpenSSL::Digest.const_defined?('SHA1')
|
9
|
-
@digest = OpenSSL::Digest::SHA1
|
10
|
-
else
|
11
|
-
raise "No FIPS 140-2 compliant digest algorithm in OpenSSL::Digest"
|
12
|
-
end
|
13
|
-
|
14
|
-
ca_cert_data = File.read('fixtures/ca.crt')
|
15
|
-
ca_key_data = File.read('fixtures/ca.key')
|
16
|
-
|
17
|
-
ca_cert = OpenSSL::X509::Certificate.new(ca_cert_data)
|
18
|
-
ca_key = OpenSSL::PKey.read(ca_key_data)
|
19
|
-
puts "# CA cert"
|
20
|
-
puts ca_cert.to_pem
|
21
|
-
|
22
|
-
csr_data = File.read('fixtures/client.csr')
|
23
|
-
csr = OpenSSL::X509::Request.new(csr_data)
|
24
|
-
puts "# client certificate signing request"
|
25
|
-
puts csr.to_pem
|
26
|
-
|
27
|
-
now = DateTime.now
|
28
|
-
cert = OpenSSL::X509::Certificate.new
|
29
|
-
cert.serial = 0
|
30
|
-
cert.version = 2
|
31
|
-
cert.not_before = now.to_time
|
32
|
-
cert.not_after = (now + (5 * 365)).to_time
|
33
|
-
cert.subject = csr.subject
|
34
|
-
cert.public_key = csr.public_key
|
35
|
-
cert.issuer = ca_cert.subject
|
36
|
-
cert.sign ca_key, @digest.new
|
37
|
-
|
38
|
-
puts "# client certificate"
|
39
|
-
puts cert.to_pem
|