putty-key 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +0 -0
  4. data/CHANGES.md +16 -0
  5. data/Gemfile +0 -6
  6. data/LICENSE +1 -1
  7. data/README.md +32 -6
  8. data/Rakefile +24 -0
  9. data/lib/putty/key.rb +6 -6
  10. data/lib/putty/key/argon2_params.rb +101 -0
  11. data/lib/putty/key/error.rb +17 -0
  12. data/lib/putty/key/libargon2.rb +54 -0
  13. data/lib/putty/key/ppk.rb +469 -103
  14. data/lib/putty/key/util.rb +10 -10
  15. data/lib/putty/key/version.rb +1 -1
  16. data/putty-key.gemspec +11 -2
  17. data/test/argon2_params_test.rb +144 -0
  18. data/test/fixtures/{dss-1024-encrypted.ppk → dss-1024-encrypted-format-2.ppk} +17 -17
  19. data/test/fixtures/dss-1024-encrypted-format-3.ppk +22 -0
  20. data/test/fixtures/{dss-1024.ppk → dss-1024-format-2.ppk} +17 -17
  21. data/test/fixtures/dss-1024-format-3.ppk +17 -0
  22. data/test/fixtures/{ecdsa-sha2-nistp256-encrypted.ppk → ecdsa-sha2-nistp256-encrypted-format-2.ppk} +10 -10
  23. data/test/fixtures/ecdsa-sha2-nistp256-encrypted-format-3.ppk +15 -0
  24. data/test/fixtures/{ecdsa-sha2-nistp256.ppk → ecdsa-sha2-nistp256-format-2.ppk} +10 -10
  25. data/test/fixtures/ecdsa-sha2-nistp256-format-3.ppk +10 -0
  26. data/test/fixtures/{ecdsa-sha2-nistp384-encrypted.ppk → ecdsa-sha2-nistp384-encrypted-format-2.ppk} +11 -11
  27. data/test/fixtures/ecdsa-sha2-nistp384-encrypted-format-3.ppk +16 -0
  28. data/test/fixtures/{ecdsa-sha2-nistp384.ppk → ecdsa-sha2-nistp384-format-2.ppk} +11 -11
  29. data/test/fixtures/ecdsa-sha2-nistp384-format-3.ppk +11 -0
  30. data/test/fixtures/{ecdsa-sha2-nistp521-encrypted.ppk → ecdsa-sha2-nistp521-encrypted-format-2.ppk} +12 -12
  31. data/test/fixtures/ecdsa-sha2-nistp521-encrypted-format-3.ppk +17 -0
  32. data/test/fixtures/{ecdsa-sha2-nistp521.ppk → ecdsa-sha2-nistp521-format-2.ppk} +12 -12
  33. data/test/fixtures/ecdsa-sha2-nistp521-format-3.ppk +12 -0
  34. data/test/fixtures/{rsa-2048-encrypted.ppk → rsa-2048-encrypted-format-2.ppk} +26 -26
  35. data/test/fixtures/rsa-2048-encrypted-format-3.ppk +31 -0
  36. data/test/fixtures/{rsa-2048.ppk → rsa-2048-format-2.ppk} +26 -26
  37. data/test/fixtures/rsa-2048-format-3.ppk +26 -0
  38. data/test/fixtures/test-blank-comment.ppk +11 -11
  39. data/test/fixtures/test-empty-blobs-encrypted.ppk +6 -0
  40. data/test/fixtures/test-empty-blobs.ppk +6 -0
  41. data/test/fixtures/{test-encrypted.ppk → test-encrypted-format-2.ppk} +11 -11
  42. data/test/fixtures/test-encrypted-format-3.ppk +16 -0
  43. data/test/fixtures/test-encrypted-type-d-format-3.ppk +16 -0
  44. data/test/fixtures/test-encrypted-type-i-format-3.ppk +16 -0
  45. data/test/fixtures/{test-unix-line-endings.ppk → test-format-2.ppk} +0 -0
  46. data/test/fixtures/test-format-3.ppk +11 -0
  47. data/test/fixtures/test-invalid-argon2-memory-for-libargon2.ppk +16 -0
  48. data/test/fixtures/test-invalid-argon2-memory-maximum.ppk +16 -0
  49. data/test/fixtures/test-invalid-argon2-memory.ppk +16 -0
  50. data/test/fixtures/test-invalid-argon2-parallelism-maximum.ppk +16 -0
  51. data/test/fixtures/test-invalid-argon2-parallelism.ppk +16 -0
  52. data/test/fixtures/test-invalid-argon2-passes-maximum.ppk +16 -0
  53. data/test/fixtures/test-invalid-argon2-passes.ppk +16 -0
  54. data/test/fixtures/test-invalid-argon2-salt.ppk +16 -0
  55. data/test/fixtures/test-invalid-blob-lines.ppk +11 -11
  56. data/test/fixtures/test-invalid-encryption-type.ppk +11 -11
  57. data/test/fixtures/test-invalid-format-1.ppk +11 -11
  58. data/test/fixtures/{test-invalid-format-3.ppk → test-invalid-format-4.ppk} +11 -11
  59. data/test/fixtures/test-invalid-key-derivation.ppk +16 -0
  60. data/test/fixtures/test-invalid-private-mac.ppk +11 -11
  61. data/test/fixtures/test-legacy-mac-line-endings.ppk +1 -0
  62. data/test/fixtures/test-missing-final-line-ending.ppk +11 -0
  63. data/test/fixtures/test-truncated.ppk +10 -10
  64. data/test/fixtures/{test.ppk → test-windows-line-endings.ppk} +0 -0
  65. data/test/openssl_test.rb +243 -53
  66. data/test/ppk_test.rb +325 -44
  67. metadata +73 -23
  68. metadata.gz.sig +0 -0
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: putty-key
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Philip Ross
@@ -29,10 +29,24 @@ cert_chain:
29
29
  J3Zn/kSTjTekiaspyGbczC3PUaeJNxr+yCvR4sk71Xmk/GaKKGOHedJ1uj/LAXrA
