ossl_asn1.h File Reference

Go to the source code of this file.

## Functions

VALUE | asn1time_to_time (ASN1_TIME *)
time_t | time_to_time_t (VALUE)
VALUE | asn1str_to_str (ASN1_STRING *)
VALUE | asn1integer_to_num (ASN1_INTEGER *)
ASN1_INTEGER * | num_to_asn1integer (VALUE, ASN1_INTEGER *)
ASN1_TYPE * | ossl_asn1_get_asn1type (VALUE)
void | Init_ossl_asn1 (void)

## Variables

VALUE | mASN1
VALUE | eASN1Error
VALUE | cASN1Data
VALUE | cASN1Primitive
VALUE | cASN1Constructive
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

## Function Documentation

VALUE asn1integer_to_num | ( | ASN1_INTEGER * |  | ) |

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 * |  | ) |

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 * |  | ) |

Definition at line 32 of file ossl_asn1.c.

References argv, INT2NUM(), 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().

void Init_ossl_asn1 | ( | void |  | ) |

Definition at line 1429 of file ossl_asn1.c.

References 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().

ASN1_INTEGER* num_to_asn1integer | ( | VALUE | ,
|  | ASN1_INTEGER * |
| ) |  |

Definition at line 150 of file ossl_asn1.c.

References eOSSLError, GetBNPtr(), NULL, and ossl_raise().

Referenced by obj_to_asn1int(), ossl_x509_set_serial(), and ossl_x509revoked_set_serial().

ASN1_TYPE* ossl_asn1_get_asn1type | ( | VALUE |  | ) |

Definition at line 524 of file ossl_asn1.c.

References 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(), and rb_attr_get().

Referenced by ossl_asn1prim_to_der(), and ossl_x509attr_set_value().

time_t time_to_time_t | ( | VALUE |  | ) |

Definition at line 78 of file ossl_asn1.c.

References NUM2LONG(), rb_Integer(), and time_t.

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().

## Variable Documentation

VALUE cASN1BitString

Definition at line 187 of file ossl_asn1.c.

VALUE cASN1BMPString

Definition at line 193 of file ossl_asn1.c.

VALUE cASN1Boolean

Definition at line 185 of file ossl_asn1.c.

VALUE cASN1Constructive

Definition at line 182 of file ossl_asn1.c.

VALUE cASN1Data

Definition at line 180 of file ossl_asn1.c.

VALUE cASN1Enumerated

Definition at line 186 of file ossl_asn1.c.

VALUE cASN1GeneralizedTime

Definition at line 196 of file ossl_asn1.c.

VALUE cASN1GeneralString

Definition at line 192 of file ossl_asn1.c.

VALUE cASN1GraphicString

Definition at line 191 of file ossl_asn1.c.

VALUE cASN1IA5String

Definition at line 191 of file ossl_asn1.c.

VALUE cASN1Integer

Definition at line 186 of file ossl_asn1.c.

VALUE cASN1ISO64String

Definition at line 192 of file ossl_asn1.c.

VALUE cASN1Null

Definition at line 194 of file ossl_asn1.c.

VALUE cASN1NumericString

Definition at line 189 of file ossl_asn1.c.

VALUE cASN1ObjectId

Definition at line 195 of file ossl_asn1.c.

VALUE cASN1OctetString

Definition at line 188 of file ossl_asn1.c.

VALUE cASN1Primitive

Definition at line 181 of file ossl_asn1.c.

VALUE cASN1PrintableString

Definition at line 189 of file ossl_asn1.c.

VALUE cASN1Sequence

Definition at line 197 of file ossl_asn1.c.

VALUE cASN1Set

Definition at line 197 of file ossl_asn1.c.

VALUE cASN1T61String

Definition at line 190 of file ossl_asn1.c.

VALUE cASN1UniversalString

Definition at line 193 of file ossl_asn1.c.

VALUE cASN1UTCTime

Definition at line 196 of file ossl_asn1.c.

VALUE cASN1UTF8String

Definition at line 188 of file ossl_asn1.c.

VALUE cASN1VideotexString

Definition at line 190 of file ossl_asn1.c.

VALUE eASN1Error

Definition at line 178 of file ossl_asn1.c.

Referenced by ossl_x509attr_set_value().

VALUE mASN1

Definition at line 177 of file ossl_asn1.c.

Referenced by ossl_x509attr_get_value().