| Server IP : 162.214.74.102 / Your IP : 216.73.216.252 Web Server : Apache System : Linux dedi-4363141.lrsys.com.br 3.10.0-1160.119.1.el7.tuxcare.els25.x86_64 #1 SMP Wed Oct 1 17:37:27 UTC 2025 x86_64 User : lrsys ( 1015) PHP Version : 5.6.40 Disable Function : exec,passthru,shell_exec,system MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /opt/cpanel/ea-ruby24/root/usr/share/ri/system/OpenSSL/ASN1/Constructive/ |
Upload File : |
U:RDoc::NormalClass[iI"Constructive:ETI" OpenSSL::ASN1::Constructive;TI"OpenSSL::ASN1::ASN1Data;Fo:RDoc::Markup::Document:@parts[o;;[o:RDoc::Markup::Paragraph;[I"KThe parent class for all constructed encodings. The +value+ attribute ;TI"Hof a Constructive is always an +Array+. Attributes are the same as ;TI"2for ASN1Data, with the addition of +tagging+.;To:RDoc::Markup::BlankLine S:RDoc::Markup::Heading:
leveli: textI"SET and SEQUENCE;T@o; ;[I"IMost constructed encodings come in the form of a SET or a SEQUENCE. ;TI"FThese encodings are represented by one of the two sub-classes of ;TI"Constructive:;To:RDoc::Markup::List:
@type:BULLET:@items[o:RDoc::Markup::ListItem:@label0;[o; ;[I"OpenSSL::ASN1::Set;To;;0;[o; ;[I"OpenSSL::ASN1::Sequence;To; ;[I"DPlease note that tagged sequences and sets are still parsed as ;TI"Binstances of ASN1Data. Find further details on tagged values ;TI"there.;T@S;;i;
I"&Example - constructing a SEQUENCE;To:RDoc::Markup::Verbatim;[I")int = OpenSSL::ASN1::Integer.new(1)
;TI"5str = OpenSSL::ASN1::PrintableString.new('abc')
;TI"<sequence = OpenSSL::ASN1::Sequence.new( [ int, str ] )
;T:@format0S;;i;
I"!Example - constructing a SET;To;;[I")int = OpenSSL::ASN1::Integer.new(1)
;TI"5str = OpenSSL::ASN1::PrintableString.new('abc')
;TI"2set = OpenSSL::ASN1::Set.new( [ int, str ] )
;T;0S;;i;
I"%Infinite length primitive values;T@o; ;[I"GThe only case where Constructive is used directly is for infinite ;TI"Flength encodings of primitive values. These encodings are always ;TI"Hconstructed, with the contents of the +value+ +Array+ being either ;TI"IUNIVERSAL non-infinite length partial encodings of the actual value ;TI"Ior again constructive encodings with infinite length (i.e. infinite ;TI"Llength primitive encodings may be constructed recursively with another ;TI"Jinfinite length value within an already infinite length value). Each ;TI"Hpartial encoding must be of the same UNIVERSAL type as the overall ;TI"Aencoding. The value of the overall encoding consists of the ;TI"Kconcatenation of each partial encoding taken in sequence. The +value+ ;TI">array of the outer infinite length value must end with a ;TI"*OpenSSL::ASN1::EndOfContent instance.;T@o; ;[I"HPlease note that it is not possible to encode Constructive without ;TI">the +infinite_length+ attribute being set to +true+, use ;TI"JOpenSSL::ASN1::Sequence or OpenSSL::ASN1::Set in these cases instead.;T@S;;i;
I"+Example - Infinite length OCTET STRING;To;;[I"7partial1 = OpenSSL::ASN1::OctetString.new("\x01")
;TI"7partial2 = OpenSSL::ASN1::OctetString.new("\x02")
;TI"?inf_octets = OpenSSL::ASN1::Constructive.new( [ partial1,
;TI"? partial2,
;TI"X OpenSSL::ASN1::EndOfContent.new ],
;TI"P OpenSSL::ASN1::OCTET_STRING,
;TI"8 nil,
;TI"@ :UNIVERSAL )
;TI"J# The real value of inf_octets is "\x01\x02", i.e. the concatenation
;TI" # of partial1 and partial2
;TI"'inf_octets.infinite_length = true
;TI"der = inf_octets.to_der
;TI"&asn1 = OpenSSL::ASN1.decode(der)
;TI"(puts asn1.infinite_length # => true;T;0:
@fileI"ext/openssl/ossl_asn1.c;T:0@omit_headings_from_table_of_contents_below0;0;0[[
I"tagging;TI"RW;T:publicFI"ext/openssl/ossl_asn1.c;T[ [[I"Enumerable;To;;[ ;@a;0@f[[I"
class;T[[;[[I"new;T@f[:protected[ [:private[ [I"
instance;T[[;[[I" each;T@f[I"to_der;T@f[;[ [;[ [ [U:RDoc::Context::Section[i 0o;;[ ;0;0[@aI"OpenSSL::ASN1;TcRDoc::NormalModule