Ruby 2.0.0p353(2013-11-22revision43784)

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

Macros | Functions | Variables
ossl_x509crl.c File Reference
`#include "ossl.h"`
Include dependency graph for ossl_x509crl.c:

Go to the source code of this file.

## Macros
#define | WrapX509CRL(klass, obj, crl)
#define | GetX509CRL(obj, crl)
#define | SafeGetX509CRL(obj, crl)

## Functions
X509_CRL * | GetX509CRLPtr (VALUE obj)
X509_CRL * | DupX509CRLPtr (VALUE obj)
VALUE | ossl_x509crl_new (X509_CRL *crl)
static VALUE | ossl_x509crl_alloc (VALUE klass)
static VALUE | ossl_x509crl_initialize (int argc, VALUE *argv, VALUE self)
static VALUE | ossl_x509crl_copy (VALUE self, VALUE other)
static VALUE | ossl_x509crl_get_version (VALUE self)
static VALUE | ossl_x509crl_set_version (VALUE self, VALUE version)
static VALUE | ossl_x509crl_get_signature_algorithm (VALUE self)
static VALUE | ossl_x509crl_get_issuer (VALUE self)
static VALUE | ossl_x509crl_set_issuer (VALUE self, VALUE issuer)
static VALUE | ossl_x509crl_get_last_update (VALUE self)
static VALUE | ossl_x509crl_set_last_update (VALUE self, VALUE time)
static VALUE | ossl_x509crl_get_next_update (VALUE self)
static VALUE | ossl_x509crl_set_next_update (VALUE self, VALUE time)
static VALUE | ossl_x509crl_get_revoked (VALUE self)
static VALUE | ossl_x509crl_set_revoked (VALUE self, VALUE ary)
static VALUE | ossl_x509crl_add_revoked (VALUE self, VALUE revoked)
static VALUE | ossl_x509crl_sign (VALUE self, VALUE key, VALUE digest)
static VALUE | ossl_x509crl_verify (VALUE self, VALUE key)
static VALUE | ossl_x509crl_to_der (VALUE self)
static VALUE | ossl_x509crl_to_pem (VALUE self)
static VALUE | ossl_x509crl_to_text (VALUE self)
static VALUE | ossl_x509crl_get_extensions (VALUE self)
static VALUE | ossl_x509crl_set_extensions (VALUE self, VALUE ary)
static VALUE | ossl_x509crl_add_extension (VALUE self, VALUE extension)
void | Init_ossl_x509crl ()

## Variables
VALUE | cX509CRL
VALUE | eX509CRLError

## Macro Definition Documentation

#define GetX509CRL | ( |  | obj,
|  |  | crl
| ) |  |

Value:
do { \
Data_Get_Struct((obj), X509_CRL, (crl)); \
if (!(crl)) { \
ossl_raise(rb_eRuntimeError, "CRL wasn't initialized!"); \
} \
} while (0)
rb_eRuntimeError
VALUE rb_eRuntimeError
Definition: error.c:510
obj
static VALUE VALUE obj
Definition: tcltklib.c:3158
if
if(RB_TYPE_P(r, T_FLOAT))
Definition: bigdecimal.c:1186
Data_Get_Struct
#define Data_Get_Struct(obj, type, sval)
ossl_raise
void ossl_raise(VALUE exc, const char *fmt,...)
Definition: ossl.c:328

Definition at line 19 of file ossl_x509crl.c.

Referenced by ossl_x509crl_add_extension(), ossl_x509crl_add_revoked(), ossl_x509crl_copy(), ossl_x509crl_get_extensions(), ossl_x509crl_get_issuer(), ossl_x509crl_get_last_update(), ossl_x509crl_get_next_update(), ossl_x509crl_get_revoked(), ossl_x509crl_get_signature_algorithm(), ossl_x509crl_get_version(), ossl_x509crl_set_extensions(), ossl_x509crl_set_issuer(), ossl_x509crl_set_last_update(), ossl_x509crl_set_next_update(), ossl_x509crl_set_revoked(), ossl_x509crl_set_version(), ossl_x509crl_sign(), ossl_x509crl_to_der(), ossl_x509crl_to_pem(), ossl_x509crl_to_text(), and ossl_x509crl_verify().

