Ruby  2.1.10p492(2016-04-01revision54464)
Data Structures | Macros | Functions | Variables
ossl_asn1.c File Reference
#include "ossl.h"

Go to the source code of this file.

Data Structures

struct  timeval
 
struct  ossl_asn1_info_t
 

Macros

#define DO_IT_VIA_RUBY   0
 
#define ossl_asn1_get_value(o)   rb_attr_get((o),sivVALUE)
 
#define ossl_asn1_get_tag(o)   rb_attr_get((o),sivTAG)
 
#define ossl_asn1_get_tagging(o)   rb_attr_get((o),sivTAGGING)
 
#define ossl_asn1_get_tag_class(o)   rb_attr_get((o),sivTAG_CLASS)
 
#define ossl_asn1_get_infinite_length(o)   rb_attr_get((o),sivINFINITE_LENGTH)
 
#define ossl_asn1_set_value(o, v)   rb_ivar_set((o),sivVALUE,(v))
 
#define ossl_asn1_set_tag(o, v)   rb_ivar_set((o),sivTAG,(v))
 
#define ossl_asn1_set_tagging(o, v)   rb_ivar_set((o),sivTAGGING,(v))
 
#define ossl_asn1_set_tag_class(o, v)   rb_ivar_set((o),sivTAG_CLASS,(v))
 
#define ossl_asn1_set_infinite_length(o, v)   rb_ivar_set((o),sivINFINITE_LENGTH,(v))
 
#define ossl_asn1_object_size(cons, len, tag)   (cons) == 2 ? (len) + ASN1_object_size((cons), 0, (tag)) : ASN1_object_size((cons), (len), (tag))
 
#define ossl_asn1_put_object(pp, cons, len, tag, xc)   (cons) == 2 ? ASN1_put_object((pp), (cons), 0, (tag), (xc)) : ASN1_put_object((pp), (cons), (len), (tag), (xc))
 
#define OSSL_ASN1_IMPL_FACTORY_METHOD(klass)
 
#define OSSL_ASN1_DEFINE_CLASS(name, super)
 

Functions

static VALUE join_der (VALUE enumerable)
 
static VALUE ossl_asn1_decode0 (unsigned char **pp, long length, long *offset, int depth, int yield, long *num_read)
 
static VALUE ossl_asn1_initialize (int argc, VALUE *argv, VALUE self)
 
static VALUE ossl_asn1eoc_initialize (VALUE self)
 
VALUE asn1time_to_time (ASN1_TIME *time)
 
struct timeval rb_time_timeval (VALUE)
 
time_t time_to_time_t (VALUE time)
 
VALUE asn1str_to_str (ASN1_STRING *str)
 
VALUE asn1integer_to_num (ASN1_INTEGER *ai)
 
ASN1_INTEGER * num_to_asn1integer (VALUE obj, ASN1_INTEGER *ai)
 
static ASN1_BOOLEAN obj_to_asn1bool (VALUE obj)
 
static ASN1_INTEGER * obj_to_asn1int (VALUE obj)
 
static ASN1_BIT_STRING * obj_to_asn1bstr (VALUE obj, long unused_bits)
 
static ASN1_STRING * obj_to_asn1str (VALUE obj)
 
static ASN1_NULL * obj_to_asn1null (VALUE obj)
 
static ASN1_OBJECT * obj_to_asn1obj (VALUE obj)
 
static ASN1_UTCTIME * obj_to_asn1utime (VALUE time)
 
static ASN1_GENERALIZEDTIME * obj_to_asn1gtime (VALUE time)
 
static ASN1_STRING * obj_to_asn1derstr (VALUE obj)
 
static VALUE decode_bool (unsigned char *der, long length)
 
static VALUE decode_int (unsigned char *der, long length)
 
static VALUE decode_bstr (unsigned char *der, long length, long *unused_bits)
 
static VALUE decode_enum (unsigned char *der, long length)
 
static VALUE decode_null (unsigned char *der, long length)
 
static VALUE decode_obj (unsigned char *der, long length)
 
static VALUE decode_time (unsigned char *der, long length)
 
static VALUE decode_eoc (unsigned char *der, long length)
 
static int ossl_asn1_default_tag (VALUE obj)
 
ASN1_TYPE * ossl_asn1_get_asn1type (VALUE obj)
 
