Module: OpenSSL::ASN1
Defined Under Namespace
Classes: ASN1Data, ASN1Error, Constructive, Primitive
Constant Summary
collapse
- UNIVERSAL_TAG_NAME =
ary
Class Method Summary
collapse
Class Method Details
.decode(obj) ⇒ Object
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
|
# File 'ossl_asn1.c', line 833
static VALUE
ossl_asn1_decode(VALUE self, VALUE obj)
{
VALUE ret, ary;
unsigned char *p;
long offset = 0;
volatile VALUE tmp;
obj = ossl_to_der_if_possible(obj);
tmp = rb_str_new4(StringValue(obj));
p = RSTRING(tmp)->ptr;
ary = ossl_asn1_decode0(&p, RSTRING(tmp)->len, &offset, 0, 1, 0);
ret = rb_ary_entry(ary, 0);
return ret;
}
|
.decode_all(obj) ⇒ Object
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
|
# File 'ossl_asn1.c', line 850
static VALUE
ossl_asn1_decode_all(VALUE self, VALUE obj)
{
VALUE ret;
unsigned char *p;
long offset = 0;
volatile VALUE tmp;
obj = ossl_to_der_if_possible(obj);
tmp = rb_str_new4(StringValue(obj));
p = RSTRING(tmp)->ptr;
ret = ossl_asn1_decode0(&p, RSTRING(tmp)->len, &offset, 0, 0, 0);
return ret;
}
|
.traverse(obj) ⇒ Object
818
819
820
821
822
823
824
825
826
827
828
829
830
831
|
# File 'ossl_asn1.c', line 818
static VALUE
ossl_asn1_traverse(VALUE self, VALUE obj)
{
unsigned char *p;
long offset = 0;
volatile VALUE tmp;
obj = ossl_to_der_if_possible(obj);
tmp = rb_str_new4(StringValue(obj));
p = RSTRING(tmp)->ptr;
ossl_asn1_decode0(&p, RSTRING(tmp)->len, &offset, 0, 0, 1);
return Qnil;
}
|