asn1-diag 0.0.1 → 0.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.
- checksums.yaml +4 -4
- data/asn1-diag.gemspec +2 -2
- data/lib/asn1-pure.rb +5 -3
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 27de15533d0eb1dc4395b6234f4c89b76a29f194
|
|
4
|
+
data.tar.gz: 15289543603b583a92ee355ddb2d85a0bb15d430
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a77ebd050944e67e01af2e198f8bda92756037fe18b57b3f62339d451902768c93d0bf8761770b2335d805f32acd216b630f41b457b7da1c431a43bf8d96e58d
|
|
7
|
+
data.tar.gz: 221d421c18ebed36709794c12348d524c497d15d2b7219f8ec74f252614aaa0c2ffee39441c7601fe8a6a6c5d3682ff4b3919af99e124dcfe5ee4f6d23d2584d
|
data/asn1-diag.gemspec
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Gem::Specification.new do |s|
|
|
2
2
|
s.name = "asn1-diag"
|
|
3
|
-
s.version = "0.0.
|
|
3
|
+
s.version = "0.0.2"
|
|
4
4
|
s.summary = "ASN1 BER/DER diagnostics"
|
|
5
5
|
s.description = %q{asn1-diag implements some diagnostics for ASN1 BER (X.690) and DER}
|
|
6
6
|
s.author = "Carsten Bormann"
|
|
@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
|
|
|
9
9
|
s.has_rdoc = false
|
|
10
10
|
s.files = Dir['lib/**/*.rb'] + %w(asn1-diag.gemspec) + Dir['bin/**/*.rb']
|
|
11
11
|
s.executables = Dir['bin/**/*.rb'].map {|x| File.basename(x)}
|
|
12
|
-
s.required_ruby_version = '>= 2.
|
|
12
|
+
s.required_ruby_version = '>= 2.3.1'
|
|
13
13
|
|
|
14
14
|
s.require_paths = ["lib"]
|
|
15
15
|
|
data/lib/asn1-pure.rb
CHANGED
|
@@ -86,7 +86,8 @@ module ASN1
|
|
|
86
86
|
READABLE = Hash.new {|h, k| [k]}
|
|
87
87
|
READABLE[[0x30, 0x10]] = :seq
|
|
88
88
|
READABLE[[0x31, 0x11]] = :set
|
|
89
|
-
READABLE[[
|
|
89
|
+
READABLE[[1, 1]] = :bool, ->(s) {s != "\0"}
|
|
90
|
+
READABLE[[2, 2]] = :int, ->(s) {be_decode(s)} # XXX: negative!
|
|
90
91
|
READABLE[[3, 3]] = :bits
|
|
91
92
|
READABLE[[4, 4]] = :b
|
|
92
93
|
READABLE[[5, 5]] = :null, ->(s) {:null}
|
|
@@ -94,7 +95,8 @@ module ASN1
|
|
|
94
95
|
READABLE[[12, 12]] = :u
|
|
95
96
|
READABLE[[19, 19]] = :s
|
|
96
97
|
READABLE[[22, 22]] = :ia5
|
|
97
|
-
READABLE[[23, 23]] = :t # time
|
|
98
|
+
READABLE[[23, 23]] = :t # 2-digit year utc time
|
|
99
|
+
READABLE[[24, 24]] = :gt # generalized time
|
|
98
100
|
(0..15).each do |i|
|
|
99
101
|
READABLE[[0xA0 + i, i]] = :"exp#{i}"
|
|
100
102
|
end
|
|
@@ -129,7 +131,7 @@ module ASN1
|
|
|
129
131
|
end
|
|
130
132
|
fail "no indef yet @pos"
|
|
131
133
|
end
|
|
132
|
-
fail [@pos, limit] if @pos != limit
|
|
134
|
+
fail [@pos, limit].inspect if @pos != limit
|
|
133
135
|
else
|
|
134
136
|
nest = take(len)
|
|
135
137
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: asn1-diag
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Carsten Bormann
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-08-
|
|
11
|
+
date: 2017-08-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -58,7 +58,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
58
58
|
requirements:
|
|
59
59
|
- - ">="
|
|
60
60
|
- !ruby/object:Gem::Version
|
|
61
|
-
version: 2.
|
|
61
|
+
version: 2.3.1
|
|
62
62
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
63
63
|
requirements:
|
|
64
64
|
- - ">="
|