static int ossl_asn1_tag (VALUE obj)
 
static int ossl_asn1_is_explicit (VALUE obj)
 
static int ossl_asn1_tag_class (VALUE obj)
 
static VALUE ossl_asn1_class2sym (int tc)
 
static VALUE ossl_asn1data_initialize (VALUE self, VALUE value, VALUE tag, VALUE tag_class)
 
static VALUE join_der_i (RB_BLOCK_CALL_FUNC_ARGLIST(i, str))
 
static VALUE ossl_asn1data_to_der (VALUE self)
 
static VALUE int_ossl_asn1_decode0_prim (unsigned char **pp, long length, long hlen, int tag, VALUE tc, long *num_read)
 
static VALUE int_ossl_asn1_decode0_cons (unsigned char **pp, long max_len, long length, long *offset, int depth, int yield, int j, int tag, VALUE tc, long *num_read)
 
static void int_ossl_decode_sanity_check (long len, long read, long offset)
 
static VALUE ossl_asn1_traverse (VALUE self, VALUE obj)
 
static VALUE ossl_asn1_decode (VALUE self, VALUE obj)
 
static VALUE ossl_asn1_decode_all (VALUE self, VALUE obj)
 
static int ossl_i2d_ASN1_TYPE (ASN1_TYPE *a, unsigned char **pp)
 
static void ossl_ASN1_TYPE_free (ASN1_TYPE *a)
 
static VALUE ossl_asn1prim_to_der (VALUE self)
 
static VALUE ossl_asn1cons_to_der (VALUE self)
 
static VALUE ossl_asn1cons_each (VALUE self)
 
static VALUE ossl_asn1obj_s_register (VALUE self, VALUE oid, VALUE sn, VALUE ln)
 
static VALUE ossl_asn1obj_get_sn (VALUE self)
 
static VALUE ossl_asn1obj_get_ln (VALUE self)
 
static VALUE ossl_asn1obj_get_oid (VALUE self)
 
void Init_ossl_asn1 ()
 

Variables

VALUE mASN1
 
VALUE eASN1Error
 
VALUE cASN1Data
 
VALUE cASN1Primitive
 
VALUE cASN1Constructive
 
VALUE cASN1EndOfContent
 
VALUE cASN1Boolean
 
VALUE cASN1Integer
 
VALUE cASN1Enumerated
 
VALUE cASN1BitString
 
VALUE cASN1OctetString
 
VALUE cASN1UTF8String
 
VALUE cASN1NumericString
 
VALUE cASN1PrintableString
 
VALUE cASN1T61String
 
VALUE cASN1VideotexString
 
VALUE cASN1IA5String
 
VALUE cASN1GraphicString
 
VALUE cASN1ISO64String
 
VALUE cASN1GeneralString
 
VALUE cASN1UniversalString
 
VALUE cASN1BMPString
 
VALUE cASN1Null
 
VALUE cASN1ObjectId
 
VALUE cASN1UTCTime
 
VALUE cASN1GeneralizedTime
 
VALUE cASN1Sequence
 
VALUE cASN1Set
 
static ID sIMPLICIT
 
static ID sEXPLICIT
 
static ID sUNIVERSAL
 
static ID sAPPLICATION
 
static ID sCONTEXT_SPECIFIC
 
static ID sPRIVATE
 
static ID sivVALUE
 
static ID sivTAG
 
static ID sivTAG_CLASS
 
static ID sivTAGGING
 
static ID sivINFINITE_LENGTH
 
static ID sivUNUSED_BITS
 
static ossl_asn1_info_t ossl_asn1_info []
 
int ossl_asn1_info_size = (sizeof(ossl_asn1_info)/sizeof(ossl_asn1_info[0]))
 
static VALUE class_tag_map
 

Macro Definition Documentation

◆ DO_IT_VIA_RUBY

#define DO_IT_VIA_RUBY   0

Definition at line 103 of file ossl_asn1.c.

◆ OSSL_ASN1_DEFINE_CLASS

