added the ability to do a delete_tree
This commit is contained in:
parent
6bb9fa6ae6
commit
463ac436a8
5 changed files with 81 additions and 2 deletions
|
@ -79,4 +79,16 @@ module Net::BER::Extensions::Array
|
|||
oid = ary.pack("w*")
|
||||
[6, oid.length].pack("CC") + oid
|
||||
end
|
||||
|
||||
##
|
||||
# Converts an array into a set of ber control codes
|
||||
# The expected format is [[control_oid, criticality, control_value(optional)]]
|
||||
# [['1.2.840.113556.1.4.805',true]]
|
||||
#
|
||||
def to_ber_control
|
||||
ary = self.collect do |control_sequence|
|
||||
control_sequence.collect{|element| element.to_ber}.to_ber_sequence
|
||||
end
|
||||
ary.to_ber_sequence #putting this on a new line to make it more readable.
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue