sshkey 1.6.1 → 1.7.0

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
  SHA1:
3
- metadata.gz: dcab21406c740089ec26317a5499a2b757f03e7c
4
- data.tar.gz: 212a9a19f541aea1aeaf577cb2e938f1eae9c4fd
3
+ metadata.gz: 5d776647717b5c6c632f8b567e5f24ce5453e9dc
4
+ data.tar.gz: 4a6a78036abf72069b7facea22e76210a8285e21
5
5
  SHA512:
6
- metadata.gz: ba8bf9fcef2981609256d9765e855e49771992caa20d1b87ff52a20d627a8d2571318486687b2cf51c52d6f8a510281ad351069e94cb092e44a520f069af5ab6
7
- data.tar.gz: f1f47cb1a2861aa2a8a741d8b511529c62701e943658c1dead0f6621ad639158874b4c13fc6a00f9bc6375e00ea46aab32612d5337c8e55002503f0aaac6dab9
6
+ metadata.gz: 618febbb798fe552b6304616112826bfc62a190217c4dda38821b6440986958f0f0f1d4d834d48698d9c58ccd285db2361d97175d38403df17f8059e8ccb26c6
7
+ data.tar.gz: 6b17d1441004cd505882b2d17099be24853a8a360979820d93ae324b309fa2658620f145cf8b75ed179813de10b6ddc3987ae3d8fb222202a5a869135c4bf682
data/.travis.yml CHANGED
@@ -1,41 +1,20 @@
1
+ language: ruby
2
+
1
3
  rvm:
2
4
  - 1.8.7
3
5
  - 1.9.2
4
6
  - 1.9.3
5
- - 2.0.0
6
- - ree
7
+ - 2.0
8
+ - 2.1
9
+ - 2.2
7
10
  - ruby-head
8
- - jruby-18mode
9
- - jruby-19mode
10
- - jruby-20mode
11
+ - ree
12
+ - jruby
11
13
  - jruby-head
12
- - rbx-2.1.1
13
14
 
14
15
  matrix:
15
16
  allow_failures:
16
17
  - rvm: ruby-head
17
- include:
18
- - rvm: jruby-18mode
19
- jdk: openjdk6
20
- - rvm: jruby-18mode
21
- jdk: openjdk7
22
- - rvm: jruby-18mode
23
- jdk: oraclejdk7
24
- - rvm: jruby-19mode
25
- jdk: openjdk6
26
- - rvm: jruby-19mode
27
- jdk: openjdk7
28
- - rvm: jruby-19mode
29
- jdk: oraclejdk7
30
- - rvm: jruby-20mode
31
- jdk: openjdk6
32
- - rvm: jruby-20mode
33
- jdk: openjdk7
34
- - rvm: jruby-20mode
35
- jdk: oraclejdk7
36
18
  - rvm: jruby-head
37
- jdk: openjdk6
38
- - rvm: jruby-head
39
- jdk: openjdk7
40
- - rvm: jruby-head
41
- jdk: oraclejdk7
19
+
20
+ sudo: false
data/Gemfile CHANGED
@@ -1,6 +1,7 @@
1
1
  source "https://rubygems.org"
2
2
 
3
3
  gem "jruby-openssl", ">= 0.8.2", :platforms => :jruby
4
- gem "rubysl", "~> 2.0.14", :platforms => :rbx
4
+ gem "rubysl", "~> 2.0.15", :platforms => :rbx
5
+ gem "rubysl-test-unit", "~> 2.0.3", :platforms => :rbx
5
6
 
6
7
  gemspec
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2011-2013 James Miller
1
+ Copyright (c) 2011-2014 James Miller
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -4,9 +4,9 @@ Generate private and public SSH keys (RSA and DSA supported) using pure Ruby.
4
4
 
5
5
  gem install sshkey
6
6
 
7
- Tested on the following Rubies: MRI 1.8.7, 1.9.2, 1.9.3, 2.0.0, REE, JRuby (1.7.2 and newer), Rubinius (2.1.1 and newer). Ruby must be compiled with OpenSSL support.
7
+ Tested on the following Rubies: MRI 1.8.7, 1.9.2, 1.9.3, 2.0.0, 2.1.x, 2.2.x, REE. Ruby must be compiled with OpenSSL support.
8
8
 