#define OSSL_ASN1_DEFINE_CLASS (   name,
  super 
)
Value:
do{\
cASN1##name = rb_define_class_under(mASN1, #name, cASN1##super);\
rb_define_module_function(mASN1, #name, ossl_asn1_##name, -1);\
}while(0)
VALUE mASN1
Definition: ossl_asn1.c:189
VALUE rb_define_class_under(VALUE outer, const char *name, VALUE super)
Defines a class under the namespace of outer.
Definition: class.c:657
const char * name
Definition: nkf.c:208

Referenced by Init_ossl_asn1().

◆ ossl_asn1_get_infinite_length

#define ossl_asn1_get_infinite_length (   o)    rb_attr_get((o),sivINFINITE_LENGTH)

Definition at line 181 of file ossl_asn1.c.

Referenced by ossl_asn1cons_to_der(), and ossl_asn1data_to_der().

◆ ossl_asn1_get_tag

#define ossl_asn1_get_tag (   o)    rb_attr_get((o),sivTAG)

◆ ossl_asn1_get_tag_class

#define ossl_asn1_get_tag_class (   o)    rb_attr_get((o),sivTAG_CLASS)

Definition at line 180 of file ossl_asn1.c.

Referenced by int_ossl_asn1_decode0_cons(), and ossl_asn1_tag_class().

◆ ossl_asn1_get_tagging

#define ossl_asn1_get_tagging (   o)    rb_attr_get((o),sivTAGGING)

Definition at line 179 of file ossl_asn1.c.

Referenced by ossl_asn1_is_explicit().

◆ ossl_asn1_get_value

#define ossl_asn1_get_value (   o)    rb_attr_get((o),sivVALUE)

◆ OSSL_ASN1_IMPL_FACTORY_METHOD

#define OSSL_ASN1_IMPL_FACTORY_METHOD (   klass)
Value:
static VALUE ossl_asn1_##klass(int argc, VALUE *argv, VALUE self)\
{ return rb_funcall3(cASN1##klass, rb_intern("new"), argc, argv); }
int argc
Definition: ruby.c:131
unsigned long VALUE
Definition: ruby.h:88
#define rb_funcall3
Definition: ruby.h:1465
#define rb_intern(str)
char ** argv
Definition: ruby.c:132

Definition at line 1449 of file ossl_asn1.c.

◆ ossl_asn1_object_size

#define ossl_asn1_object_size (   cons,
  len,
  tag 
)    (cons) == 2 ? (len) + ASN1_object_size((cons), 0, (tag)) : ASN1_object_size((cons), (len), (tag))

Definition at line 221 of file ossl_asn1.c.

Referenced by ossl_asn1cons_to_der(), ossl_asn1data_to_der(), and ossl_asn1prim_to_der().

◆ ossl_asn1_put_object

#define ossl_asn1_put_object (   pp,
  cons,
  len,
  tag,
  xc 
)    (cons) == 2 ? ASN1_put_object((pp), (cons), 0, (tag), (xc)) : ASN1_put_object((pp), (cons), (len), (tag), (xc))

Definition at line 222 of file ossl_asn1.c.

Referenced by ossl_asn1cons_to_der(), ossl_asn1data_to_der(), and ossl_asn1prim_to_der().

◆ ossl_asn1_set_infinite_length

#define ossl_asn1_set_infinite_length (   o,
 
)    rb_ivar_set((o),sivINFINITE_LENGTH,(v))

◆ ossl_asn1_set_tag

#define ossl_asn1_set_tag (   o,
 
)    rb_ivar_set((o),sivTAG,(v))

◆ ossl_asn1_set_tag_class

#define ossl_asn1_set_tag_class (   o,
 
)    rb_ivar_set((o),sivTAG_CLASS,(v))

◆ ossl_asn1_set_tagging

#define ossl_asn1_set_tagging (   o,
 
)    rb_ivar_set((o),sivTAGGING,(v))

Definition at line 185 of file ossl_asn1.c.

Referenced by ossl_asn1_initialize(), and ossl_asn1eoc_initialize().

◆ ossl_asn1_set_value

#define ossl_asn1_set_value (   o,
 
)    rb_ivar_set((o),sivVALUE,(v))

Function Documentation

◆ asn1integer_to_num()

VALUE asn1integer_to_num ( ASN1_INTEGER *  ai)

◆ asn1str_to_str()

VALUE asn1str_to_str ( ASN1_STRING *  str)

Definition at line 94 of file ossl_asn1.c.

References rb_str_new().

Referenced by ossl_pkcs7ri_get_enc_key().

