owlet 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile +2 -0
- data/lib/owlet/cli.rb +16 -2
- data/lib/owlet/signer.rb +10 -5
- data/lib/owlet/version.rb +1 -1
- data/spec/fixtures/first.key +15 -0
- data/spec/fixtures/first.pub +17 -0
- data/spec/fixtures/pleco.key +15 -0
- data/spec/fixtures/pleco.pub +17 -0
- data/spec/owlet/signer_spec.rb +114 -52
- metadata +22 -14
data/Gemfile
CHANGED
data/lib/owlet/cli.rb
CHANGED
@@ -3,11 +3,25 @@ require 'owlet'
|
|
3
3
|
|
4
4
|
module Owlet
|
5
5
|
class CLI < Thor
|
6
|
+
def self.key_opts
|
7
|
+
begin
|
8
|
+
require 'openssl'
|
9
|
+
if OpenSSL.const_defined?(:PKCS12)
|
10
|
+
method_option :key, :required => true, :description => "Private and public key to be used for signing. Must be in PKCS12 format."
|
11
|
+
else
|
12
|
+
method_option :public, :required => true, :description => "Public key to be used for signing. Must be in PEM format."
|
13
|
+
method_option :private, :required => true, :description => "Private key to be used for signing. Must be in PEM format."
|
14
|
+
end
|
15
|
+
rescue
|
16
|
+
raise "OpenSSL support is required."
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
6
20
|
# Signing operations
|
7
21
|
desc "sign PACKAGE", "Signs Owlet package with supplied key."
|
8
|
-
|
22
|
+
key_opts
|
9
23
|
def sign(package)
|
10
|
-
Owlet::Signer.sign_package(package, options
|
24
|
+
Owlet::Signer.sign_package(package, options)
|
11
25
|
end
|
12
26
|
|
13
27
|
desc "verify PACKAGE", "Verifies Alula extension or theme"
|
data/lib/owlet/signer.rb
CHANGED
@@ -33,10 +33,15 @@ module Owlet
|
|
33
33
|
|
34
34
|
# Signs given package with PKCS12 file
|
35
35
|
# p12 is either OpenSSL::PKCS!@ or file
|
36
|
-
def self.sign_package(package,
|
36
|
+
def self.sign_package(package, options)
|
37
37
|
# Get private key
|
38
|
-
|
39
|
-
p12 = OpenSSL::PKCS12.new(File.read(
|
38
|
+
if options['key']
|
39
|
+
p12 = OpenSSL::PKCS12.new(File.read(options['key']))
|
40
|
+
public_key = p12.certificate
|
41
|
+
private_key = p12.key
|
42
|
+
else
|
43
|
+
private_key = OpenSSL::PKey::RSA.new(File.read(options['private']))
|
44
|
+
public_key = OpenSSL::X509::Certificate.new(File.read(options['public']))
|
40
45
|
end
|
41
46
|
|
42
47
|
raise "Cannot find package #{package}" unless File.exists?(package)
|
@@ -56,10 +61,10 @@ module Owlet
|
|
56
61
|
next if data.nil?
|
57
62
|
|
58
63
|
sig_data[:signatures][entry.name] ||= []
|
59
|
-
sig_data[:signatures][entry.name].push sign(data,
|
64
|
+
sig_data[:signatures][entry.name].push sign(data, private_key)
|
60
65
|
end
|
61
66
|
|
62
|
-
sig_data[:certificates].push
|
67
|
+
sig_data[:certificates].push public_key.to_pem
|
63
68
|
|
64
69
|
zip.get_output_stream("_Signature") do |io|
|
65
70
|
io.puts sig_data.to_yaml
|
data/lib/owlet/version.rb
CHANGED
@@ -0,0 +1,15 @@
|
|
1
|
+
-----BEGIN RSA PRIVATE KEY-----
|
2
|
+
MIICXgIBAAKBgQDaXLGPuAHtHJ/6nkA3iBjCpwT8/9vZehUFEdcKoGKTPjheEiYk
|
3
|
+
LPWdyYk7+q6FRgHqx767ttQGm+MOE5Xblco7Ki5wkoJZBt8Pw7MbfTbJwnRTUfiC
|
4
|
+
rkuvdNbcGAfRzhFPyDju5xZVspJWzzh8guWTCqfKU1YY0iCvX72ipWxIhQIDAQAB
|
5
|
+
AoGANAOefCiNtOh7pxwpGdE+bKeSRZ3AxcYR2bpNKgfYU1Cf5rCWC0n2W9aU7Qei
|
6
|
+
qLZrYHyiD17WlJhvdnvt13ePyyU+JKyATypHCHTpSD+BMm1GnDi9+ANpGkAvuo4T
|
7
|
+
Lz+rYdvXq+JACuhns0/eLPfX0z1MF38h8tPY4wOegK8zDMUCQQD7rkJWCv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bHNrbhaQIDAQABo0Yw
|
9
|
+
RDAdBgNVHQ4EFgQUGgjDyyBvObP5ahBwsN6iBi/Q4qswDgYDVR0PAQH/BAQDAgeA
|
10
|
+
MBMGA1UdJQQMMAoGCCsGAQUFBwMDMA0GCSqGSIb3DQEBBQUAA4IBAQDIinTx9Ljp
|
11
|
+
Ls0Og5sseV2v3dcFvOtjhg4lirM9HpkuXlKYi3U8HSCzp58cFhc9V8Fs66YD6Vvw
|
12
|
+
WJihowiVpOg3MzXLdkDYfwI3MfdCdr17QSniwHlQwleOK4YH+D/qvmy45xOM4gbx
|
13
|
+
E2Q3QN8/ksrGJEyOZMHRrgwLR+GFwk1tDy3zbSbprBrP0DI/pCM24IIcfvnjNxLc
|
14
|
+
6vtPMUASNaM8UHJRthqRSSBjqUL694Y3ZQZTazi+KpKEaSPj6pEJAxqvSbN7byO+
|
15
|
+
9lMXsaNr+SEqV3Z9FZSUtBbYoYfgrZdwe+z3XwMJywZATnveZw4ECOS72TDy+vn5
|
16
|
+
PpFQjCS+8I4w
|
17
|
+
-----END CERTIFICATE-----
|
data/spec/owlet/signer_spec.rb
CHANGED
@@ -4,14 +4,16 @@ describe Owlet::Signer do
|
|
4
4
|
let(:fixture_path) { fixture_path = File.expand_path(File.join(File.dirname(__FILE__), "..", "fixtures")) }
|
5
5
|
|
6
6
|
context "Helper Methods" do
|
7
|
-
let(:
|
8
|
-
let(:
|
7
|
+
let(:first_key) { OpenSSL::PKey::RSA.new(File.read(File.join(fixture_path, "first.key"))) }
|
8
|
+
let(:pleco_key) { OpenSSL::PKey::RSA.new(File.read(File.join(fixture_path, "pleco.key"))) }
|
9
|
+
let(:first_cert) { OpenSSL::X509::Certificate.new(File.read(File.join(fixture_path, "first.pub"))) }
|
10
|
+
let(:pleco_cert) { OpenSSL::X509::Certificate.new(File.read(File.join(fixture_path, "pleco.pub"))) }
|
9
11
|
let(:first_signature) { "lu2zFctrv7ssmcudjTVNoj9xS47GpMsYBxF8tQVhXnpOBXIM/7TuY+ZpHkxUqzgWssJdrUqLpC6t9OoUyLbUOU2HI4aNdmwOHv3XmpuIazmELEz/aCbwuCnwIAw6YtQiF14GQhUqR2A/6LE9ZB3+bKBDuxSMRY9WbRHELjoeXyg=" }
|
10
12
|
|
11
13
|
it "should sign data" do
|
12
14
|
# Load private key
|
13
15
|
data = "aaaa/bbbb/cccc"
|
14
|
-
signature = Owlet::Signer.sign(data,
|
16
|
+
signature = Owlet::Signer.sign(data, first_key)
|
15
17
|
|
16
18
|
signature.should == first_signature
|
17
19
|
end
|
@@ -19,73 +21,133 @@ describe Owlet::Signer do
|
|
19
21
|
it "should verify data" do
|
20
22
|
data = "aaaa/bbbb/cccc"
|
21
23
|
|
22
|
-
Owlet::Signer.verify(data, first_signature,
|
24
|
+
Owlet::Signer.verify(data, first_signature, first_cert.public_key).should be_true
|
23
25
|
end
|
24
26
|
|
25
27
|
it "should not verify invalid data" do
|
26
28
|
data = "aaaa/bbbb/cccc/dddd"
|
27
29
|
|
28
|
-
Owlet::Signer.verify(data, first_signature,
|
30
|
+
Owlet::Signer.verify(data, first_signature, first_cert.public_key).should be_false
|
29
31
|
end
|
30
32
|
|
31
33
|
it "should not verify with wrong public key" do
|
32
34
|
data = "aaaa/bbbb/cccc"
|
33
35
|
|
34
|
-
Owlet::Signer.verify(data, first_signature,
|
36
|
+
Owlet::Signer.verify(data, first_signature, pleco_cert.public_key).should be_false
|
35
37
|
end
|
36
38
|
end
|
37
39
|
|
38
40
|
context "Package" do
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
# Create package
|
44
|
-
File.unlink(File.join(fixture_path, "fixture.alulaextz")) if File.exists?(File.join(fixture_path, "fixture.alulaextz"))
|
45
|
-
@pkg = Owlet::Package.create(:source => File.join(fixture_path, "fixture.alulaextension"))
|
46
|
-
end
|
47
|
-
|
48
|
-
it "should have no certificates" do
|
49
|
-
signatures = Owlet::Signer.list_certificates(@pkg)
|
50
|
-
signatures.should be_empty
|
51
|
-
end
|
52
|
-
|
53
|
-
it "should be signed succesfully" do
|
54
|
-
Owlet::Signer.sign_package(@pkg, first_p12).should be_true
|
55
|
-
end
|
41
|
+
if OpenSSL.const_defined?(:PKCS12)
|
42
|
+
context "with PKCS12" do
|
43
|
+
let(:first_p12) { File.join(fixture_path, "first.p12") }#OpenSSL::PKCS12.new(File.read(File.join(fixture_path, "first.p12"))) }
|
44
|
+
let(:pleco_p12) { File.join(fixture_path, "pleco.p12") }#OpenSSL::PKCS12.new(File.read(File.join(fixture_path, "pleco.p12"))) }
|
56
45
|
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
46
|
+
before(:each) do
|
47
|
+
# Create package
|
48
|
+
File.unlink(File.join(fixture_path, "fixture.alulaextz")) if File.exists?(File.join(fixture_path, "fixture.alulaextz"))
|
49
|
+
@pkg = Owlet::Package.create(:source => File.join(fixture_path, "fixture.alulaextension"))
|
50
|
+
end
|
51
|
+
|
52
|
+
it "should have no certificates" do
|
53
|
+
signatures = Owlet::Signer.list_certificates(@pkg)
|
54
|
+
signatures.should be_empty
|
55
|
+
end
|
56
|
+
|
57
|
+
it "should be signed succesfully" do
|
58
|
+
Owlet::Signer.sign_package(@pkg, 'key' => first_p12).should be_true
|
59
|
+
end
|
60
|
+
|
61
|
+
it "should have one certificate" do
|
62
|
+
Owlet::Signer.sign_package(@pkg, 'key' => first_p12).should be_true
|
63
|
+
signatures = Owlet::Signer.list_certificates(@pkg)
|
64
|
+
signatures[0].should_not be_nil
|
65
|
+
cert = OpenSSL::X509::Certificate.new(signatures[0])
|
66
|
+
cert.subject.to_s.should == "/O=Owl Forestry/CN=Alula Extension"
|
67
|
+
signatures[1].should be_nil
|
68
|
+
end
|
69
|
+
|
70
|
+
it "should verify signed package" do
|
71
|
+
Owlet::Signer.sign_package(@pkg, 'key' => first_p12).should be_true
|
72
|
+
Owlet::Signer.verify_package(@pkg).should be_true
|
73
|
+
end
|
74
|
+
|
75
|
+
it "should signed twice" do
|
76
|
+
Owlet::Signer.sign_package(@pkg, 'key' => first_p12).should be_true
|
77
|
+
Owlet::Signer.sign_package(@pkg, 'key' => pleco_p12).should be_true
|
78
|
+
signatures = Owlet::Signer.list_certificates(@pkg)
|
79
|
+
signatures[1].should_not be_nil
|
80
|
+
cert = OpenSSL::X509::Certificate.new(signatures[1])
|
81
|
+
cert.subject.to_s.should == "/O=Owl Forestry/CN=Alula Pleco - Extension"
|
82
|
+
end
|
83
|
+
|
84
|
+
it "should fail with modified package" do
|
85
|
+
Owlet::Signer.sign_package(@pkg, 'key' => first_p12).should be_true
|
86
|
+
Zip::ZipFile.open(@pkg) do |zip|
|
87
|
+
zip.get_output_stream("init.rb") do |io|
|
88
|
+
io.puts "# Fail this thanks."
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
lambda { Owlet::Signer.verify_package(@pkg)}.should raise_error "Signature for init.rb for certicate /O=Owl Forestry/CN=Alula Extension failed."
|
93
|
+
end
|
94
|
+
end
|
78
95
|
end
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
96
|
+
context "with public/private keys" do
|
97
|
+
let(:first_key) { File.join(fixture_path, "first.key") }
|
98
|
+
let(:pleco_key) { File.join(fixture_path, "pleco.key") }
|
99
|
+
let(:first_cert) { File.join(fixture_path, "first.pub") }
|
100
|
+
let(:pleco_cert) { File.join(fixture_path, "pleco.pub") }
|
101
|
+
|
102
|
+
before(:each) do
|
103
|
+
# Create package
|
104
|
+
File.unlink(File.join(fixture_path, "fixture.alulaextz")) if File.exists?(File.join(fixture_path, "fixture.alulaextz"))
|
105
|
+
@pkg = Owlet::Package.create(:source => File.join(fixture_path, "fixture.alulaextension"))
|
106
|
+
end
|
107
|
+
|
108
|
+
it "should have no certificates" do
|
109
|
+
signatures = Owlet::Signer.list_certificates(@pkg)
|
110
|
+
signatures.should be_empty
|
111
|
+
end
|
112
|
+
|
113
|
+
it "should be signed succesfully" do
|
114
|
+
Owlet::Signer.sign_package(@pkg, 'private' => first_key, 'public' => first_cert).should be_true
|
115
|
+
end
|
116
|
+
|
117
|
+
it "should have one certificate" do
|
118
|
+
Owlet::Signer.sign_package(@pkg, 'private' => first_key, 'public' => first_cert).should be_true
|
119
|
+
signatures = Owlet::Signer.list_certificates(@pkg)
|
120
|
+
signatures[0].should_not be_nil
|
121
|
+
cert = OpenSSL::X509::Certificate.new(signatures[0])
|
122
|
+
cert.subject.to_s.should == "/O=Owl Forestry/CN=Alula Extension"
|
123
|
+
signatures[1].should be_nil
|
124
|
+
end
|
125
|
+
|
126
|
+
it "should verify signed package" do
|
127
|
+
Owlet::Signer.sign_package(@pkg, 'private' => first_key, 'public' => first_cert).should be_true
|
128
|
+
Owlet::Signer.verify_package(@pkg).should be_true
|
129
|
+
end
|
130
|
+
|
131
|
+
it "should signed twice" do
|
132
|
+
Owlet::Signer.sign_package(@pkg, 'private' => first_key, 'public' => first_cert).should be_true
|
133
|
+
Owlet::Signer.sign_package(@pkg, 'private' => pleco_key, 'public' => pleco_cert).should be_true
|
134
|
+
signatures = Owlet::Signer.list_certificates(@pkg)
|
135
|
+
signatures[1].should_not be_nil
|
136
|
+
cert = OpenSSL::X509::Certificate.new(signatures[1])
|
137
|
+
cert.subject.to_s.should == "/O=Owl Forestry/CN=Alula Pleco - Extension"
|
138
|
+
end
|
139
|
+
|
140
|
+
it "should fail with modified package" do
|
141
|
+
Owlet::Signer.sign_package(@pkg, 'private' => first_key, 'public' => first_cert).should be_true
|
142
|
+
Zip::ZipFile.open(@pkg) do |zip|
|
143
|
+
zip.get_output_stream("init.rb") do |io|
|
144
|
+
io.puts "# Fail this thanks."
|
145
|
+
end
|
85
146
|
end
|
147
|
+
|
148
|
+
lambda { Owlet::Signer.verify_package(@pkg)}.should raise_error "Signature for init.rb for certicate /O=Owl Forestry/CN=Alula Extension failed."
|
86
149
|
end
|
87
|
-
|
88
|
-
lambda { Owlet::Signer.verify_package(@pkg)}.should raise_error "Signature for init.rb for certicate /O=Owl Forestry/CN=Alula Extension failed."
|
89
150
|
end
|
151
|
+
|
90
152
|
end
|
91
153
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: owlet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-08-
|
12
|
+
date: 2011-08-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: thor
|
16
|
-
requirement: &
|
16
|
+
requirement: &70348029127600 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70348029127600
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rubyzip
|
27
|
-
requirement: &
|
27
|
+
requirement: &70348029127120 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70348029127120
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rake
|
38
|
-
requirement: &
|
38
|
+
requirement: &70348029126660 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70348029126660
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: rspec
|
49
|
-
requirement: &
|
49
|
+
requirement: &70348029126140 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70348029126140
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: guard-rspec
|
60
|
-
requirement: &
|
60
|
+
requirement: &70348029125620 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70348029125620
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: ci_reporter
|
71
|
-
requirement: &
|
71
|
+
requirement: &70348029124980 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,7 +76,7 @@ dependencies:
|
|
76
76
|
version: '0'
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70348029124980
|
80
80
|
description: Use Owlet library to create and alter and gather information about owlets.
|
81
81
|
email:
|
82
82
|
- mikko@mikian.com
|
@@ -97,12 +97,16 @@ files:
|
|
97
97
|
- lib/owlet/signer.rb
|
98
98
|
- lib/owlet/version.rb
|
99
99
|
- owlet.gemspec
|
100
|
+
- spec/fixtures/first.key
|
100
101
|
- spec/fixtures/first.p12
|
102
|
+
- spec/fixtures/first.pub
|
101
103
|
- spec/fixtures/fixture.alulaextension/init.rb
|
102
104
|
- spec/fixtures/fixture.alulatheme/init.rb
|
103
105
|
- spec/fixtures/fixture.alulatheme/javascripts/application.js.coffeescript
|
104
106
|
- spec/fixtures/fixture.alulatheme/stylesheets/application.css.scss
|
107
|
+
- spec/fixtures/pleco.key
|
105
108
|
- spec/fixtures/pleco.p12
|
109
|
+
- spec/fixtures/pleco.pub
|
106
110
|
- spec/owlet/cli_spec.rb
|
107
111
|
- spec/owlet/package_spec.rb
|
108
112
|
- spec/owlet/signer_spec.rb
|
@@ -133,12 +137,16 @@ specification_version: 3
|
|
133
137
|
summary: Owlet is a packaging system for distributing extensions and themes for Alula
|
134
138
|
Engine
|
135
139
|
test_files:
|
140
|
+
- spec/fixtures/first.key
|
136
141
|
- spec/fixtures/first.p12
|
142
|
+
- spec/fixtures/first.pub
|
137
143
|
- spec/fixtures/fixture.alulaextension/init.rb
|
138
144
|
- spec/fixtures/fixture.alulatheme/init.rb
|
139
145
|
- spec/fixtures/fixture.alulatheme/javascripts/application.js.coffeescript
|
140
146
|
- spec/fixtures/fixture.alulatheme/stylesheets/application.css.scss
|
147
|
+
- spec/fixtures/pleco.key
|
141
148
|
- spec/fixtures/pleco.p12
|
149
|
+
- spec/fixtures/pleco.pub
|
142
150
|
- spec/owlet/cli_spec.rb
|
143
151
|
- spec/owlet/package_spec.rb
|
144
152
|
- spec/owlet/signer_spec.rb
|