#define SafeGetX509CRL | ( |  | obj,
|  |  | crl
| ) |  |

Value:
do { \
OSSL_Check_Kind((obj), cX509CRL); \
GetX509CRL((obj), (crl)); \
} while (0)
cX509CRL
VALUE cX509CRL
Definition: ossl_x509crl.c:33
GetX509CRL
#define GetX509CRL(obj, crl)
Definition: ossl_x509crl.c:19
obj
static VALUE VALUE obj
Definition: tcltklib.c:3158
OSSL_Check_Kind
#define OSSL_Check_Kind(obj, klass)
Definition: ossl.h:96

Definition at line 25 of file ossl_x509crl.c.

Referenced by DupX509CRLPtr(), GetX509CRLPtr(), and ossl_x509crl_copy().

#define WrapX509CRL | ( |  | klass,
|  |  | obj,
|  |  | crl
| ) |  |

Value:
do { \
if (!(crl)) { \
ossl_raise(rb_eRuntimeError, "CRL wasn't initialized!"); \
} \
(obj) = Data_Wrap_Struct((klass), 0, X509_CRL_free, (crl)); \
} while (0)
Data_Wrap_Struct
return Data_Wrap_Struct(CLASS_OF(interp), 0, ip_free, slave)
rb_eRuntimeError
VALUE rb_eRuntimeError
Definition: error.c:510
obj
static VALUE VALUE obj
Definition: tcltklib.c:3158
if
if(RB_TYPE_P(r, T_FLOAT))
Definition: bigdecimal.c:1186
klass
klass
Definition: tcltklib.c:3504
ossl_raise
void ossl_raise(VALUE exc, const char *fmt,...)
Definition: ossl.c:328

Definition at line 13 of file ossl_x509crl.c.

Referenced by ossl_x509crl_alloc(), and ossl_x509crl_new().

## Function Documentation

X509_CRL* DupX509CRLPtr | ( | VALUE | obj | ) |

Definition at line 50 of file ossl_x509crl.c.

References SafeGetX509CRL.

X509_CRL* GetX509CRLPtr | ( | VALUE | obj | ) |

Definition at line 40 of file ossl_x509crl.c.

References SafeGetX509CRL.

Referenced by ossl_pkcs7_add_crl(), ossl_x509extfactory_set_crl(), and ossl_x509store_add_crl().

void Init_ossl_x509crl | ( | void |  | ) |

Definition at line 505 of file ossl_x509crl.c.

References cX509CRL, eOSSLError, eX509CRLError, mX509, ossl_x509crl_add_extension(), ossl_x509crl_add_revoked(), ossl_x509crl_alloc(), ossl_x509crl_copy(), ossl_x509crl_get_extensions(), ossl_x509crl_get_issuer(), ossl_x509crl_get_last_update(), ossl_x509crl_get_next_update(), ossl_x509crl_get_revoked(), ossl_x509crl_get_signature_algorithm(), ossl_x509crl_get_version(), ossl_x509crl_initialize(), ossl_x509crl_set_extensions(), ossl_x509crl_set_issuer(), ossl_x509crl_set_last_update(), ossl_x509crl_set_next_update(), ossl_x509crl_set_revoked(), ossl_x509crl_set_version(), ossl_x509crl_sign(), ossl_x509crl_to_der(), ossl_x509crl_to_pem(), ossl_x509crl_to_text(), ossl_x509crl_verify(), rb_cObject, rb_define_alias(), rb_define_alloc_func(), rb_define_class_under(), rb_define_copy_func, and rb_define_method().

Referenced by Init_ossl_x509().

static VALUE ossl_x509crl_add_extension | ( | VALUE | self,
|  | VALUE | extension
| ) |  |
| static

Definition at line 485 of file ossl_x509crl.c.

References DupX509ExtPtr(), eX509CRLError, GetX509CRL, NULL, and ossl_raise().

Referenced by Init_ossl_x509crl().

static VALUE ossl_x509crl_add_revoked | ( | VALUE | self,
|  | VALUE | revoked
| ) |  |
| static

Definition at line 310 of file ossl_x509crl.c.

References DupX509RevokedPtr(), eX509CRLError, GetX509CRL, NULL, ossl_raise(), X509_CRL_add0_revoked(), and X509_CRL_sort().

Referenced by Init_ossl_x509crl().