◆ asn1time_to_time()

VALUE asn1time_to_time ( ASN1_TIME *  time)

◆ decode_bool()

static VALUE decode_bool ( unsigned char *  der,
long  length 
)
static

Definition at line 349 of file ossl_asn1.c.

References eASN1Error, NULL, ossl_raise(), Qfalse, Qtrue, and val.

Referenced by int_ossl_asn1_decode0_prim().

◆ decode_bstr()

static VALUE decode_bstr ( unsigned char *  der,
long  length,
long *  unused_bits 
)
static

Definition at line 381 of file ossl_asn1.c.

References eASN1Error, NULL, ossl_raise(), and rb_str_new().

Referenced by int_ossl_asn1_decode0_prim().

◆ decode_enum()

static VALUE decode_enum ( unsigned char *  der,
long  length 
)
static

Definition at line 402 of file ossl_asn1.c.

References _, asn1integer_to_num(), eASN1Error, NULL, ossl_raise(), rb_jump_tag(), and rb_protect().

Referenced by int_ossl_asn1_decode0_prim().

◆ decode_eoc()

static VALUE decode_eoc ( unsigned char *  der,
long  length 
)
static

Definition at line 483 of file ossl_asn1.c.

References eASN1Error, NULL, ossl_raise(), and rb_str_new().

Referenced by int_ossl_asn1_decode0_prim().

◆ decode_int()

static VALUE decode_int ( unsigned char *  der,
long  length 
)
static

Definition at line 362 of file ossl_asn1.c.

References _, asn1integer_to_num(), eASN1Error, NULL, ossl_raise(), rb_jump_tag(), and rb_protect().

Referenced by int_ossl_asn1_decode0_prim().

◆ decode_null()

static VALUE decode_null ( unsigned char *  der,
long  length 
)
static

Definition at line 421 of file ossl_asn1.c.

References eASN1Error, NULL, ossl_raise(), and Qnil.

Referenced by int_ossl_asn1_decode0_prim().

◆ decode_obj()

static VALUE decode_obj ( unsigned char *  der,
long  length 
)
static

Definition at line 435 of file ossl_asn1.c.

References eASN1Error, NULL, ossl_membio2str(), ossl_raise(), and rb_str_new2.

Referenced by int_ossl_asn1_decode0_prim().

◆ decode_time()

static VALUE decode_time ( unsigned char *  der,
long  length 
)
static

Definition at line 464 of file ossl_asn1.c.

References _, asn1time_to_time(), eASN1Error, NULL, ossl_raise(), rb_jump_tag(), and rb_protect().

Referenced by int_ossl_asn1_decode0_prim().

◆ Init_ossl_asn1()

void Init_ossl_asn1 ( void  )

Definition at line 1478 of file ossl_asn1.c.

References cASN1BitString, cASN1BMPString, cASN1Boolean, cASN1Constructive, cASN1Data, cASN1EndOfContent, cASN1Enumerated, cASN1GeneralizedTime, cASN1GeneralString, cASN1GraphicString, cASN1IA5String, cASN1Integer, cASN1ISO64String, cASN1Null, cASN1NumericString, cASN1ObjectId, cASN1OctetString, cASN1Primitive, cASN1PrintableString, cASN1Sequence, cASN1Set, cASN1T61String, cASN1UniversalString, cASN1UTCTime, cASN1UTF8String, cASN1VideotexString, class_tag_map, eASN1Error, eOSSLError, INT2NUM, mASN1, mOSSL, name, ossl_asn1_decode(), ossl_asn1_decode_all(), OSSL_ASN1_DEFINE_CLASS, ossl_asn1_info, ossl_asn1_info_size, ossl_asn1_initialize(), ossl_asn1_traverse(), ossl_asn1cons_each(), ossl_asn1cons_to_der(), ossl_asn1data_initialize(), ossl_asn1data_to_der(), ossl_asn1eoc_initialize(), ossl_asn1obj_get_ln(), ossl_asn1obj_get_oid(), ossl_asn1obj_get_sn(), ossl_asn1obj_s_register(), ossl_asn1prim_to_der(), Qtrue, rb_ary_new(), rb_ary_store(), rb_attr(), rb_cObject, rb_define_alias(), rb_define_class_under(), rb_define_const(), rb_define_method(), rb_define_module(), rb_define_module_function(), rb_define_module_under(), rb_define_singleton_method(), rb_global_variable(), rb_hash_aset(), rb_hash_new(), rb_include_module(), rb_intern, rb_mEnumerable, rb_str_new2, rb_undef_method(), sAPPLICATION, sCONTEXT_SPECIFIC, sEXPLICIT, sIMPLICIT, sivINFINITE_LENGTH, sivTAG, sivTAG_CLASS, sivTAGGING, sivUNUSED_BITS, sivVALUE, sPRIVATE, and sUNIVERSAL.

