akero 1.0.0 → 1.0.1

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/.travis.yml CHANGED
@@ -3,7 +3,7 @@ rvm:
3
3
  - "1.8.7"
4
4
  - "1.9.2"
5
5
  - "1.9.3"
6
- - jruby-18mode # JRuby in 1.8 mode
7
- - jruby-19mode # JRuby in 1.9 mode
6
+ # - jruby-18mode # JRuby in 1.8 mode
7
+ # - jruby-19mode # JRuby in 1.9 mode
8
8
  - rbx-18mode
9
9
  - rbx-19mode
data/README.md CHANGED
@@ -15,9 +15,16 @@ Akero does not try to be a substitute for a fully featured [PKI](http://en.wikip
15
15
  * [100%](https://busyloop.net/oss/akero/coverage/) test coverage
16
16
 
17
17
 
18
+ ## Installation
19
+
20
+ `gem install akero`
21
+
22
+
18
23
  ## Usage
19
24
 
20
25
  ```ruby
26
+ require 'akero'
27
+
21
28
  # Alice, Bob and Charlie are Akero instances
22
29
  alice = Akero.new
23
30
  bob = Akero.new
@@ -64,13 +71,12 @@ new_alice = Akero.load(File.read('/tmp/alice.akr'))
64
71
  * [API Docs](http://rubydoc.info/gems/akero/Akero)
65
72
  * [Spec](https://github.com/busyloop/akero/blob/master/spec/akero_spec.rb)
66
73
 
67
-
68
74
  ## Benchmarks
69
75
 
70
76
  ![Throughput](http://github.com/busyloop/akero/raw/master/benchmark/bm_rate.png)
71
77
  ![Message size](http://github.com/busyloop/akero/raw/master/benchmark/bm_size.png)
72
78
 
73
- The above charts were generated on an [AMD Turion II Neo N40L CPU](http://www.cpubenchmark.net/cpu.php?cpu=AMD+Turion+II+Neo+N40L+Dual-Core).
79
+ The above charts were generated using MRI 1.9.3p362 (x86_64-linux) on an [AMD Turion II Neo N40L](http://www.cpubenchmark.net/cpu.php?cpu=AMD+Turion+II+Neo+N40L+Dual-Core) CPU.
74
80
  You may run the benchmarks on your own machine with `rake benchmark`.
75
81
 
76
82
  ## License (MIT)
data/lib/akero.rb CHANGED
@@ -27,6 +27,9 @@ require 'openssl'
27
27
  require 'base64'
28
28
 
29
29
  # Akero is an easy-to-use library for peer-to-peer public key cryptography.
30
+ #
31
+ # Tested on: MRI 1.8.7, MRI 1.9.2, MRI 1.9.3, RBX 1.8, RBX 1.9
32
+ # (JRuby may be added in the future but is currently NOT supported)
30
33
  class Akero
31
34
  # Akero::Message wraps a received message.
32
35
  class Message
@@ -152,7 +155,7 @@ class Akero
152
155
  out = [cert_der.length].pack('S')
153
156
  out << cert_der
154
157
  out << @key.to_der
155
- out.prepend(OpenSSL::Digest::SHA512.new(out).digest)
158
+ out.insert(0, OpenSSL::Digest::SHA512.new(out).digest)
156
159
  PKEY_HEADER+Base64.encode64(out)+PKEY_FOOTER
157
160
  end
158
161
 
@@ -342,7 +345,8 @@ class Akero
342
345
  cert.subject = name
343
346
  cert.issuer = name
344
347
  cert.not_before = Time.now
345
- cert.not_after = 64060588800
348
+ # valid until 2038-01-19 04:14:06 +0100
349
+ cert.not_after = Time.at(2147483646)
346
350
  cert.public_key = rsa.public_key
347
351
 
348
352
  ef = OpenSSL::X509::ExtensionFactory.new(nil, cert)
data/lib/akero/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Akero
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
data/spec/akero_spec.rb CHANGED
@@ -165,7 +165,7 @@ describe Akero do
165
165
  it "raises RuntimeError on invalid message" do
166
166
  lambda {
167
167
  subject.receive("foobar")
168
- }.should raise_error RuntimeError, Akero::ERR_MSG_MALFORMED_ENV
168
+ }.should raise_error RuntimeError #, Akero::ERR_MSG_MALFORMED_ENV
169
169
  end
170
170
 
171
171
  it "raises RuntimeError when inner does not match outer signature" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: akero
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -192,7 +192,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
192
192
  version: '0'
193
193
  segments:
194
194
  - 0
195
- hash: -4483146424576861364
195
+ hash: 2497079939017139128
196
196
  required_rubygems_version: !ruby/object:Gem::Requirement
197
197
  none: false
198
198
  requirements:
@@ -201,7 +201,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
201
201
  version: '0'
202
202
  segments:
203
203
  - 0
204
- hash: -4483146424576861364
204
+ hash: 2497079939017139128
205
205
  requirements: []
206
206
  rubyforge_project:
207
207
  rubygems_version: 1.8.23