static VALUE ossl_x509crl_alloc | ( | VALUE | klass | ) |
| static

Definition at line 77 of file ossl_x509crl.c.

References eX509CRLError, NULL, obj, ossl_raise(), and WrapX509CRL.

Referenced by Init_ossl_x509crl().

static VALUE ossl_x509crl_copy | ( | VALUE | self,
|  | VALUE | other
| ) |  |
| static

Definition at line 116 of file ossl_x509crl.c.

References a, b, DATA_PTR(), eX509CRLError, GetX509CRL, NULL, ossl_raise(), rb_check_frozen, and SafeGetX509CRL.

Referenced by Init_ossl_x509crl().

static VALUE ossl_x509crl_get_extensions | ( | VALUE | self | ) |
| static

Definition at line 432 of file ossl_x509crl.c.

References ary, count, GetX509CRL, i, OSSL_Debug, ossl_x509ext_new(), rb_ary_new(), rb_ary_new2(), and rb_ary_push().

Referenced by Init_ossl_x509crl().

static VALUE ossl_x509crl_get_issuer | ( | VALUE | self | ) |
| static

Definition at line 185 of file ossl_x509crl.c.

References GetX509CRL, and ossl_x509name_new().

Referenced by Init_ossl_x509crl().

static VALUE ossl_x509crl_get_last_update | ( | VALUE | self | ) |
| static

Definition at line 208 of file ossl_x509crl.c.

References asn1time_to_time(), and GetX509CRL.

Referenced by Init_ossl_x509crl().

static VALUE ossl_x509crl_get_next_update | ( | VALUE | self | ) |
| static

Definition at line 233 of file ossl_x509crl.c.

References asn1time_to_time(), and GetX509CRL.

Referenced by Init_ossl_x509crl().

static VALUE ossl_x509crl_get_revoked | ( | VALUE | self | ) |
| static

Definition at line 259 of file ossl_x509crl.c.

References ary, GetX509CRL, i, OSSL_Debug, ossl_x509revoked_new(), rb_ary_new(), rb_ary_new2(), and rb_ary_push().

Referenced by Init_ossl_x509crl().

static VALUE ossl_x509crl_get_signature_algorithm | ( | VALUE | self | ) |
| static

Definition at line 163 of file ossl_x509crl.c.

References buf, eX509CRLError, GetX509CRL, NULL, ossl_raise(), out, rb_str_new(), and str.

Referenced by Init_ossl_x509crl().

static VALUE ossl_x509crl_get_version | ( | VALUE | self | ) |
| static

Definition at line 134 of file ossl_x509crl.c.

References GetX509CRL, and LONG2NUM.

Referenced by Init_ossl_x509crl().

static VALUE ossl_x509crl_initialize | ( | int | argc,
|  | VALUE * | argv,
|  | VALUE | self
| ) |  |
| static

Definition at line 91 of file ossl_x509crl.c.

References arg, DATA_PTR(), eX509CRLError, in, NULL, OSSL_BIO_reset, ossl_obj2bio(), ossl_raise(), ossl_to_der_if_possible(), and rb_scan_args().

Referenced by Init_ossl_x509crl().

VALUE ossl_x509crl_new | ( | X509_CRL * | crl | ) |

Definition at line 61 of file ossl_x509crl.c.

References cX509CRL, eX509CRLError, NULL, obj, ossl_raise(), tmp, and WrapX509CRL.

Referenced by ossl_x509stctx_get_curr_crl().

static VALUE ossl_x509crl_set_extensions | ( | VALUE | self,
|  | VALUE | ary
| ) |  |
| static

Definition at line 458 of file ossl_x509crl.c.

References ary, Check_Type, cX509Ext, DupX509ExtPtr(), eX509CRLError, GetX509CRL, i, NULL, OSSL_Check_Kind, ossl_raise(), RARRAY_LEN, RARRAY_PTR(), and T_ARRAY.

Referenced by Init_ossl_x509crl().

static VALUE ossl_x509crl_set_issuer | ( | VALUE | self,
|  | VALUE | issuer
| ) |  |
| static

Definition at line 195 of file ossl_x509crl.c.

References eX509CRLError, GetX509CRL, GetX509NamePtr(), NULL, ossl_raise(), and X509_CRL_set_issuer_name().