Referenced by Init_openssl().

◆ int_ossl_asn1_decode0_cons()

static VALUE int_ossl_asn1_decode0_cons ( unsigned char **  pp,
long  max_len,
long  length,
long *  offset,
int  depth,
int  yield,
int  j,
int  tag,
VALUE  tc,
long *  num_read 
)
static

◆ int_ossl_asn1_decode0_prim()

static VALUE int_ossl_asn1_decode0_prim ( unsigned char **  pp,
long  length,
long  hlen,
int  tag,
VALUE  tc,
long *  num_read 
)
static

◆ int_ossl_decode_sanity_check()

static void int_ossl_decode_sanity_check ( long  len,
long  read,
long  offset 
)
static

Definition at line 998 of file ossl_asn1.c.

References eASN1Error, and ossl_raise().

Referenced by ossl_asn1_decode(), ossl_asn1_decode_all(), and ossl_asn1_traverse().

◆ join_der()

static VALUE join_der ( VALUE  enumerable)
static

Definition at line 745 of file ossl_asn1.c.

References join_der_i(), rb_block_call(), rb_intern, and rb_str_new().

Referenced by ossl_asn1cons_to_der(), and ossl_asn1data_to_der().

◆ join_der_i()

static VALUE join_der_i ( RB_BLOCK_CALL_FUNC_ARGLIST(i, str)  )
static

Definition at line 736 of file ossl_asn1.c.

References ossl_to_der_if_possible(), Qnil, rb_str_append(), and StringValue.

Referenced by join_der().

◆ num_to_asn1integer()

ASN1_INTEGER* num_to_asn1integer ( VALUE  obj,
ASN1_INTEGER *  ai 
)

◆ obj_to_asn1bool()

static ASN1_BOOLEAN obj_to_asn1bool ( VALUE  obj)
static

Definition at line 232 of file ossl_asn1.c.

References NIL_P, ossl_raise(), rb_eTypeError, and RTEST.

Referenced by ossl_asn1_get_asn1type().

◆ obj_to_asn1bstr()

static ASN1_BIT_STRING* obj_to_asn1bstr ( VALUE  obj,
long  unused_bits 
)
static

Definition at line 251 of file ossl_asn1.c.

References eASN1Error, NULL, ossl_raise(), RSTRING_LENINT, RSTRING_PTR, and StringValue.

Referenced by ossl_asn1_get_asn1type().

◆ obj_to_asn1derstr()

static ASN1_STRING* obj_to_asn1derstr ( VALUE  obj)
static

Definition at line 332 of file ossl_asn1.c.

References eASN1Error, NULL, ossl_raise(), ossl_to_der(), RSTRING_LENINT, and RSTRING_PTR.

Referenced by ossl_asn1_get_asn1type().

◆ obj_to_asn1gtime()

static ASN1_GENERALIZEDTIME* obj_to_asn1gtime ( VALUE  time)
static

Definition at line 319 of file ossl_asn1.c.

References eASN1Error, NULL, ossl_raise(), t(), and time_to_time_t().

Referenced by ossl_asn1_get_asn1type().

◆ obj_to_asn1int()

static ASN1_INTEGER* obj_to_asn1int ( VALUE  obj)
static

Definition at line 245 of file ossl_asn1.c.

References NULL, and num_to_asn1integer().

Referenced by ossl_asn1_get_asn1type().

◆ obj_to_asn1null()

static ASN1_NULL* obj_to_asn1null ( VALUE  obj)
static

Definition at line 280 of file ossl_asn1.c.

References eASN1Error, NIL_P, NULL, and ossl_raise().

Referenced by ossl_asn1_get_asn1type().

◆ obj_to_asn1obj()

