File tree Expand file tree Collapse file tree 1 file changed +20
-12
lines changed
Expand file tree Collapse file tree 1 file changed +20
-12
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,10 @@ def initialize
5050 end
5151 end
5252
53+ class BerIdentifiedNull
54+ attr_accessor :ber_identifier
55+ end
56+
5357 #--
5458 # This condenses our nicely self-documenting ASN hashes down
5559 # to an array for fast lookups.
@@ -78,18 +82,18 @@ module BERParser
7882 TagClasses = [ :universal , :application , :context_specific , :private ]
7983
8084 BuiltinSyntax = BER . compile_syntax ( {
81- :universal => {
82- :primitive => {
83- 1 => :boolean ,
84- 2 => :integer ,
85- 4 => :string ,
86- 10 => :integer ,
87- } ,
88- :constructed => {
89- 16 => :array ,
90- 17 => :array
91- }
92- }
85+ :universal => {
86+ :primitive => {
87+ 1 => :boolean ,
88+ 2 => :integer ,
89+ 4 => :string ,
90+ 10 => :integer ,
91+ } ,
92+ :constructed => {
93+ 16 => :array ,
94+ 17 => :array
95+ }
96+ }
9397 } )
9498
9599 #
@@ -184,6 +188,10 @@ def read_ber syntax=nil
184188 seq
185189 elsif objtype == :boolean
186190 newobj != "\000 "
191+ elsif objtype == :null
192+ n = BerIdentifiedNull . new
193+ n . ber_identifier = id
194+ n
187195 else
188196 #raise BerError.new( "unsupported object type: class=#{tagclass}, encoding=#{encoding}, tag=#{tag}" )
189197 raise BerError . new ( "unsupported object type: id=#{ id } " )
You can’t perform that action at this time.
0 commit comments