Referenced by Init_ossl_x509crl().

static VALUE ossl_x509crl_set_last_update | ( | VALUE | self,
|  | VALUE | time
| ) |  |
| static

Definition at line 218 of file ossl_x509crl.c.

References eX509CRLError, GetX509CRL, NULL, ossl_raise(), time, and time_to_time_t().

Referenced by Init_ossl_x509crl().

static VALUE ossl_x509crl_set_next_update | ( | VALUE | self,
|  | VALUE | time
| ) |  |
| static

Definition at line 243 of file ossl_x509crl.c.

References eX509CRLError, GetX509CRL, NULL, ossl_raise(), time, and time_to_time_t().

Referenced by Init_ossl_x509crl().

static VALUE ossl_x509crl_set_revoked | ( | VALUE | self,
|  | VALUE | ary
| ) |  |
| static

Definition at line 284 of file ossl_x509crl.c.

References ary, Check_Type, cX509Rev, DupX509RevokedPtr(), eX509CRLError, GetX509CRL, i, NULL, OSSL_Check_Kind, ossl_raise(), RARRAY_LEN, RARRAY_PTR(), T_ARRAY, X509_CRL_add0_revoked(), and X509_CRL_sort().

Referenced by Init_ossl_x509crl().

static VALUE ossl_x509crl_set_version | ( | VALUE | self,
|  | VALUE | version
| ) |  |
| static

Definition at line 146 of file ossl_x509crl.c.

References eX509CRLError, GetX509CRL, NULL, NUM2LONG, ossl_raise(), version(), and X509_CRL_set_version().

Referenced by Init_ossl_x509crl().

static VALUE ossl_x509crl_sign | ( | VALUE | self,
|  | VALUE | key,
|  | VALUE | digest
| ) |  |
| static

Definition at line 326 of file ossl_x509crl.c.

References eX509CRLError, GetDigestPtr(), GetPrivPKeyPtr(), GetX509CRL, NULL, and ossl_raise().

Referenced by Init_ossl_x509crl().

static VALUE ossl_x509crl_to_der | ( | VALUE | self | ) |
| static

Definition at line 360 of file ossl_x509crl.c.

References buf, eX509CRLError, GetX509CRL, NULL, ossl_raise(), out, rb_str_new(), and str.

Referenced by Init_ossl_x509crl().

static VALUE ossl_x509crl_to_pem | ( | VALUE | self | ) |
| static

Definition at line 383 of file ossl_x509crl.c.

References buf, eX509CRLError, GetX509CRL, NULL, ossl_raise(), out, rb_str_new(), and str.

Referenced by Init_ossl_x509crl().

static VALUE ossl_x509crl_to_text | ( | VALUE | self | ) |
| static

Definition at line 406 of file ossl_x509crl.c.

References buf, eX509CRLError, GetX509CRL, NULL, ossl_raise(), out, rb_str_new(), and str.

Referenced by Init_ossl_x509crl().

static VALUE ossl_x509crl_verify | ( | VALUE | self,
|  | VALUE | key
| ) |  |
| static

Definition at line 343 of file ossl_x509crl.c.

References eX509CRLError, GetPKeyPtr(), GetX509CRL, NULL, ossl_raise(), Qfalse, Qtrue, and ret.

Referenced by Init_ossl_x509crl().

## Variable Documentation

VALUE cX509CRL

Definition at line 33 of file ossl_x509crl.c.

Referenced by Init_ossl_x509crl(), and ossl_x509crl_new().

VALUE eX509CRLError

Definition at line 34 of file ossl_x509crl.c.

Referenced by Init_ossl_x509crl(), ossl_x509crl_add_extension(), ossl_x509crl_add_revoked(), ossl_x509crl_alloc(), ossl_x509crl_copy(), ossl_x509crl_get_signature_algorithm(), ossl_x509crl_initialize(), ossl_x509crl_new(), ossl_x509crl_set_extensions(), ossl_x509crl_set_issuer(), ossl_x509crl_set_last_update(), ossl_x509crl_set_next_update(), ossl_x509crl_set_revoked(), ossl_x509crl_set_version(), ossl_x509crl_sign(), ossl_x509crl_to_der(), ossl_x509crl_to_pem(), ossl_x509crl_to_text(), and ossl_x509crl_verify().