static ASN1_OBJECT* obj_to_asn1obj ( VALUE  obj)
static

Definition at line 293 of file ossl_asn1.c.

References eASN1Error, ossl_raise(), RSTRING_PTR, and StringValue.

Referenced by ossl_asn1_get_asn1type(), and ossl_asn1obj_get_oid().

◆ obj_to_asn1str()

static ASN1_STRING* obj_to_asn1str ( VALUE  obj)
static

Definition at line 267 of file ossl_asn1.c.

References eASN1Error, NULL, ossl_raise(), RSTRING_LENINT, RSTRING_PTR, and StringValue.

Referenced by ossl_asn1_get_asn1type().

◆ obj_to_asn1utime()

static ASN1_UTCTIME* obj_to_asn1utime ( VALUE  time)
static

Definition at line 306 of file ossl_asn1.c.

References eASN1Error, NULL, ossl_raise(), t(), and time_to_time_t().

Referenced by ossl_asn1_get_asn1type().

◆ ossl_asn1_class2sym()

static VALUE ossl_asn1_class2sym ( int  tc)
static

Definition at line 692 of file ossl_asn1.c.

References ID2SYM, sAPPLICATION, sCONTEXT_SPECIFIC, sPRIVATE, and sUNIVERSAL.

Referenced by ossl_asn1_decode0().

◆ ossl_asn1_decode()

static VALUE ossl_asn1_decode ( VALUE  self,
VALUE  obj 
)
static

◆ ossl_asn1_decode0()

static VALUE ossl_asn1_decode0 ( unsigned char **  pp,
long  length,
long *  offset,
int  depth,
int  yield,
long *  num_read 
)
static

◆ ossl_asn1_decode_all()

static VALUE ossl_asn1_decode_all ( VALUE  self,
VALUE  obj 
)
static

◆ ossl_asn1_default_tag()

static int ossl_asn1_default_tag ( VALUE  obj)
static

◆ ossl_asn1_get_asn1type()

ASN1_TYPE* ossl_asn1_get_asn1type ( VALUE  obj)

◆ ossl_asn1_initialize()

static VALUE ossl_asn1_initialize ( int  argc,
VALUE argv,
VALUE  self 
)
static

◆ ossl_asn1_is_explicit()

static int ossl_asn1_is_explicit ( VALUE  obj)
static

◆ ossl_asn1_tag()

static int ossl_asn1_tag ( VALUE  obj)
static

Definition at line 634 of file ossl_asn1.c.

References eASN1Error, NIL_P, NUM2INT, ossl_asn1_get_tag, and ossl_raise().

Referenced by ossl_asn1data_to_der().

◆ ossl_asn1_tag_class()

static int ossl_asn1_tag_class ( VALUE  obj)
static

◆ ossl_asn1_traverse()

static VALUE ossl_asn1_traverse ( VALUE  self,
VALUE  obj 
)
static

◆ ossl_ASN1_TYPE_free()

static void ossl_ASN1_TYPE_free ( ASN1_TYPE *  a)
static

Definition at line 1200 of file ossl_asn1.c.

Referenced by ossl_asn1prim_to_der().

◆ ossl_asn1cons_each()

static VALUE ossl_asn1cons_each ( VALUE  self)
static

Definition at line 1358 of file ossl_asn1.c.

References ossl_asn1_get_value, and rb_ary_each().

Referenced by Init_ossl_asn1().

◆ ossl_asn1cons_to_der()

static VALUE ossl_asn1cons_to_der ( VALUE  self)
static

◆ ossl_asn1data_initialize()

static VALUE ossl_asn1data_initialize ( VALUE  self,
VALUE  value,
VALUE  tag,
VALUE  tag_class 
)
static

◆ ossl_asn1data_to_der()

static VALUE ossl_asn1data_to_der ( VALUE  self)
static

◆ ossl_asn1eoc_initialize()

static VALUE ossl_asn1eoc_initialize ( VALUE  self)
static

◆ ossl_asn1obj_get_ln()

static VALUE ossl_asn1obj_get_ln ( VALUE  self)
static

Definition at line 1418 of file ossl_asn1.c.

References ossl_asn1_get_value, Qnil, rb_str_new2, StringValuePtr, and val.

Referenced by Init_ossl_asn1().

◆ ossl_asn1obj_get_oid()

