Ruby
2.0.0p247(2013-06-27revision41674)
|
#include "ossl.h"
Go to the source code of this file.
Data Structures | |
struct | timeval |
struct | ossl_asn1_info_t |
#define DO_IT_VIA_RUBY 0 |
Definition at line 96 of file ossl_asn1.c.
#define OSSL_ASN1_DEFINE_CLASS | ( | name, | |
super | |||
) |
Referenced by Init_ossl_asn1().
#define ossl_asn1_get_infinite_length | ( | o | ) | rb_attr_get((o),sivINFINITE_LENGTH) |
Definition at line 174 of file ossl_asn1.c.
Referenced by ossl_asn1cons_to_der(), and ossl_asn1data_to_der().
#define ossl_asn1_get_tag | ( | o | ) | rb_attr_get((o),sivTAG) |
Definition at line 171 of file ossl_asn1.c.
Referenced by int_ossl_asn1_decode0_cons(), ossl_asn1_tag(), ossl_asn1cons_to_der(), and ossl_asn1prim_to_der().
#define ossl_asn1_get_tag_class | ( | o | ) | rb_attr_get((o),sivTAG_CLASS) |
Definition at line 173 of file ossl_asn1.c.
Referenced by int_ossl_asn1_decode0_cons(), and ossl_asn1_tag_class().
#define ossl_asn1_get_tagging | ( | o | ) | rb_attr_get((o),sivTAGGING) |
Definition at line 172 of file ossl_asn1.c.
Referenced by ossl_asn1_is_explicit().
#define ossl_asn1_get_value | ( | o | ) | rb_attr_get((o),sivVALUE) |
Definition at line 170 of file ossl_asn1.c.
Referenced by ossl_asn1_get_asn1type(), ossl_asn1cons_each(), ossl_asn1cons_to_der(), ossl_asn1data_to_der(), ossl_asn1obj_get_ln(), ossl_asn1obj_get_oid(), and ossl_asn1obj_get_sn().
#define OSSL_ASN1_IMPL_FACTORY_METHOD | ( | klass | ) |
Definition at line 1408 of file ossl_asn1.c.
#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 214 of file ossl_asn1.c.
Referenced by ossl_asn1cons_to_der(), ossl_asn1data_to_der(), and ossl_asn1prim_to_der().
#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 215 of file ossl_asn1.c.
Referenced by ossl_asn1cons_to_der(), ossl_asn1data_to_der(), and ossl_asn1prim_to_der().
#define ossl_asn1_set_infinite_length | ( | o, | |
v | |||
) | rb_ivar_set((o),sivINFINITE_LENGTH,(v)) |
Definition at line 180 of file ossl_asn1.c.
Referenced by int_ossl_asn1_decode0_cons(), ossl_asn1_initialize(), ossl_asn1data_initialize(), and ossl_asn1eoc_initialize().
#define ossl_asn1_set_tag | ( | o, | |
v | |||
) | rb_ivar_set((o),sivTAG,(v)) |
Definition at line 177 of file ossl_asn1.c.
Referenced by ossl_asn1_initialize(), ossl_asn1data_initialize(), and ossl_asn1eoc_initialize().
#define ossl_asn1_set_tag_class | ( | o, | |
v | |||
) | rb_ivar_set((o),sivTAG_CLASS,(v)) |
Definition at line 179 of file ossl_asn1.c.
Referenced by ossl_asn1_initialize(), ossl_asn1data_initialize(), and ossl_asn1eoc_initialize().
#define ossl_asn1_set_tagging | ( | o, | |
v | |||
) | rb_ivar_set((o),sivTAGGING,(v)) |
Definition at line 178 of file ossl_asn1.c.
Referenced by ossl_asn1_initialize(), and ossl_asn1eoc_initialize().
#define ossl_asn1_set_value | ( | o, | |
v | |||
) | rb_ivar_set((o),sivVALUE,(v)) |
Definition at line 176 of file ossl_asn1.c.
Referenced by ossl_asn1_initialize(), ossl_asn1data_initialize(), and ossl_asn1eoc_initialize().
VALUE asn1integer_to_num | ( | ASN1_INTEGER * | ai | ) |
Definition at line 98 of file ossl_asn1.c.
References eOSSLError, NULL, ossl_bn_new(), ossl_raise(), Qtrue, rb_cstr_to_inum(), and rb_eTypeError.
Referenced by decode_enum(), decode_int(), ossl_pkcs7ri_get_serial(), ossl_pkcs7si_get_serial(), ossl_x509_get_serial(), and ossl_x509revoked_get_serial().
VALUE asn1str_to_str | ( | ASN1_STRING * | str | ) |
Definition at line 87 of file ossl_asn1.c.
References rb_str_new().
Referenced by ossl_pkcs7ri_get_enc_key().
VALUE asn1time_to_time | ( | ASN1_TIME * | time | ) |
Definition at line 32 of file ossl_asn1.c.
References argv, INT2NUM, memset(), ossl_raise(), Qnil, rb_cTime, rb_eTypeError, rb_funcall2(), rb_intern, and rb_warning().
Referenced by decode_time(), ossl_pkcs7si_get_signed_time(), ossl_x509_get_not_after(), ossl_x509_get_not_before(), ossl_x509crl_get_last_update(), ossl_x509crl_get_next_update(), and ossl_x509revoked_get_time().
|
static |
Definition at line 342 of file ossl_asn1.c.
References NULL, ossl_raise(), p, Qfalse, Qtrue, and val.
Referenced by int_ossl_asn1_decode0_prim().
|
static |
Definition at line 374 of file ossl_asn1.c.
References len, NULL, ossl_raise(), p, rb_str_new(), and ret.
Referenced by int_ossl_asn1_decode0_prim().
|
static |
Definition at line 395 of file ossl_asn1.c.
References _, asn1integer_to_num(), NULL, ossl_raise(), p, rb_jump_tag(), rb_protect(), ret, and status.
Referenced by int_ossl_asn1_decode0_prim().
|
static |
Definition at line 476 of file ossl_asn1.c.
References NULL, ossl_raise(), and rb_str_new().
Referenced by int_ossl_asn1_decode0_prim().
|
static |
Definition at line 355 of file ossl_asn1.c.
References _, asn1integer_to_num(), NULL, ossl_raise(), p, rb_jump_tag(), rb_protect(), ret, and status.
Referenced by int_ossl_asn1_decode0_prim().
|
static |
Definition at line 414 of file ossl_asn1.c.
References NULL, ossl_raise(), p, and Qnil.
Referenced by int_ossl_asn1_decode0_prim().
|
static |
Definition at line 428 of file ossl_asn1.c.
References NULL, obj, ossl_membio2str(), ossl_raise(), p, rb_str_new2, and ret.
Referenced by int_ossl_asn1_decode0_prim().
|
static |
Definition at line 457 of file ossl_asn1.c.
References _, asn1time_to_time(), NULL, ossl_raise(), p, rb_jump_tag(), rb_protect(), ret, status, and time.
Referenced by int_ossl_asn1_decode0_prim().
Definition at line 1437 of file ossl_asn1.c.
References ary, eOSSLError, i, INT2NUM, mOSSL, name, ossl_asn1_decode(), ossl_asn1_decode_all(), OSSL_ASN1_DEFINE_CLASS, 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, and rb_undef_method().
Referenced by Init_openssl().
|
static |
Definition at line 861 of file ossl_asn1.c.
References args, ary, ID2SYM, INT2NUM, ossl_asn1_info_t::klass, klass, NUM2INT, ossl_asn1_decode0(), ossl_asn1_get_tag, ossl_asn1_get_tag_class, ossl_asn1_initialize(), ossl_asn1_set_infinite_length, ossl_asn1data_initialize(), ossl_raise(), Qfalse, Qnil, Qtrue, rb_ary_new(), rb_ary_push(), rb_obj_alloc(), SYM2ID, and value.
Referenced by ossl_asn1_decode0().
|
static |
Definition at line 788 of file ossl_asn1.c.
References args, decode_bool(), decode_bstr(), decode_enum(), decode_eoc(), decode_int(), decode_null(), decode_obj(), decode_time(), flag, ID2SYM, INT2NUM, ossl_asn1_info_t::klass, klass, length, LONG2NUM, ossl_asn1_initialize(), ossl_asn1data_initialize(), p, Qnil, rb_ivar_set(), rb_obj_alloc(), rb_str_new(), and value.
Referenced by ossl_asn1_decode0().
|
static |
Definition at line 991 of file ossl_asn1.c.
References ossl_raise().
Referenced by ossl_asn1_decode(), ossl_asn1_decode_all(), and ossl_asn1_traverse().
Definition at line 738 of file ossl_asn1.c.
References join_der_i(), rb_block_call(), rb_intern, rb_str_new(), and str.
Referenced by ossl_asn1cons_to_der(), and ossl_asn1data_to_der().
Definition at line 729 of file ossl_asn1.c.
References ossl_to_der_if_possible(), Qnil, rb_str_append(), and StringValue.
Referenced by join_der().
ASN1_INTEGER* num_to_asn1integer | ( | VALUE | obj, |
ASN1_INTEGER * | ai | ||
) |
Definition at line 150 of file ossl_asn1.c.
References eOSSLError, GetBNPtr(), NIL_P(), NULL, ossl_raise(), and rb_eTypeError.
Referenced by obj_to_asn1int(), ossl_x509_set_serial(), and ossl_x509revoked_set_serial().
|
static |
Definition at line 225 of file ossl_asn1.c.
References NIL_P(), ossl_raise(), rb_eTypeError, and RTEST.
Referenced by ossl_asn1_get_asn1type().
|
static |
Definition at line 244 of file ossl_asn1.c.
References NULL, ossl_raise(), RSTRING_LENINT, RSTRING_PTR, and StringValue.
Referenced by ossl_asn1_get_asn1type().
|
static |
Definition at line 325 of file ossl_asn1.c.
References NULL, ossl_raise(), ossl_to_der(), RSTRING_LENINT, RSTRING_PTR, and str.
Referenced by ossl_asn1_get_asn1type().
|
static |
Definition at line 312 of file ossl_asn1.c.
References NULL, ossl_raise(), t, and time_to_time_t().
Referenced by ossl_asn1_get_asn1type().
|
static |
Definition at line 238 of file ossl_asn1.c.
References NULL, and num_to_asn1integer().
Referenced by ossl_asn1_get_asn1type().
|
static |
Definition at line 273 of file ossl_asn1.c.
References NIL_P(), NULL, and ossl_raise().
Referenced by ossl_asn1_get_asn1type().
|
static |
Definition at line 286 of file ossl_asn1.c.
References ossl_raise(), RSTRING_PTR, and StringValue.
Referenced by ossl_asn1_get_asn1type(), and ossl_asn1obj_get_oid().
|
static |
Definition at line 260 of file ossl_asn1.c.
References NULL, ossl_raise(), RSTRING_LENINT, RSTRING_PTR, str, and StringValue.
Referenced by ossl_asn1_get_asn1type().
|
static |
Definition at line 299 of file ossl_asn1.c.
References NULL, ossl_raise(), t, and time_to_time_t().
Referenced by ossl_asn1_get_asn1type().
Definition at line 1050 of file ossl_asn1.c.
References int_ossl_decode_sanity_check(), len, ossl_asn1_decode0(), ossl_to_der_if_possible(), p, rb_str_new4, ret, RSTRING_LEN, RSTRING_PTR, StringValue, and tmp.
Referenced by Init_ossl_asn1().
|
static |
Definition at line 928 of file ossl_asn1.c.
References arg, INT2NUM, int_ossl_asn1_decode0_cons(), int_ossl_asn1_decode0_prim(), len, LONG2NUM, NULL, ossl_asn1_class2sym(), ossl_raise(), p, Qfalse, Qtrue, rb_ary_new(), rb_ary_push(), rb_yield(), sAPPLICATION, sCONTEXT_SPECIFIC, sPRIVATE, and sUNIVERSAL.
Referenced by int_ossl_asn1_decode0_cons(), ossl_asn1_decode(), ossl_asn1_decode_all(), and ossl_asn1_traverse().
Definition at line 1080 of file ossl_asn1.c.
References ary, int_ossl_decode_sanity_check(), len, ossl_asn1_decode0(), ossl_to_der_if_possible(), p, rb_ary_new(), rb_ary_push(), rb_str_new4, RSTRING_LEN, RSTRING_PTR, StringValue, tmp, and val.
Referenced by Init_ossl_asn1().
Definition at line 608 of file ossl_asn1.c.
References CLASS_OF, NUM2INT, ossl_raise(), Qnil, rb_class2name(), rb_class_superclass(), and rb_hash_lookup.
Referenced by ossl_asn1_get_asn1type(), ossl_asn1_initialize(), ossl_asn1cons_to_der(), and ossl_asn1eoc_initialize().
ASN1_TYPE* ossl_asn1_get_asn1type | ( | VALUE | obj | ) |
Definition at line 532 of file ossl_asn1.c.
References flag, memset(), NIL_P(), NULL, NUM2INT, obj_to_asn1bool(), obj_to_asn1bstr(), obj_to_asn1derstr(), obj_to_asn1gtime(), obj_to_asn1int(), obj_to_asn1null(), obj_to_asn1obj(), obj_to_asn1str(), obj_to_asn1utime(), ossl_asn1_default_tag(), ossl_asn1_get_value, ossl_raise(), ptr, rb_attr_get(), ret, value, and void.
Referenced by ossl_asn1prim_to_der(), and ossl_x509attr_set_value().
Definition at line 1128 of file ossl_asn1.c.
References ID2SYM, INT2NUM, NIL_P(), NUM2INT, ossl_asn1_default_tag(), ossl_asn1_set_infinite_length, ossl_asn1_set_tag, ossl_asn1_set_tag_class, ossl_asn1_set_tagging, ossl_asn1_set_value, ossl_raise(), Qfalse, Qnil, rb_scan_args(), SYM2ID, SYMBOL_P, and value.
Referenced by Init_ossl_asn1(), int_ossl_asn1_decode0_cons(), and int_ossl_asn1_decode0_prim().
Definition at line 639 of file ossl_asn1.c.
References NIL_P(), ossl_asn1_get_tagging, ossl_raise(), ret, s, SYM2ID, and SYMBOL_P.
Referenced by ossl_asn1cons_to_der(), and ossl_asn1prim_to_der().
Definition at line 627 of file ossl_asn1.c.
References NIL_P(), NUM2INT, ossl_asn1_get_tag, and ossl_raise().
Referenced by ossl_asn1data_to_der().
Definition at line 660 of file ossl_asn1.c.
References NIL_P(), ossl_asn1_get_tag_class, ossl_raise(), ret, s, SYM2ID, and SYMBOL_P.
Referenced by ossl_asn1cons_to_der(), ossl_asn1data_to_der(), and ossl_asn1prim_to_der().
Definition at line 1022 of file ossl_asn1.c.
References int_ossl_decode_sanity_check(), len, ossl_asn1_decode0(), ossl_to_der_if_possible(), p, Qnil, rb_str_new4, RSTRING_LEN, RSTRING_PTR, StringValue, and tmp.
Referenced by Init_ossl_asn1().
|
static |
Definition at line 1190 of file ossl_asn1.c.
Referenced by ossl_asn1prim_to_der().
Definition at line 1348 of file ossl_asn1.c.
References ossl_asn1_get_value, and rb_ary_each().
Referenced by Init_ossl_asn1().
Definition at line 1252 of file ossl_asn1.c.
References ary, ASN1_put_eoc(), CLASS_OF, join_der(), length, memcpy(), NUM2INT, ossl_asn1_default_tag(), ossl_asn1_get_infinite_length, ossl_asn1_get_tag, ossl_asn1_get_value, ossl_asn1_is_explicit(), ossl_asn1_object_size, ossl_asn1_put_object, ossl_asn1_tag_class(), ossl_raise(), ossl_str_adjust, p, Qnil, Qtrue, rb_ary_entry(), rb_cArray, rb_obj_is_kind_of(), rb_str_new(), RSTRING_LEN, RSTRING_LENINT, RSTRING_PTR, str, and value.
Referenced by Init_ossl_asn1().
|
static |
Definition at line 714 of file ossl_asn1.c.
References NUM2INT, ossl_asn1_set_infinite_length, ossl_asn1_set_tag, ossl_asn1_set_tag_class, ossl_asn1_set_value, ossl_raise(), Qfalse, SYM2ID, and SYMBOL_P.
Referenced by Init_ossl_asn1(), int_ossl_asn1_decode0_cons(), and int_ossl_asn1_decode0_prim().
Definition at line 755 of file ossl_asn1.c.
References join_der(), length, memcpy(), NULL, ossl_asn1_get_infinite_length, ossl_asn1_get_value, ossl_asn1_object_size, ossl_asn1_put_object, ossl_asn1_tag(), ossl_asn1_tag_class(), ossl_raise(), ossl_str_adjust, p, Qtrue, rb_cArray, rb_obj_is_kind_of(), rb_str_new(), RSTRING_LEN, RSTRING_LENINT, RSTRING_PTR, StringValue, and value.
Referenced by Init_ossl_asn1().
Definition at line 1164 of file ossl_asn1.c.
References ID2SYM, INT2NUM, ossl_asn1_default_tag(), ossl_asn1_set_infinite_length, ossl_asn1_set_tag, ossl_asn1_set_tag_class, ossl_asn1_set_tagging, ossl_asn1_set_value, Qfalse, Qnil, rb_str_new(), and value.
Referenced by Init_ossl_asn1().
Definition at line 1381 of file ossl_asn1.c.
References ossl_asn1_get_value, Qnil, rb_str_new2, ret, StringValuePtr, and val.
Referenced by Init_ossl_asn1().
Definition at line 1394 of file ossl_asn1.c.
References buf, obj_to_asn1obj(), ossl_asn1_get_value, rb_str_new2, and val.
Referenced by Init_ossl_asn1().
Definition at line 1368 of file ossl_asn1.c.
References ossl_asn1_get_value, Qnil, rb_str_new2, ret, StringValuePtr, and val.
Referenced by Init_ossl_asn1().
Definition at line 1355 of file ossl_asn1.c.
References NULL, ossl_raise(), Qtrue, RSTRING_PTR, and StringValue.
Referenced by Init_ossl_asn1().
Definition at line 1209 of file ossl_asn1.c.
References assert, buf, len, NULL, NUM2INT, ossl_asn1_get_asn1type(), ossl_asn1_get_tag, ossl_asn1_is_explicit(), ossl_asn1_object_size, ossl_asn1_put_object, ossl_asn1_tag_class(), ossl_ASN1_TYPE_free(), ossl_buf2str(), ossl_i2d_ASN1_TYPE(), ossl_raise(), p, rb_long2int, and str.
Referenced by Init_ossl_asn1().
|
static |
Definition at line 1179 of file ossl_asn1.c.
Referenced by ossl_asn1prim_to_der().
Definition at line 2497 of file time.c.
Referenced by rb_thread_sleep().
time_t time_to_time_t | ( | VALUE | time | ) |
Definition at line 78 of file ossl_asn1.c.
References NUM2LONG, and rb_Integer().
Referenced by obj_to_asn1gtime(), obj_to_asn1utime(), ossl_x509_set_not_after(), ossl_x509_set_not_before(), ossl_x509crl_set_last_update(), ossl_x509crl_set_next_update(), and ossl_x509revoked_set_time().
VALUE cASN1BitString |
Definition at line 192 of file ossl_asn1.c.
VALUE cASN1BMPString |
Definition at line 198 of file ossl_asn1.c.
VALUE cASN1Boolean |
Definition at line 190 of file ossl_asn1.c.
VALUE cASN1Constructive |
Definition at line 187 of file ossl_asn1.c.
VALUE cASN1Data |
Definition at line 185 of file ossl_asn1.c.
VALUE cASN1EndOfContent |
Definition at line 189 of file ossl_asn1.c.
VALUE cASN1Enumerated |
Definition at line 191 of file ossl_asn1.c.
VALUE cASN1GeneralizedTime |
Definition at line 201 of file ossl_asn1.c.
VALUE cASN1GeneralString |
Definition at line 197 of file ossl_asn1.c.
VALUE cASN1GraphicString |
Definition at line 196 of file ossl_asn1.c.
VALUE cASN1IA5String |
Definition at line 196 of file ossl_asn1.c.
VALUE cASN1Integer |
Definition at line 191 of file ossl_asn1.c.
VALUE cASN1ISO64String |
Definition at line 197 of file ossl_asn1.c.
VALUE cASN1Null |
Definition at line 199 of file ossl_asn1.c.
VALUE cASN1NumericString |
Definition at line 194 of file ossl_asn1.c.
VALUE cASN1ObjectId |
Definition at line 200 of file ossl_asn1.c.
VALUE cASN1OctetString |
Definition at line 193 of file ossl_asn1.c.
VALUE cASN1Primitive |
Definition at line 186 of file ossl_asn1.c.
VALUE cASN1PrintableString |
Definition at line 194 of file ossl_asn1.c.
VALUE cASN1Sequence |
Definition at line 202 of file ossl_asn1.c.
VALUE cASN1Set |
Definition at line 202 of file ossl_asn1.c.
VALUE cASN1T61String |
Definition at line 195 of file ossl_asn1.c.
VALUE cASN1UniversalString |
Definition at line 198 of file ossl_asn1.c.
VALUE cASN1UTCTime |
Definition at line 201 of file ossl_asn1.c.
VALUE cASN1UTF8String |
Definition at line 193 of file ossl_asn1.c.
VALUE cASN1VideotexString |
Definition at line 195 of file ossl_asn1.c.
|
static |
Definition at line 527 of file ossl_asn1.c.
VALUE eASN1Error |
Definition at line 183 of file ossl_asn1.c.
Referenced by ossl_x509attr_set_value().
VALUE mASN1 |
Definition at line 182 of file ossl_asn1.c.
Referenced by ossl_x509attr_get_value().
|
static |
Definition at line 491 of file ossl_asn1.c.
int ossl_asn1_info_size = (sizeof(ossl_asn1_info)/sizeof(ossl_asn1_info[0])) |
Definition at line 525 of file ossl_asn1.c.
Referenced by Init_ossl_asn1().
|
static |
Definition at line 205 of file ossl_asn1.c.
Referenced by ossl_asn1_decode0().
|
static |
Definition at line 205 of file ossl_asn1.c.
Referenced by ossl_asn1_decode0().
|
static |
Definition at line 204 of file ossl_asn1.c.
|
static |
Definition at line 204 of file ossl_asn1.c.
|
static |
Definition at line 206 of file ossl_asn1.c.
|
static |
Definition at line 206 of file ossl_asn1.c.
|
static |
Definition at line 206 of file ossl_asn1.c.
|
static |
Definition at line 206 of file ossl_asn1.c.
|
static |
Definition at line 206 of file ossl_asn1.c.
|
static |
Definition at line 206 of file ossl_asn1.c.
|
static |
Definition at line 205 of file ossl_asn1.c.
Referenced by ossl_asn1_decode0().
|
static |
Definition at line 205 of file ossl_asn1.c.
Referenced by ossl_asn1_decode0().