30
30
  MR0mpl7b8zCg0PFC1J73uw==
31
31
  -----END CERTIFICATE-----
32
- date: 2019-12-26 00:00:00.000000000 Z
33
- dependencies: []
32
+ date: 2021-05-24 00:00:00.000000000 Z
33
+ dependencies:
34
+ - !ruby/object:Gem::Dependency
35
+ name: ffi
36
+ requirement: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.0'
41
+ type: :runtime
42
+ prerelease: false
43
+ version_requirements: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.0'
34
48
  description: |
35
- PuTTY::Key is a pure-Ruby implementation of the PuTTY private key (ppk) format,
49
+ PuTTY::Key is a Ruby implementation of the PuTTY private key (ppk) format,
36
50
  handling reading and writing .ppk files. It includes a refinement to Ruby's
37
51
  OpenSSL library to add support for converting DSA, EC and RSA private keys to
38
52
  and from PuTTY private key files. This allows OpenSSH ecdsa, ssh-dss and ssh-rsa
@@ -52,38 +66,68 @@ files:
52
66
  - README.md
53
67
  - Rakefile
54
68
  - lib/putty/key.rb
69
+ - lib/putty/key/argon2_params.rb
55
70
  - lib/putty/key/error.rb
71
+ - lib/putty/key/libargon2.rb
56
72
  - lib/putty/key/openssl.rb
57
73
  - lib/putty/key/ppk.rb
58
74
  - lib/putty/key/util.rb
59
75
  - lib/putty/key/version.rb
60
76
  - putty-key.gemspec
61
- - test/fixtures/dss-1024-encrypted.ppk
77
+ - test/argon2_params_test.rb
78
+ - test/fixtures/dss-1024-encrypted-format-2.ppk
79
+ - test/fixtures/dss-1024-encrypted-format-3.ppk
80
+ - test/fixtures/dss-1024-format-2.ppk
81
+ - test/fixtures/dss-1024-format-3.ppk
62
82
  - test/fixtures/dss-1024.pem
63
- - test/fixtures/dss-1024.ppk
64
83
  - test/fixtures/ecdsa-secp256k1.pem
65
- - test/fixtures/ecdsa-sha2-nistp256-encrypted.ppk
84
+ - test/fixtures/ecdsa-sha2-nistp256-encrypted-format-2.ppk
85
+ - test/fixtures/ecdsa-sha2-nistp256-encrypted-format-3.ppk
86
+ - test/fixtures/ecdsa-sha2-nistp256-format-2.ppk
87
+ - test/fixtures/ecdsa-sha2-nistp256-format-3.ppk
66
88
  - test/fixtures/ecdsa-sha2-nistp256.pem
67
- - test/fixtures/ecdsa-sha2-nistp256.ppk
68
- - test/fixtures/ecdsa-sha2-nistp384-encrypted.ppk
89
+ - test/fixtures/ecdsa-sha2-nistp384-encrypted-format-2.ppk
90
+ - test/fixtures/ecdsa-sha2-nistp384-encrypted-format-3.ppk
91
+ - test/fixtures/ecdsa-sha2-nistp384-format-2.ppk
92
+ - test/fixtures/ecdsa-sha2-nistp384-format-3.ppk
69
93
  - test/fixtures/ecdsa-sha2-nistp384.pem