static VALUE ossl_asn1obj_get_oid ( VALUE  self)
static

Definition at line 1435 of file ossl_asn1.c.

References buf, obj_to_asn1obj(), ossl_asn1_get_value, rb_str_new2, and val.

Referenced by Init_ossl_asn1().

◆ ossl_asn1obj_get_sn()

static VALUE ossl_asn1obj_get_sn ( VALUE  self)
static

Definition at line 1397 of file ossl_asn1.c.

References ossl_asn1_get_value, Qnil, rb_str_new2, StringValuePtr, and val.

Referenced by Init_ossl_asn1().

◆ ossl_asn1obj_s_register()

static VALUE ossl_asn1obj_s_register ( VALUE  self,
VALUE  oid,
VALUE  sn,
VALUE  ln 
)
static

Definition at line 1376 of file ossl_asn1.c.

References eASN1Error, NULL, ossl_raise(), Qtrue, RSTRING_PTR, and StringValue.

Referenced by Init_ossl_asn1().

◆ ossl_asn1prim_to_der()

static VALUE ossl_asn1prim_to_der ( VALUE  self)
static

◆ ossl_i2d_ASN1_TYPE()

static int ossl_i2d_ASN1_TYPE ( ASN1_TYPE *  a,
unsigned char **  pp 
)
static

Definition at line 1189 of file ossl_asn1.c.

Referenced by ossl_asn1prim_to_der().

◆ rb_time_timeval()

struct timeval rb_time_timeval ( VALUE  )

Definition at line 2417 of file time.c.

Referenced by rb_thread_sleep().

◆ time_to_time_t()

time_t time_to_time_t ( VALUE  time)

Variable Documentation

◆ cASN1BitString

VALUE cASN1BitString

Definition at line 199 of file ossl_asn1.c.

Referenced by Init_ossl_asn1().

◆ cASN1BMPString

VALUE cASN1BMPString

Definition at line 205 of file ossl_asn1.c.

Referenced by Init_ossl_asn1().

◆ cASN1Boolean

VALUE cASN1Boolean

Definition at line 197 of file ossl_asn1.c.

Referenced by Init_ossl_asn1().

◆ cASN1Constructive

VALUE cASN1Constructive

Definition at line 194 of file ossl_asn1.c.

Referenced by Init_ossl_asn1(), int_ossl_asn1_decode0_cons(), and ossl_asn1cons_to_der().

◆ cASN1Data

VALUE cASN1Data

◆ cASN1EndOfContent

VALUE cASN1EndOfContent

Definition at line 196 of file ossl_asn1.c.

Referenced by Init_ossl_asn1().

◆ cASN1Enumerated

VALUE cASN1Enumerated

Definition at line 198 of file ossl_asn1.c.

Referenced by Init_ossl_asn1().

◆ cASN1GeneralizedTime

VALUE cASN1GeneralizedTime

Definition at line 208 of file ossl_asn1.c.

Referenced by Init_ossl_asn1().

◆ cASN1GeneralString

VALUE cASN1GeneralString

Definition at line 204 of file ossl_asn1.c.

Referenced by Init_ossl_asn1().

◆ cASN1GraphicString

VALUE cASN1GraphicString

Definition at line 203 of file ossl_asn1.c.

Referenced by Init_ossl_asn1().

◆ cASN1IA5String

VALUE cASN1IA5String

Definition at line 203 of file ossl_asn1.c.

Referenced by Init_ossl_asn1().

◆ cASN1Integer

VALUE cASN1Integer

Definition at line 198 of file ossl_asn1.c.

Referenced by Init_ossl_asn1().

◆ cASN1ISO64String

VALUE cASN1ISO64String

Definition at line 204 of file ossl_asn1.c.

Referenced by Init_ossl_asn1().

◆ cASN1Null

VALUE cASN1Null

Definition at line 206 of file ossl_asn1.c.

Referenced by Init_ossl_asn1().

◆ cASN1NumericString

VALUE cASN1NumericString

Definition at line 201 of file ossl_asn1.c.

Referenced by Init_ossl_asn1().

◆ cASN1ObjectId

VALUE cASN1ObjectId

Definition at line 207 of file ossl_asn1.c.

Referenced by Init_ossl_asn1().

◆ cASN1OctetString

