rasn1 0.7.1 → 0.8.0
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/lib/rasn1.rb +1 -1
- data/lib/rasn1/model.rb +25 -28
- data/lib/rasn1/types.rb +41 -15
- data/lib/rasn1/types/any.rb +5 -1
- data/lib/rasn1/types/base.rb +102 -85
- data/lib/rasn1/types/bit_string.rb +9 -11
- data/lib/rasn1/types/boolean.rb +3 -3
- data/lib/rasn1/types/choice.rb +1 -1
- data/lib/rasn1/types/constructed.rb +2 -1
- data/lib/rasn1/types/enumerated.rb +2 -2
- data/lib/rasn1/types/generalized_time.rb +2 -2
- data/lib/rasn1/types/ia5string.rb +2 -2
- data/lib/rasn1/types/integer.rb +26 -41
- data/lib/rasn1/types/null.rb +3 -3
- data/lib/rasn1/types/numeric_string.rb +4 -6
- data/lib/rasn1/types/object_id.rb +15 -46
- data/lib/rasn1/types/octet_string.rb +2 -2
- data/lib/rasn1/types/printable_string.rb +5 -6
- data/lib/rasn1/types/sequence.rb +2 -2
- data/lib/rasn1/types/sequence_of.rb +3 -3
- data/lib/rasn1/types/set.rb +2 -2
- data/lib/rasn1/types/set_of.rb +2 -2
- data/lib/rasn1/types/utc_time.rb +2 -2
- data/lib/rasn1/types/utf8_string.rb +2 -2
- data/lib/rasn1/types/visible_string.rb +2 -2
- data/lib/rasn1/version.rb +1 -1
- metadata +26 -56
- data/.gitignore +0 -11
- data/.rubocop.yml +0 -32
- data/.travis.yml +0 -11
- data/Changelog.md +0 -15
- data/Gemfile +0 -4
- data/Rakefile +0 -12
- data/rasn1.gemspec +0 -32
@@ -46,8 +46,8 @@ module RASN1
|
|
46
46
|
# seqof[0][:int].value # => 12
|
47
47
|
# @author Sylvain Daubert
|
48
48
|
class SequenceOf < Constructed
|
49
|
-
# SequenceOf
|
50
|
-
|
49
|
+
# SequenceOf id value
|
50
|
+
ID = Sequence::ID
|
51
51
|
|
52
52
|
# @return [Class, Base]
|
53
53
|
attr_reader :of_type
|
@@ -147,7 +147,7 @@ module RASN1
|
|
147
147
|
@value.map(&:to_der).join
|
148
148
|
end
|
149
149
|
|
150
|
-
def der_to_value(der, ber:false)
|
150
|
+
def der_to_value(der, ber: false)
|
151
151
|
@value = []
|
152
152
|
nb_bytes = 0
|
153
153
|
|
data/lib/rasn1/types/set.rb
CHANGED
data/lib/rasn1/types/set_of.rb
CHANGED
data/lib/rasn1/types/utc_time.rb
CHANGED
data/lib/rasn1/version.rb
CHANGED
metadata
CHANGED
@@ -1,63 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rasn1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sylvain Daubert
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: yard
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0.9'
|
20
|
-
type: :development
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0.9'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: bundler
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 1.17.3
|
34
|
-
- - "<"
|
35
|
-
- !ruby/object:Gem::Version
|
36
|
-
version: '3'
|
37
|
-
type: :development
|
38
|
-
prerelease: false
|
39
|
-
version_requirements: !ruby/object:Gem::Requirement
|
40
|
-
requirements:
|
41
|
-
- - ">="
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
version: 1.17.3
|
44
|
-
- - "<"
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version: '3'
|
47
13
|
- !ruby/object:Gem::Dependency
|
48
14
|
name: rake
|
49
15
|
requirement: !ruby/object:Gem::Requirement
|
50
16
|
requirements:
|
51
17
|
- - "~>"
|
52
18
|
- !ruby/object:Gem::Version
|
53
|
-
version: '
|
19
|
+
version: '12.3'
|
54
20
|
type: :development
|
55
21
|
prerelease: false
|
56
22
|
version_requirements: !ruby/object:Gem::Requirement
|
57
23
|
requirements:
|
58
24
|
- - "~>"
|
59
25
|
- !ruby/object:Gem::Version
|
60
|
-
version: '
|
26
|
+
version: '12.3'
|
61
27
|
- !ruby/object:Gem::Dependency
|
62
28
|
name: rspec
|
63
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -73,37 +39,32 @@ dependencies:
|
|
73
39
|
- !ruby/object:Gem::Version
|
74
40
|
version: '3.0'
|
75
41
|
- !ruby/object:Gem::Dependency
|
76
|
-
name:
|
42
|
+
name: yard
|
77
43
|
requirement: !ruby/object:Gem::Requirement
|
78
44
|
requirements:
|
79
45
|
- - "~>"
|
80
46
|
- !ruby/object:Gem::Version
|
81
|
-
version: '0.
|
47
|
+
version: '0.9'
|
82
48
|
type: :development
|
83
49
|
prerelease: false
|
84
50
|
version_requirements: !ruby/object:Gem::Requirement
|
85
51
|
requirements:
|
86
52
|
- - "~>"
|
87
53
|
- !ruby/object:Gem::Version
|
88
|
-
version: '0.
|
89
|
-
description: |
|
90
|
-
|
91
|
-
|
92
|
-
encodings.
|
54
|
+
version: '0.9'
|
55
|
+
description: |
|
56
|
+
RASN1 is a pure ruby ASN.1 library. It may encode and decode DER and BER
|
57
|
+
encodings.
|
93
58
|
email:
|
94
59
|
- sylvain.daubert@laposte.net
|
95
60
|
executables: []
|
96
61
|
extensions: []
|
97
|
-
extra_rdoc_files:
|
62
|
+
extra_rdoc_files:
|
63
|
+
- README.md
|
64
|
+
- LICENSE
|
98
65
|
files:
|
99
|
-
- ".gitignore"
|
100
|
-
- ".rubocop.yml"
|
101
|
-
- ".travis.yml"
|
102
|
-
- Changelog.md
|
103
|
-
- Gemfile
|
104
66
|
- LICENSE
|
105
67
|
- README.md
|
106
|
-
- Rakefile
|
107
68
|
- lib/rasn1.rb
|
108
69
|
- lib/rasn1/model.rb
|
109
70
|
- lib/rasn1/types.rb
|
@@ -131,20 +92,29 @@ files:
|
|
131
92
|
- lib/rasn1/types/utf8_string.rb
|
132
93
|
- lib/rasn1/types/visible_string.rb
|
133
94
|
- lib/rasn1/version.rb
|
134
|
-
- rasn1.gemspec
|
135
95
|
homepage: https://github.com/sdaubert/rasn1
|
136
96
|
licenses:
|
137
97
|
- MIT
|
138
|
-
metadata:
|
98
|
+
metadata:
|
99
|
+
homepage_uri: https://github.com/sdaubert/rasn1
|
100
|
+
source_code_uri: https://github.com/sdaubert/rasn1
|
101
|
+
bug_tracker_uri: https://github.com/sdaubert/rasn1/issues
|
102
|
+
documentation_uri: https://www.rubydoc.info/gems/rasn1
|
139
103
|
post_install_message:
|
140
|
-
rdoc_options:
|
104
|
+
rdoc_options:
|
105
|
+
- "--title"
|
106
|
+
- RASN1 - A pure ruby ASN.1 library
|
107
|
+
- "--main"
|
108
|
+
- README.md
|
109
|
+
- "--inline-source"
|
110
|
+
- "--quiet"
|
141
111
|
require_paths:
|
142
112
|
- lib
|
143
113
|
required_ruby_version: !ruby/object:Gem::Requirement
|
144
114
|
requirements:
|
145
115
|
- - ">="
|
146
116
|
- !ruby/object:Gem::Version
|
147
|
-
version: 2.
|
117
|
+
version: 2.4.0
|
148
118
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
149
119
|
requirements:
|
150
120
|
- - ">="
|
data/.gitignore
DELETED
data/.rubocop.yml
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
Layout/SpaceAroundEqualsInParameterDefault:
|
2
|
-
EnforcedStyle: no_space
|
3
|
-
Lint/EmptyWhen:
|
4
|
-
Enabled: false
|
5
|
-
Lint/Void:
|
6
|
-
Enabled: false
|
7
|
-
Metrics:
|
8
|
-
Enabled: false
|
9
|
-
Naming/AccessorMethodName:
|
10
|
-
Enabled: false
|
11
|
-
Style/AsciiComments:
|
12
|
-
Enabled: false
|
13
|
-
Style/Encoding:
|
14
|
-
Enabled: false
|
15
|
-
Style/EvalWithLocation:
|
16
|
-
Enabled: false
|
17
|
-
Style/FormatString:
|
18
|
-
EnforcedStyle: percent
|
19
|
-
Style/FormatStringToken:
|
20
|
-
EnforcedStyle: unannotated
|
21
|
-
Style/PerlBackrefs:
|
22
|
-
Enabled: false
|
23
|
-
Style/RedundantSelf:
|
24
|
-
Enabled: false
|
25
|
-
Style/RegexpLiteral:
|
26
|
-
EnforcedStyle: slashes
|
27
|
-
Style/StructInheritance:
|
28
|
-
Enabled: false
|
29
|
-
Style/TrailingCommaInArrayLiteral:
|
30
|
-
Enabled: false
|
31
|
-
Style/TrailingCommaInHashLiteral:
|
32
|
-
Enabled: false
|
data/.travis.yml
DELETED
data/Changelog.md
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
# Rasn1 Changelog
|
2
|
-
|
3
|
-
## 0.7.1
|
4
|
-
|
5
|
-
* update bundler dependency: now support bundler 2.0.
|
6
|
-
|
7
|
-
## 0.7.0
|
8
|
-
|
9
|
-
* add RASN1::Model#value to get value of a (potentially nested) element.
|
10
|
-
* add RASN1::Types::Sequence#[]. Access to element by index or by name.
|
11
|
-
* add frozen_string literal on all ruby files.
|
12
|
-
* optimize RASN1::Types.tag2type.
|
13
|
-
* refactoring of RASN1::Types::Base and RASN1::Types::Boolean.
|
14
|
-
* fix bugs:
|
15
|
-
* RASN1::Types::Base#initialize_copy raises on ruby 2.3 when @value and/or @default were nil, true, false of Integer.
|
data/Gemfile
DELETED
data/Rakefile
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
require 'bundler/gem_tasks'
|
2
|
-
require 'rspec/core/rake_task'
|
3
|
-
require 'yard'
|
4
|
-
|
5
|
-
RSpec::Core::RakeTask.new
|
6
|
-
YARD::Rake::YardocTask.new do |t|
|
7
|
-
t.files = ['lib/**/*.rb', '-', 'README.md', 'LICENSE']
|
8
|
-
t.options = %w(--no-private)
|
9
|
-
end
|
10
|
-
|
11
|
-
task :default => :spec
|
12
|
-
|
data/rasn1.gemspec
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require 'rasn1/version'
|
5
|
-
|
6
|
-
Gem::Specification.new do |spec|
|
7
|
-
spec.name = 'rasn1'
|
8
|
-
spec.version = RASN1::VERSION
|
9
|
-
spec.license = 'MIT'
|
10
|
-
spec.authors = ['Sylvain Daubert']
|
11
|
-
spec.email = ['sylvain.daubert@laposte.net']
|
12
|
-
|
13
|
-
spec.summary = %q{Ruby ASN.1 library}
|
14
|
-
spec.description = %q{
|
15
|
-
RASN1 is a pure ruby ASN.1 library. It may encode and decode DER and BER
|
16
|
-
encodings.
|
17
|
-
}
|
18
|
-
spec.homepage = 'https://github.com/sdaubert/rasn1'
|
19
|
-
|
20
|
-
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
21
|
-
f.match(%r{^(test|spec|features)/})
|
22
|
-
end
|
23
|
-
spec.require_paths = ['lib']
|
24
|
-
|
25
|
-
spec.required_ruby_version = '>= 2.3.0'
|
26
|
-
|
27
|
-
spec.add_development_dependency 'yard', '~>0.9'
|
28
|
-
spec.add_development_dependency 'bundler', '>= 1.17.3', '< 3'
|
29
|
-
spec.add_development_dependency 'rake', '~> 10.0'
|
30
|
-
spec.add_development_dependency 'rspec', '~> 3.0'
|
31
|
-
spec.add_development_dependency 'simplecov', '~> 0.14'
|
32
|
-
end
|