cyberplat_pki 2.0.1 → 2.0.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.
- data/cyberplat_pki.gemspec +1 -1
- data/lib/cyberplat_pki/document.rb +4 -1
- data/lib/cyberplat_pki/signature_packet.rb +3 -2
- data/spec/spec_helper.rb +16 -7
- metadata +1 -1
data/cyberplat_pki.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |gem|
|
6
6
|
gem.name = "cyberplat_pki"
|
7
|
-
gem.version = "2.0.
|
7
|
+
gem.version = "2.0.2"
|
8
8
|
gem.authors = ["Peter Zotov"]
|
9
9
|
gem.email = ["whitequark@whitequark.org"]
|
10
10
|
gem.description = %q{CyberplatPKI is a library for signing Cyberplat requests.}
|
@@ -45,7 +45,10 @@ module CyberplatPKI
|
|
45
45
|
end
|
46
46
|
|
47
47
|
def self.encode64(data)
|
48
|
-
encoded = Base64.encode64(data)
|
48
|
+
encoded = Base64.encode64(data)
|
49
|
+
encoded.gsub!(/\n/, "")
|
50
|
+
|
51
|
+
encoded = encoded.scan(/.{1,64}/).join("\r\n") + "\r\n"
|
49
52
|
|
50
53
|
crc = Digest::CRC24.checksum data
|
51
54
|
|
data/spec/spec_helper.rb
CHANGED
@@ -16,15 +16,24 @@ RSpec.configure do |config|
|
|
16
16
|
config.order = 'random'
|
17
17
|
end
|
18
18
|
|
19
|
-
|
19
|
+
if RUBY_ENGINE == 'ruby' &&
|
20
|
+
RUBY_PLATFORM =~ /i.86/
|
21
|
+
require 'time'
|
20
22
|
|
21
|
-
if Time.now != Time.parse('5th November 2005 00:00 UTC')
|
22
|
-
|
23
|
+
if Time.now != Time.parse('5th November 2005 00:00 UTC')
|
24
|
+
if ENV['TIME_TRAVEL'] != '1'
|
25
|
+
puts "Travelling back in time..."
|
23
26
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
27
|
+
ENV['TIME_TRAVEL'] = '1'
|
28
|
+
|
29
|
+
mock_path = File.expand_path('../../ext/mock_the_clock/mock_the_clock.so', __FILE__)
|
30
|
+
exec "sh", "-c", "LD_PRELOAD=#{mock_path} #{$0}"
|
31
|
+
else
|
32
|
+
puts "Time machine failure, continuing."
|
33
|
+
end
|
34
|
+
else
|
35
|
+
puts "Time.now: #{Time.now}"
|
36
|
+
end
|
28
37
|
end
|
29
38
|
|
30
39
|
require 'cyberplat_pki'
|