Module: OpenSSL::ASN1
- Defined in:
- ext/rubysl/openssl/ossl_asn1.c
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
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
|
# File 'ext/rubysl/openssl/ossl_asn1.c', line 825
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_PTR(tmp);
ary = ossl_asn1_decode0(&p, RSTRING_LEN(tmp), &offset, 0, 1, 0);
ret = rb_ary_entry(ary, 0);
return ret;
}
|
.decode_all(obj) ⇒ Object
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
|
# File 'ext/rubysl/openssl/ossl_asn1.c', line 842
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_PTR(tmp);
ret = ossl_asn1_decode0(&p, RSTRING_LEN(tmp), &offset, 0, 0, 0);
return ret;
}
|
.traverse(obj) ⇒ Object
810
811
812
813
814
815
816
817
818
819
820
821
822
823
|
# File 'ext/rubysl/openssl/ossl_asn1.c', line 810
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_PTR(tmp);
ossl_asn1_decode0(&p, RSTRING_LEN(tmp), &offset, 0, 0, 1);
return Qnil;
}
|