botan 0.1.0 → 0.1.2

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
2
  SHA1:
3
- metadata.gz: c3e3d7ff23f00256e3b507bdbc67029f88887aa7
4
- data.tar.gz: 2eff70990334914d19595cb04907f50256664674
3
+ metadata.gz: 24ce0b7aee54e4d4aaecf54ad3bf548cd2f92d25
4
+ data.tar.gz: 882b5101e64efa2ee48820ce271766c0c5c4728e
5
5
  SHA512:
6
- metadata.gz: fd92e2df19b1b3b5092057cd3497774c263c9371caf12dd36df2e8355a20ae1446de63b090570c24d02581d3d9387e2ddedbfc72f85cb18aa905c3ffb01e47eb
7
- data.tar.gz: 9280656ff057c834d6fffdd40448aadbcf6492b88121ac364988f44eeb98189035e938fa98c33feab2099d04a4bc6a0bc011897fcaa1f25a30d01cb5d1f8a570
6
+ metadata.gz: 806f394c02ffc7b8b289adc5e6cc76d7b749d10b74b08ead63a1639f056a366231933c504aebc7b0d520343095e5c5d23422d2148b3f02ef7bcfac65b6bed1d6
7
+ data.tar.gz: aa8f45dbc0197b447f8f9fc24570584d83d6c16b408377ad581a7f71cba1eeb5a27e8a5786b7e76535f90ceeaeced2e91c42fab10b8bb350c182492ff968b566
@@ -37,6 +37,10 @@ module LibBotan
37
37
  ' version of the Ruby module'
38
38
  end
39
39
 
40
+ LIB_VERSION = [botan_version_major, \
41
+ botan_version_minor, \
42
+ botan_version_patch].freeze
43
+
40
44
  # Utility Functions
41
45
  attach_function :botan_same_mem,
42
46
  %i[pointer pointer size_t],
@@ -55,8 +55,15 @@ module Botan
55
55
  # @return [Boolean] true if the signature is valid
56
56
  def check_signature(signature)
57
57
  sig_buf = FFI::MemoryPointer.from_data(signature)
58
- rc = Botan.call_ffi_rc(:botan_pk_op_verify_finish,
59
- @ptr, sig_buf, sig_buf.size)
58
+ # workaround 2.2.0 release bug
59
+ if LibBotan::LIB_VERSION == [2, 2, 0]
60
+ rc = LibBotan.botan_pk_op_verify_finish(@ptr, sig_buf, sig_buf.size)
61
+ raise Botan::Error, 'FFI call unexpectedly failed' \
62
+ unless [0, -1].include?(rc)
63
+ else
64
+ rc = Botan.call_ffi_rc(:botan_pk_op_verify_finish,
65
+ @ptr, sig_buf, sig_buf.size)
66
+ end
60
67
  rc.zero?
61
68
  end
62
69
 
@@ -3,6 +3,6 @@
3
3
  # (c) 2017 Ribose Inc.
4
4
 
5
5
  module Botan
6
- VERSION = '0.1.0'
6
+ VERSION = '0.1.2'
7
7
  end # module
8
8
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: botan
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-01 00:00:00.000000000 Z
11
+ date: 2017-12-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 0.8.7
89
+ version: 0.9.11
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 0.8.7
96
+ version: 0.9.11
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: redcarpet
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -182,7 +182,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
182
182
  requirements:
183
183
  - - ">="
184
184
  - !ruby/object:Gem::Version
185
- version: '0'
185
+ version: 2.3.0
186
186
  required_rubygems_version: !ruby/object:Gem::Requirement
187
187
  requirements:
188
188
  - - ">="
@@ -190,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
190
190
  version: '0'
191
191
  requirements: []
192
192
  rubyforge_project:
193
- rubygems_version: 2.5.2
193
+ rubygems_version: 2.6.8
194
194
  signing_key:
195
195
  specification_version: 4
196
196
  summary: The Ruby interface for Botan.