9
- [![Build Status](https://secure.travis-ci.org/bensie/sshkey.png)](http://travis-ci.org/bensie/sshkey)
9
+ [![Build Status](https://secure.travis-ci.org/bensie/sshkey.svg?branch=master)](http://travis-ci.org/bensie/sshkey)
10
10
 
11
11
  ## Usage
12
12
 
@@ -18,7 +18,12 @@ You can also (optionally) supply a `comment` or `passphrase`.
18
18
  ```ruby
19
19
  k = SSHKey.generate
20
20
 
21
- k = SSHKey.generate(:type => "DSA", :bits => 1024, :comment => "foo@bar.com", :passphrase => "foobar")
21
+ k = SSHKey.generate(
22
+ type: "DSA",
23
+ bits: 1024,
24
+ comment: "foo@bar.com",
25
+ passphrase: "foobar"
26
+ )
22
27
  ```
23
28
 
24
29
  ### Use your existing key
@@ -26,7 +31,7 @@ k = SSHKey.generate(:type => "DSA", :bits => 1024, :comment => "foo@bar.com", :p
26
31
  Return an SSHKey object from an existing RSA or DSA private key (provided as a string).
27
32
 
28
33
  ```ruby
29
- k = SSHKey.new(File.read("~/.ssh/id_rsa"), :comment => "foo@bar.com")
34
+ k = SSHKey.new(File.read("~/.ssh/id_rsa"), comment: "foo@bar.com")
30
35
  ```
31
36
 
32
37
  ### The SSHKey object
@@ -77,8 +82,10 @@ k.comment = "me@me.com"
77
82
 
78
83
  k.ssh_public_key
79
84
  # => "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC9HuXvYJPtQE/o/7TYi63yAopsrJ6TP+lDGdyQ+nVVp+5ojAIy9h8/h99UlNxjkiFT2YhI3Fl/pgNDRO4PVo6tlgb3CwiAZjSdeE5RnF79Dkj5XsM4j+FLMoXtbRw0K9ok9RKjz6ygIs1JDmaOdXexFnq4nAYU3fSLUa6WoccqTHe8bFuJoAv1gbnx09Js8YcVMD96mpTJ3V/MK5YfIv10dbtrDhGug3IS1V2J+0BB9orbQja554N+4S0I9rFBgVCpvPmQqddDHd/AdGkLv/zjEfGytjnvp68bEfDinkQkPfuxw01yd5MbcvLv39VVICWtKbqW263HT5LvSxwKorR7 me@me.com"
80
- ```
81
85
 
86
+ k.ssh2_public_key
87
+ # => "---- BEGIN SSH2 PUBLIC KEY ----\nComment: me@me.com\nAAAAB3NzaC1yc2EAAAADAQABAAABAQC9HuXvYJPtQE/o/7TYi63yAopsrJ6TP+lDGdyQ+n\nVVp+5ojAIy9h8/h99UlNxjkiFT2YhI3Fl/pgNDRO4PVo6tlgb3CwiAZjSdeE5RnF79Dkj5\nXsM4j+FLMoXtbRw0K9ok9RKjz6ygIs1JDmaOdXexFnq4nAYU3fSLUa6WoccqTHe8bFuJoA\nv1gbnx09Js8YcVMD96mpTJ3V/MK5YfIv10dbtrDhGug3IS1V2J+0BB9orbQja554N+4S0I\n9rFBgVCpvPmQqddDHd/AdGkLv/zjEfGytjnvp68bEfDinkQkPfuxw01yd5MbcvLv39VVIC\nWtKbqW263HT5LvSxwKorR7\n---- END SSH2 PUBLIC KEY ----"
88
+ ```
82
89
  #### Bit length
83
90
 
84
91
  Determine the strength of the key in bits as an integer.
@@ -126,7 +133,7 @@ k.ssh_public_key
126
133
 
127
134
  #### Randomart
128
135
 
129
- Generate [OpenSSH compatible](http://www.opensource.apple.com/source/OpenSSH/OpenSSH-175/openssh/key.c) ASCII art fingerprints
136
+ Generate [OpenSSH compatible](http://www.opensource.apple.com/source/OpenSSH/OpenSSH-175/openssh/key.c) ASCII art fingerprints.
130
137
 
131
138
  ```ruby
132
139
  puts k.randomart
@@ -184,6 +191,15 @@ SSHKey.sha1_fingerprint "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC9HuXvYJPtQE/o/7T
184
191
  # => "e5:c2:43:9e:e4:0c:0c:47:82:7a:3b:e9:61:13:bd:9c:43:eb:4c:b7"
185
192
  ```
186
193
 
194
+ #### Convert to SSH2 Public Key
195
+
196
+ Convert an existing SSH Public Key into an SSH2 Public key. Returns `SSHKey::PublicKeyError` if a valid key cannot be generated.
197
+
198
+ ```ruby
199
+ SSHKey.ssh_public_key_to_ssh2_public_key "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC9HuXvYJPtQE/o/7TYi63yAopsrJ6TP+lDGdyQ+nVVp+5ojAIy9h8/h99UlNxjkiFT2YhI3Fl/pgNDRO4PVo6tlgb3CwiAZjSdeE5RnF79Dkj5XsM4j+FLMoXtbRw0K9ok9RKjz6ygIs1JDmaOdXexFnq4nAYU3fSLUa6WoccqTHe8bFuJoAv1gbnx09Js8YcVMD96mpTJ3V/MK5YfIv10dbtrDhGug3IS1V2J+0BB9orbQja554N+4S0I9rFBgVCpvPmQqddDHd/AdGkLv/zjEfGytjnvp68bEfDinkQkPfuxw01yd5MbcvLv39VVICWtKbqW263HT5LvSxwKorR7 me@me.com"
200
+ # => "---- BEGIN SSH2 PUBLIC KEY ----\nComment: me@me.com\nAAAAB3NzaC1yc2EAAAADAQABAAABAQC9HuXvYJPtQE/o/7TYi63yAopsrJ6TP+lDGdyQ+n\nVVp+5ojAIy9h8/h99UlNxjkiFT2YhI3Fl/pgNDRO4PVo6tlgb3CwiAZjSdeE5RnF79Dkj5\nXsM4j+FLMoXtbRw0K9ok9RKjz6ygIs1JDmaOdXexFnq4nAYU3fSLUa6WoccqTHe8bFuJoA\nv1gbnx09Js8YcVMD96mpTJ3V/MK5YfIv10dbtrDhGug3IS1V2J+0BB9orbQja554N+4S0I\n9rFBgVCpvPmQqddDHd/AdGkLv/zjEfGytjnvp68bEfDinkQkPfuxw01yd5MbcvLv39VVIC\nWtKbqW263HT5LvSxwKorR7\n---- END SSH2 PUBLIC KEY ----"
201
+ ```
202
+
187
203
  ## Copyright
188
204
 
189
- Copyright (c) 2011-2013 James Miller
205
+ Copyright (c) 2011-2015 James Miller
data/lib/sshkey.rb CHANGED
@@ -9,6 +9,7 @@ require 'sshkey/exception'
9
9
  class SSHKey
10
10
  SSH_TYPES = {"rsa" => "ssh-rsa", "dsa" => "ssh-dss"}
11
11
  SSH_CONVERSION = {"rsa" => ["e", "n"], "dsa" => ["p", "q", "g", "pub_key"]}
12
+ SSH2_LINE_LENGTH = 70 # +1 (for line wrap '/' character) must be <= 72
12
13
 
13
14
  class << self
14
15
  # Generate a new keypair and return an SSHKey object
@@ -88,6 +89,29 @@ class SSHKey
88
89
  end
89
90
  end
90
91
 
92
+ # Convert an existing SSH public key to SSH2 (RFC4716) public key
93
+ #
94
+ # ==== Parameters
95
+ # * ssh_public_key<~String> - "ssh-rsa AAAAB3NzaC1yc2EA...."
96
+ # * headers<~Hash> - The Key will be used as the header-tag and the value as the header-value
97
+ #
98
+ def ssh_public_key_to_ssh2_public_key(ssh_public_key, headers = nil)
99
+ raise PublicKeyError, "invalid ssh public key" unless SSHKey.valid_ssh_public_key?(ssh_public_key)
100
+
101
+ source_format, source_key = parse_ssh_public_key(ssh_public_key)
102
+
103
+ # Add a 'Comment' Header Field unless others are explicitly passed in
104
+ if source_comment = ssh_public_key.split(source_key)[1]
105
+ headers = {'Comment' => source_comment.strip} if headers.nil? && !source_comment.empty?
106
+ end
107
+ header_fields = build_ssh2_headers(headers)
108
+
109
+ ssh2_key = "---- BEGIN SSH2 PUBLIC KEY ----\n"
110
+ ssh2_key << header_fields unless header_fields.nil?
111
+ ssh2_key << source_key.scan(/.{1,#{SSH2_LINE_LENGTH}}/).join("\n")
112
+ ssh2_key << "\n---- END SSH2 PUBLIC KEY ----"
113
+ end
114
+
91
115
  private
92
116
 
93
117
  def unpacked_byte_array(ssh_type, encoded_key)
@@ -121,12 +145,28 @@ class SSHKey
121
145
  end
122
146
 
123
147
  def parse_ssh_public_key(public_key)
148
+ raise PublicKeyError, "newlines are not permitted between key data" if public_key =~ /\n(?!$)/
149
+
124
150
  parsed = public_key.split(" ")
125
151
  parsed.each_with_index do |el, index|
126
152
  return parsed[index..(index+1)] if SSH_TYPES.invert[el]
127
153
  end
128
154
  raise PublicKeyError, "cannot determine key type"
129
155
  end
156
+
157
+ def build_ssh2_headers(headers = {})
158
+ return nil if headers.nil? || headers.empty?
159
+
160
+ headers.keys.sort.collect do |header_tag|
161
+ # header-tag must be us-ascii & <= 64 bytes and header-data must be UTF-8 & <= 1024 bytes
162
+ raise PublicKeyError, "SSH2 header-tag '#{header_tag}' must be US-ASCII" unless header_tag.each_byte.all? {|b| b < 128 }
163
+ raise PublicKeyError, "SSH2 header-tag '#{header_tag}' must be <= 64 bytes" unless header_tag.size <= 64
164
+ raise PublicKeyError, "SSH2 header-value for '#{header_tag}' must be <= 1024 bytes" unless headers[header_tag].size <= 1024
165
+
166
+ header_field = "#{header_tag}: #{headers[header_tag]}"
167
+ header_field.scan(/.{1,#{SSH2_LINE_LENGTH}}/).join("\\\n")
168
+ end.join("\n") << "\n"
169
+ end
130
170
  end
131
171
 
132
172
  attr_reader :key_object, :type
@@ -185,6 +225,19 @@ class SSHKey
185
225
  [directives.join(",").strip, SSH_TYPES[type], Base64.encode64(ssh_public_key_conversion).gsub("\n", ""), comment].join(" ").strip
186
226
  end
187
227
 
228
+ # SSH2 public key (RFC4716)
229
+ #
230
+ # ==== Parameters
231
+ # * headers<~Hash> - Keys will be used as header-tags and values as header-values.
232
+ #
233
+ # ==== Examples
234
+ # {'Comment' => '2048-bit RSA created by user@example'}
235
+ # {'x-private-use-tag' => 'Private Use Value'}
236
+ #
237
+ def ssh2_public_key(headers = nil)
238
+ self.class.ssh_public_key_to_ssh2_public_key(ssh_public_key, headers)
239
+ end
240
+
188
241
  # Fingerprints
189
242
  #
190
243
  # MD5 fingerprint for the given SSH public key
@@ -1,3 +1,3 @@
1
1
  class SSHKey
2
- VERSION = "1.6.1"
2
+ VERSION = "1.7.0"
3
3
  end
data/sshkey.gemspec CHANGED
@@ -21,4 +21,5 @@ Gem::Specification.new do |s|
21
21
  s.require_paths = ["lib"]
22
22
 
23
23
  s.add_development_dependency("rake")
24
+ s.add_development_dependency("test-unit")
24
25
  end
data/test/sshkey_test.rb CHANGED
@@ -127,6 +127,46 @@ EOF
127
127
  | |
128
128
  | |
129
129
  +-----------------+
130
+ EOF
131
+
132
+ SSH2_PUBLIC_KEY1 = <<-EOF.rstrip
133
+ ---- BEGIN SSH2 PUBLIC KEY ----
134
+ Comment: me@example.com
135
+ AAAAB3NzaC1yc2EAAAABIwAAAQEArfTA/lKVR84IMc9ZzXOCHr8DVtR8hzWuEVHF6KElav
136
+ RHlk14g0SZu3m908Ejm/XF3EfNHjX9wN+62IMA0QBxkBMFCuLF+U/oeUs0NoDdAEKxjj4n
137
+ 6lq6Ss8aLct+anMy7D1jwvOLbcwV54w1d5JDdlZVdZ6AvHm9otwJq6rNpDgdmXY4HgC2nM
138
+ 9csFpuy0cDpL6fdJx9lcNL2RnkRC4+RMsIB+PxDw0j3vDi04dYLBXMGYjyeGH+mIFpL3PT
139
+ PXGXwL2XDYXZ2H4SQX6bOoKmazTXq6QXuEB665njh1GxXldoIMcSshoJL0hrk3WrTOG22N
140
+ 2CQA+IfHgrXJ+A+QUzKQ==
141
+ ---- END SSH2 PUBLIC KEY ----
142
+ EOF
143
+
144
+ SSH2_PUBLIC_KEY2 = <<-EOF.rstrip
145
+ ---- BEGIN SSH2 PUBLIC KEY ----
146
+ AAAAB3NzaC1yc2EAAAABIwAAAQEAxl6TpN7uFiY/JZ8qDnD7UrxDP+ABeh2PVg8Du1LEgX
147
+ Nk0+YWCeP5S6oHklqaWeDlbmAs1oHsBwCMAVpMa5tgONOLvz4JgwgkiqQEbKR8ofWJ+LAD
148
+ UElvqRVGmGiNEMLI6GJWeneL4sjmbb8d6U+M53c6iWG0si9XE5m7teBQSsCl0Tk3qMIkQG
149
+ w5zpJeCXjZ8KpJhIJRYgexFkGgPlYRV+UYIhxpUW90t0Ra5i6JOFYwq98k5S/6SJIZQ/A9
150
+ F4JNzwLw3eVxZj0yVHWxkGz1+TyELNY1kOyMxnZaqSfGzSQJTrnIXpdweVHuYh1LtOgedR
151
+ QhCyiELeSMGwio1vRPKw==
152
+ ---- END SSH2 PUBLIC KEY ----
153
+ EOF
154
+
155
+ SSH2_PUBLIC_KEY3 = <<-EOF.rstrip
156
+ ---- BEGIN SSH2 PUBLIC KEY ----
157
+ Comment: 1024-bit DSA with provided comment
158
+ x-private-use-header: some value that is long enough to go to wrap aro\\
159
+ und to a new line.
160
+ AAAAB3NzaC1kc3MAAACBALyVy5dwVwgL3CxXzsvo8DBh58qArQLBNIPW/f9pptmy7jD5QX
161
+ zOw+12w0/z4lZ86ncoVutRMf44OABcX9ovhRl+luxB7jjpkVXy/p2ZaqPbeyTQUtdTmXa2
162
+ y4n053Jd61VeMG+iLP7+viT+Ib96y9aVUYQfCrl5heBDUZ9cAFjdAAAAFQDFXnO7JJpFKw
163
+ keoor4GWGHtz0D2QAAAIEAqel0RUBO0MY5b3DZ69J/mRzUifN1O6twk4er2ph0JpryuUwZ
164
+ ohLpcVZwqoGWmPQy/ZHmV1b3RtT9GWUa+HUqKdMhFVOx/iq1khVfLi83whjMMvXj3ecqd0
165
+ yzGxGHnSsjVKefa2ywCLHrh4nlUVIaXI5gQpgMyVbMcromDe1WZzoAAACBAIwTRPAEcroq
166
+ OzaebiVspFcmsXxDQ4wXQZQdho1ExW6FKS8s7/6pItmZYXTvJDwLXgq2/iK1fRRcKk2PJE
167
+ aSuJR7WeNGsJKfWmQ2UbOhqA3wWLDazIZtcMKjFzD0hM4E8qgjHjMvKDE6WgT6SFP+tqx3
168
+ nnh7pJWwsbGjSMQexpyR
169
+ ---- END SSH2 PUBLIC KEY ----
130
170
  EOF
131
171
 
132
172
  def setup
@@ -202,6 +242,20 @@ EOF
202
242
  assert_equal expected4, @key_without_comment.ssh_public_key
203
243
  end
204
244
 
245
+ def test_ssh2_public_key_output
246
+ expected1 = SSH2_PUBLIC_KEY1
247
+ expected2 = SSH2_PUBLIC_KEY2
248
+ expected3 = SSH2_PUBLIC_KEY3
249
+ public_key1 = "ssh-rsa #{SSH_PUBLIC_KEY1} me@example.com"
250
+ public_key2 = "ssh-rsa #{SSH_PUBLIC_KEY2}"
251
+ public_key3 = "ssh-rsa #{SSH_PUBLIC_KEY3} 1024-bit DSA with provided comment"
252
+
253
+ assert_equal expected1, @key1.ssh2_public_key
254
+ assert_equal expected2, @key2.ssh2_public_key({})
255
+ assert_equal expected3, @key3.ssh2_public_key({'Comment' => '1024-bit DSA with provided comment',
256
+ 'x-private-use-header' => 'some value that is long enough to go to wrap around to a new line.'})
257
+ end
258
+
205
259
  def test_public_key_directives
206
260
  assert_equal [], SSHKey.generate.directives
207
261
 
@@ -253,6 +307,19 @@ EOF
253
307
  assert !SSHKey.valid_ssh_public_key?(invalid5)
254
308
  end
255
309
 
310
+ def test_ssh_public_key_validation_with_newlines
311
+ expected1 = "ssh-rsa #{SSH_PUBLIC_KEY1}\n"
312
+ invalid1 = "ssh-rsa #{SSH_PUBLIC_KEY1}\nme@example.com"
313
+ invalid2 = "ssh-rsa #{SSH_PUBLIC_KEY1}\n me@example.com"
314
+ invalid3 = "ssh-rsa #{SSH_PUBLIC_KEY1} \nme@example.com"
315
+
316
+ assert SSHKey.valid_ssh_public_key?(expected1)
317
+
318
+ assert !SSHKey.valid_ssh_public_key?(invalid1)
319
+ assert !SSHKey.valid_ssh_public_key?(invalid2)
320
+ assert !SSHKey.valid_ssh_public_key?(invalid3)
321
+ end
322
+
256
323
  def test_ssh_public_key_bits
257
324
  expected1 = "ssh-rsa #{SSH_PUBLIC_KEY1} me@example.com"
258
325
  expected2 = "ssh-rsa #{SSH_PUBLIC_KEY2} me@example.com"
@@ -276,6 +343,17 @@ EOF
276
343
  assert_equal( "byte array too short", exception2.message )
277
344
  assert_equal( "cannot determine key type", exception3.message )
278
345
  end
346
+
347
+ def test_ssh2_public_key_bits
348
+ public_key1 = "ssh-rsa #{SSH_PUBLIC_KEY1} me@example.com"
349
+ public_key2 = "ssh-rsa #{SSH_PUBLIC_KEY2}"
350
+ public_key3 = "ssh-dss #{SSH_PUBLIC_KEY3} 1024-bit DSA with provided comment"
351
+
352
+ assert_equal(SSH2_PUBLIC_KEY1, SSHKey.ssh_public_key_to_ssh2_public_key(public_key1))
353
+ assert_equal(SSH2_PUBLIC_KEY2, SSHKey.ssh_public_key_to_ssh2_public_key(public_key2))
354
+ assert_equal(SSH2_PUBLIC_KEY2, SSHKey.ssh_public_key_to_ssh2_public_key(public_key2, {}))
355
+ assert_equal(SSH2_PUBLIC_KEY3, SSHKey.ssh_public_key_to_ssh2_public_key(public_key3, {'Comment' => '1024-bit DSA with provided comment', 'x-private-use-header' => 'some value that is long enough to go to wrap around to a new line.'}))
356
+ end
279
357
 
280
358
  def test_exponent
281
359
  assert_equal 35, @key1.key_object.e.to_i
metadata CHANGED
@@ -1,27 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sshkey
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.1
4
+ version: 1.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Miller
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-14 00:00:00.000000000 Z
11
+ date: 2015-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: test-unit
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
25
39
  - !ruby/object:Gem::Version
26
40
  version: '0'
27
41
  description: Generate private/public SSH keypairs using pure Ruby
@@ -31,8 +45,8 @@ executables: []
31
45
  extensions: []
32
46
  extra_rdoc_files: []
33
47
  files:
34
- - .gitignore
35
- - .travis.yml
48
+ - ".gitignore"
49
+ - ".travis.yml"
36
50
  - Gemfile
37
51
  - LICENSE
38
52
  - README.md
@@ -52,17 +66,17 @@ require_paths:
52
66
  - lib
53
67
  required_ruby_version: !ruby/object:Gem::Requirement
54
68
  requirements:
55
- - - '>='
69
+ - - ">="
56
70
  - !ruby/object:Gem::Version
57
71
  version: '0'
58
72
  required_rubygems_version: !ruby/object:Gem::Requirement
59
73
  requirements:
60
- - - '>='
74
+ - - ">="
61
75
  - !ruby/object:Gem::Version
62
76
  version: '0'
63
77
  requirements: []
64
78
  rubyforge_project: sshkey
65
- rubygems_version: 2.0.3
79
+ rubygems_version: 2.4.5
66
80
  signing_key:
67
81
  specification_version: 4
68
82
  summary: SSH private/public key generator in Ruby