ext/openssl/ossl_x509crl.c File Reference

#include "ossl.h"

Go to the source code of this file.

Defines

#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


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

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)

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)

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, ossl_raise(), VALUE, 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 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 count, GetX509CRL, OSSL_Debug, ossl_x509ext_new(), rb_ary_new(), rb_ary_new2, rb_ary_push(), and VALUE.

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 GetX509CRL, OSSL_Debug, ossl_x509revoked_new(), rb_ary_new(), rb_ary_new2, rb_ary_push(), and VALUE.

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(), rb_str_new(), and VALUE.

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 DATA_PTR, eX509CRLError, NULL, OSSL_BIO_reset, ossl_obj2bio(), ossl_raise(), ossl_to_der_if_possible(), rb_scan_args(), and VALUE.

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, ossl_raise(), VALUE, 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 Check_Type, cX509Ext, DupX509ExtPtr(), eX509CRLError, GetX509CRL, 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(), 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(), 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 Check_Type, cX509Rev, DupX509RevokedPtr(), eX509CRLError, GetX509CRL, 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(), 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(), rb_str_new(), and VALUE.

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(), rb_str_new(), and VALUE.

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(), rb_str_new(), and VALUE.

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, and Qtrue.

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


Generated on 19 Jul 2016 for Ruby by  doxygen 1.4.7