VALUE cASN1OctetString

Definition at line 200 of file ossl_asn1.c.

Referenced by Init_ossl_asn1().

◆ cASN1Primitive

VALUE cASN1Primitive

Definition at line 193 of file ossl_asn1.c.

Referenced by Init_ossl_asn1(), and ossl_asn1cons_to_der().

◆ cASN1PrintableString

VALUE cASN1PrintableString

Definition at line 201 of file ossl_asn1.c.

Referenced by Init_ossl_asn1().

◆ cASN1Sequence

VALUE cASN1Sequence

Definition at line 209 of file ossl_asn1.c.

Referenced by Init_ossl_asn1(), and ossl_asn1cons_to_der().

◆ cASN1Set

VALUE cASN1Set

Definition at line 209 of file ossl_asn1.c.

Referenced by Init_ossl_asn1(), and ossl_asn1cons_to_der().

◆ cASN1T61String

VALUE cASN1T61String

Definition at line 202 of file ossl_asn1.c.

Referenced by Init_ossl_asn1().

◆ cASN1UniversalString

VALUE cASN1UniversalString

Definition at line 205 of file ossl_asn1.c.

Referenced by Init_ossl_asn1().

◆ cASN1UTCTime

VALUE cASN1UTCTime

Definition at line 208 of file ossl_asn1.c.

Referenced by Init_ossl_asn1().

◆ cASN1UTF8String

VALUE cASN1UTF8String

Definition at line 200 of file ossl_asn1.c.

Referenced by Init_ossl_asn1().

◆ cASN1VideotexString

VALUE cASN1VideotexString

Definition at line 202 of file ossl_asn1.c.

Referenced by Init_ossl_asn1().

◆ class_tag_map

VALUE class_tag_map
static

Definition at line 534 of file ossl_asn1.c.

Referenced by Init_ossl_asn1(), and ossl_asn1_default_tag().

◆ eASN1Error

VALUE eASN1Error

◆ mASN1

VALUE mASN1

Definition at line 189 of file ossl_asn1.c.

Referenced by Init_ossl_asn1(), and ossl_x509attr_get_value().

◆ ossl_asn1_info

ossl_asn1_info_t ossl_asn1_info[]
static

◆ ossl_asn1_info_size

int ossl_asn1_info_size = (sizeof(ossl_asn1_info)/sizeof(ossl_asn1_info[0]))

Definition at line 532 of file ossl_asn1.c.

Referenced by Init_ossl_asn1(), and int_ossl_asn1_decode0_prim().

◆ sAPPLICATION

ID sAPPLICATION
static

◆ sCONTEXT_SPECIFIC

ID sCONTEXT_SPECIFIC
static

◆ sEXPLICIT

ID sEXPLICIT
static

Definition at line 211 of file ossl_asn1.c.

Referenced by Init_ossl_asn1(), and ossl_asn1_is_explicit().

◆ sIMPLICIT

ID sIMPLICIT
static

Definition at line 211 of file ossl_asn1.c.

Referenced by Init_ossl_asn1(), ossl_asn1_initialize(), and ossl_asn1_is_explicit().

◆ sivINFINITE_LENGTH

ID sivINFINITE_LENGTH
static

Definition at line 213 of file ossl_asn1.c.

Referenced by Init_ossl_asn1().

◆ sivTAG

ID sivTAG
static

Definition at line 213 of file ossl_asn1.c.

Referenced by Init_ossl_asn1().

◆ sivTAG_CLASS

ID sivTAG_CLASS
static

Definition at line 213 of file ossl_asn1.c.

Referenced by Init_ossl_asn1().

◆ sivTAGGING

ID sivTAGGING
static

Definition at line 213 of file ossl_asn1.c.

Referenced by Init_ossl_asn1().

◆ sivUNUSED_BITS

ID sivUNUSED_BITS
static

Definition at line 213 of file ossl_asn1.c.

Referenced by Init_ossl_asn1(), int_ossl_asn1_decode0_prim(), and ossl_asn1_get_asn1type().

◆ sivVALUE

ID sivVALUE
static

Definition at line 213 of file ossl_asn1.c.

Referenced by Init_ossl_asn1().

◆ sPRIVATE

ID sPRIVATE
static

◆ sUNIVERSAL

ID sUNIVERSAL
static