70
- - test/fixtures/ecdsa-sha2-nistp384.ppk
71
- - test/fixtures/ecdsa-sha2-nistp521-encrypted.ppk
94
+ - test/fixtures/ecdsa-sha2-nistp521-encrypted-format-2.ppk
95
+ - test/fixtures/ecdsa-sha2-nistp521-encrypted-format-3.ppk
96
+ - test/fixtures/ecdsa-sha2-nistp521-format-2.ppk
97
+ - test/fixtures/ecdsa-sha2-nistp521-format-3.ppk
72
98
  - test/fixtures/ecdsa-sha2-nistp521.pem
73
- - test/fixtures/ecdsa-sha2-nistp521.ppk
74
- - test/fixtures/rsa-2048-encrypted.ppk
99
+ - test/fixtures/rsa-2048-encrypted-format-2.ppk
100
+ - test/fixtures/rsa-2048-encrypted-format-3.ppk
101
+ - test/fixtures/rsa-2048-format-2.ppk
102
+ - test/fixtures/rsa-2048-format-3.ppk
75
103
  - test/fixtures/rsa-2048.pem
76
- - test/fixtures/rsa-2048.ppk
77
104
  - test/fixtures/test-blank-comment.ppk
78
- - test/fixtures/test-encrypted.ppk
105
+ - test/fixtures/test-empty-blobs-encrypted.ppk
106
+ - test/fixtures/test-empty-blobs.ppk
107
+ - test/fixtures/test-encrypted-format-2.ppk
108
+ - test/fixtures/test-encrypted-format-3.ppk
109
+ - test/fixtures/test-encrypted-type-d-format-3.ppk
110
+ - test/fixtures/test-encrypted-type-i-format-3.ppk
111
+ - test/fixtures/test-format-2.ppk
112
+ - test/fixtures/test-format-3.ppk
113
+ - test/fixtures/test-invalid-argon2-memory-for-libargon2.ppk
114
+ - test/fixtures/test-invalid-argon2-memory-maximum.ppk
115
+ - test/fixtures/test-invalid-argon2-memory.ppk
116
+ - test/fixtures/test-invalid-argon2-parallelism-maximum.ppk
117
+ - test/fixtures/test-invalid-argon2-parallelism.ppk
118
+ - test/fixtures/test-invalid-argon2-passes-maximum.ppk
119
+ - test/fixtures/test-invalid-argon2-passes.ppk
120
+ - test/fixtures/test-invalid-argon2-salt.ppk
79
121
  - test/fixtures/test-invalid-blob-lines.ppk
80
122
  - test/fixtures/test-invalid-encryption-type.ppk
81
123
  - test/fixtures/test-invalid-format-1.ppk
82
- - test/fixtures/test-invalid-format-3.ppk
124
+ - test/fixtures/test-invalid-format-4.ppk
125
+ - test/fixtures/test-invalid-key-derivation.ppk
83
126
  - test/fixtures/test-invalid-private-mac.ppk
127
+ - test/fixtures/test-legacy-mac-line-endings.ppk
128
+ - test/fixtures/test-missing-final-line-ending.ppk
84
129
  - test/fixtures/test-truncated.ppk
85
- - test/fixtures/test-unix-line-endings.ppk
86
- - test/fixtures/test.ppk
130
+ - test/fixtures/test-windows-line-endings.ppk
87
131
  - test/openssl_test.rb
88
132
  - test/ppk_test.rb
89
133
  - test/test_helper.rb
@@ -92,7 +136,12 @@ files:
92
136
  homepage: https://github.com/philr/putty-key
93
137
  licenses:
94
138
  - MIT
95
- metadata: {}
139
+ metadata:
140
+ bug_tracker_uri: https://github.com/philr/putty-key/issues
141
+ changelog_uri: https://github.com/philr/putty-key/blob/master/CHANGES.md
142
+ documentation_uri: https://rubydoc.info/gems/putty-key/1.1.0
143
+ homepage_uri: https://github.com/philr/putty-key
144
+ source_code_uri: https://github.com/philr/putty-key/tree/v1.1.0
96
145
  post_install_message:
97
146
  rdoc_options:
98
147
  - "--title"
@@ -113,10 +162,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
113
162
  - - ">="
114
163
  - !ruby/object:Gem::Version
115
164
  version: '0'
116
- requirements: []
117
- rubygems_version: 3.1.2
165
+ requirements:
166
+ - libargon2 to handle format 3 .ppk files
167
+ rubygems_version: 3.2.3
118
168
  signing_key:
119
169
  specification_version: 4
120
- summary: Reads and writes PuTTY private key (.ppk) files. Refines OpenSSL::PKey to
121
- allow key conversion.
170
+ summary: PuTTY private key (.ppk) library. Supports reading and writing with a refinement
171
+ to OpenSSL::PKey to allow key conversion.
122
172
  test_files: []
metadata.gz.sig CHANGED
Binary file