Class: Array
- Inherits:
-
Object
show all
- Defined in:
- lib/net/ber.rb
Instance Method Summary
collapse
Instance Method Details
#to_ber(id = 0) ⇒ Object
to_ber_appsequence An application-specific sequence usually gets assigned a tag that is meaningful to the particular protocol being used. This is different from the universal sequence, which usually gets a tag value of 16. Now here’s an interesting thing: We’re adding the X.690 “application constructed” code at the top of the tag byte (0x60), but some clients, notably ldapsearch, send “context-specific constructed” (0xA0). The latter would appear to violate RFC-1777, but what do I know? We may need to change this.
537
|
# File 'lib/net/ber.rb', line 537
def to_ber id = 0; to_ber_seq_internal( 0x30 + id ); end
|
#to_ber_appsequence(id = 0) ⇒ Object
540
|
# File 'lib/net/ber.rb', line 540
def to_ber_appsequence id = 0; to_ber_seq_internal( 0x60 + id ); end
|
#to_ber_contextspecific(id = 0) ⇒ Object
541
|
# File 'lib/net/ber.rb', line 541
def to_ber_contextspecific id = 0; to_ber_seq_internal( 0xA0 + id ); end
|
#to_ber_oid ⇒ Object
543
544
545
546
547
548
549
550
551
|
# File 'lib/net/ber.rb', line 543
def to_ber_oid
ary = self.dup
first = ary.shift
raise Net::BER::BerError.new( "invalid OID" ) unless [0,1,2].include?(first)
first = first * 40 + ary.shift
ary.unshift first
oid = ary.pack("w*")
[6, oid.length].pack("CC") + oid
end
|
#to_ber_sequence(id = 0) ⇒ Object
539
|
# File 'lib/net/ber.rb', line 539
def to_ber_sequence id = 0; to_ber_seq_internal( 0x30 + id ); end
|
#to_ber_set(id = 0) ⇒ Object
538
|
# File 'lib/net/ber.rb', line 538
def to_ber_set id = 0; to_ber_seq_internal( 0x31 + id ); end
|