rnp 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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 819cdabaf35f30cd1ab40367c4f1ac1e737f00ed
4
- data.tar.gz: 4ef0f37aa752856fdff385d5008d0fd1c64b8846
2
+ SHA256:
3
+ metadata.gz: 8e2f95289ddc3446f07e4d29179308bbd1602f7e5b47f9eeac7236b4f76816fc
4
+ data.tar.gz: f20f54449f44d56f78db2ef6c934ef5d254380c8f35ca3c18b279d5423f968ee
5
5
  SHA512:
6
- metadata.gz: 571f718f9d06e6b5b796b2d867af8edb0a4e36ebb09d7db52e40c93582998761c271d93b10306378e73823fce0a604c11954cb855ee5ce05915dc7de49e14299
7
- data.tar.gz: c42de97ae72fb766073073d4080f36e9b93cae4a558a53b5a05377eaf946d7abc45ffe9c32f1f683b41275da78ba5abaa8ceb4f08f7474db8ca60f95fa56e381
6
+ metadata.gz: 3445f09a96636e4586ab8499f91e0a0edcf257941dd10730415a68a0899148e43edc2fe7d7025da0e15813333f0f21d62fb82c88ea96e7a3aff7f920d35bb4f5
7
+ data.tar.gz: e4836dfb1306b10396ebcaf55ef07298f6afe2a7c21ccfdd005435fa55dd907c199a7a6ec5a834d7d7c2de1c74535afada9b55e1bca1a54f134bbd8cd75dea0f
@@ -1,5 +1,8 @@
1
1
  == Changelog
2
2
 
3
+ === 1.0.1 [07-08-2018]
4
+ * Fixed Rnp#public_key_count and Rnp#secret_key_count raising errors.
5
+
3
6
  === 1.0.0 [05-01-2018]
4
7
  * Completely rewritten for RNP's new FFI.
5
8
 
@@ -47,7 +47,7 @@ module LibRnp
47
47
  %i[string pointer pointer pointer pointer],
48
48
  :uint32
49
49
  attach_function :rnp_detect_key_format,
50
- %i[pointer int pointer],
50
+ %i[pointer size_t pointer],
51
51
  :uint32
52
52
  attach_function :rnp_load_keys,
53
53
  %i[pointer string pointer uint32],
@@ -77,10 +77,10 @@ module LibRnp
77
77
  %i[pointer pointer],
78
78
  :uint32
79
79
  attach_function :rnp_key_get_uid_at,
80
- %i[pointer int pointer],
80
+ %i[pointer size_t pointer],
81
81
  :uint32
82
82
  attach_function :rnp_key_add_uid,
83
- %i[pointer string string uint32 uint8 int],
83
+ %i[pointer string string uint32 uint8 bool],
84
84
  :uint32
85
85
  attach_function :rnp_key_get_fprint,
86
86
  %i[pointer pointer],
@@ -176,7 +176,7 @@ module LibRnp
176
176
  %i[pointer pointer],
177
177
  :uint32
178
178
  attach_function :rnp_op_verify_get_signature_at,
179
- %i[pointer int pointer],
179
+ %i[pointer size_t pointer],
180
180
  :uint32
181
181
  attach_function :rnp_op_verify_get_file_info,
182
182
  %i[pointer pointer pointer],
@@ -203,7 +203,7 @@ module LibRnp
203
203
  %i[pointer string],
204
204
  :uint32
205
205
  attach_function :rnp_input_from_memory,
206
- %i[pointer pointer int bool],
206
+ %i[pointer pointer size_t bool],
207
207
  :uint32
208
208
  attach_function :rnp_input_from_callback,
209
209
  %i[pointer rnp_input_reader_t pointer pointer],
@@ -215,7 +215,7 @@ module LibRnp
215
215
  %i[pointer string],
216
216
  :uint32
217
217
  attach_function :rnp_output_to_memory,
218
- %i[pointer int],
218
+ %i[pointer size_t],
219
219
  :uint32
220
220
  attach_function :rnp_output_memory_get_buf,
221
221
  %i[pointer pointer pointer bool],
@@ -248,7 +248,7 @@ module LibRnp
248
248
  %i[pointer uint32],
249
249
  :uint32
250
250
  attach_function :rnp_op_encrypt_add_password,
251
- %i[pointer string string int string],
251
+ %i[pointer string string size_t string],
252
252
  :uint32
253
253
  attach_function :rnp_op_encrypt_set_armor,
254
254
  %i[pointer bool],
@@ -91,7 +91,7 @@ class Rnp
91
91
  # @param primary [Boolean] if true then this userid will be marked as the
92
92
  # primary userid
93
93
  # @return [void]
94
- def add_userid(userid, hash: nil, expiration_time: nil, key_flags: 0,
94
+ def add_userid(userid, hash: nil, expiration_time: 0, key_flags: 0,
95
95
  primary: false)
96
96
  Rnp.call_ffi(:rnp_key_add_uid, @ptr, userid, hash, expiration_time,
97
97
  key_flags, primary)
@@ -224,13 +224,13 @@ class Rnp
224
224
 
225
225
  def public_key_count
226
226
  pcount = FFI::MemoryPointer.new(:size_t)
227
- Rnp.call_ffi(:rnp_get_public_key_count, pcount)
227
+ Rnp.call_ffi(:rnp_get_public_key_count, @ptr, pcount)
228
228
  pcount.read(:size_t)
229
229
  end
230
230
 
231
231
  def secret_key_count
232
232
  pcount = FFI::MemoryPointer.new(:size_t)
233
- Rnp.call_ffi(:rnp_get_secret_key_count, pcount)
233
+ Rnp.call_ffi(:rnp_get_secret_key_count, @ptr, pcount)
234
234
  pcount.read(:size_t)
235
235
  end
236
236
 
@@ -3,6 +3,6 @@
3
3
  # (c) 2018 Ribose Inc.
4
4
 
5
5
  class Rnp
6
- VERSION = '1.0.0'
6
+ VERSION = '1.0.1'
7
7
  end # class
8
8
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rnp
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-11 00:00:00.000000000 Z
11
+ date: 2018-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor
@@ -197,7 +197,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
197
197
  version: '0'
198
198
  requirements: []
199
199
  rubyforge_project:
200
- rubygems_version: 2.6.14
200
+ rubygems_version: 2.7.7
201
201
  signing_key:
202
202
  specification_version: 4
203
203
  summary: Ruby bindings for the rnp OpenPGP library