Ruby  2.4.2p198(2017-09-14revision59899)
Macros | Functions | Variables
ossl_x509revoked.c File Reference
#include "ossl.h"
Include dependency graph for ossl_x509revoked.c:

Go to the source code of this file.

Macros

#define NewX509Rev(klass)   TypedData_Wrap_Struct((klass), &ossl_x509rev_type, 0)
 
#define SetX509Rev(obj, rev)
 
#define GetX509Rev(obj, rev)
 
#define SafeGetX509Rev(obj, rev)
 

Functions

static void ossl_x509rev_free (void *ptr)
 
VALUE ossl_x509revoked_new (X509_REVOKED *rev)
 
X509_REVOKED * DupX509RevokedPtr (VALUE obj)
 
static VALUE ossl_x509revoked_alloc (VALUE klass)
 
static VALUE ossl_x509revoked_initialize (int argc, VALUE *argv, VALUE self)
 
static VALUE ossl_x509revoked_initialize_copy (VALUE self, VALUE other)
 
static VALUE ossl_x509revoked_get_serial (VALUE self)
 
static VALUE ossl_x509revoked_set_serial (VALUE self, VALUE num)
 
static VALUE ossl_x509revoked_get_time (VALUE self)
 
static VALUE ossl_x509revoked_set_time (VALUE self, VALUE time)
 
static VALUE ossl_x509revoked_get_extensions (VALUE self)
 
static VALUE ossl_x509revoked_set_extensions (VALUE self, VALUE ary)
 
static VALUE ossl_x509revoked_add_extension (VALUE self, VALUE ext)
 
void Init_ossl_x509revoked (void)
 

Variables

VALUE cX509Rev
 
VALUE eX509RevError
 
static const rb_data_type_t ossl_x509rev_type
 

Macro Definition Documentation

◆ GetX509Rev

#define GetX509Rev (   obj,
  rev 
)
Value:
do { \
TypedData_Get_Struct((obj), X509_REVOKED, &ossl_x509rev_type, (rev)); \
if (!(rev)) { \
ossl_raise(rb_eRuntimeError, "REV wasn't initialized!"); \
} \
} while (0)
VALUE rb_eRuntimeError
Definition: error.c:761
static const rb_data_type_t ossl_x509rev_type

Definition at line 20 of file ossl_x509revoked.c.

Referenced by ossl_x509revoked_add_extension(), ossl_x509revoked_get_extensions(), ossl_x509revoked_get_serial(), ossl_x509revoked_get_time(), ossl_x509revoked_initialize_copy(), ossl_x509revoked_set_extensions(), ossl_x509revoked_set_serial(), and ossl_x509revoked_set_time().

◆ NewX509Rev

#define NewX509Rev (   klass)    TypedData_Wrap_Struct((klass), &ossl_x509rev_type, 0)

Definition at line 12 of file ossl_x509revoked.c.

Referenced by ossl_x509revoked_alloc(), and ossl_x509revoked_new().

◆ SafeGetX509Rev

#define SafeGetX509Rev (   obj,
  rev 
)
Value:
do { \
OSSL_Check_Kind((obj), cX509Rev); \
GetX509Rev((obj), (rev)); \
} while (0)
VALUE cX509Rev

Definition at line 26 of file ossl_x509revoked.c.

Referenced by DupX509RevokedPtr(), and ossl_x509revoked_initialize_copy().

◆ SetX509Rev

#define SetX509Rev (   obj,
  rev 
)
Value:
do { \
if (!(rev)) { \
ossl_raise(rb_eRuntimeError, "REV wasn't initialized!"); \
} \
RTYPEDDATA_DATA(obj) = (rev); \
} while (0)
VALUE rb_eRuntimeError
Definition: error.c:761

Definition at line 14 of file ossl_x509revoked.c.

Referenced by ossl_x509revoked_alloc(), ossl_x509revoked_initialize_copy(), and ossl_x509revoked_new().

Function Documentation

◆ DupX509RevokedPtr()

X509_REVOKED* DupX509RevokedPtr ( VALUE  obj)

◆ Init_ossl_x509revoked()

void Init_ossl_x509revoked ( void  )

◆ ossl_x509rev_free()

static void ossl_x509rev_free ( void *  ptr)
static

Definition at line 38 of file ossl_x509revoked.c.

◆ ossl_x509revoked_add_extension()

static VALUE ossl_x509revoked_add_extension ( VALUE  self,
VALUE  ext 
)
static

Definition at line 240 of file ossl_x509revoked.c.

References eX509RevError, GetX509ExtPtr(), GetX509Rev, NULL, and ossl_raise().

Referenced by Init_ossl_x509revoked().

◆ ossl_x509revoked_alloc()

static VALUE ossl_x509revoked_alloc ( VALUE  klass)
static

Definition at line 91 of file ossl_x509revoked.c.

References eX509RevError, NewX509Rev, NULL, ossl_raise(), and SetX509Rev.

Referenced by Init_ossl_x509revoked().

◆ ossl_x509revoked_get_extensions()

static VALUE ossl_x509revoked_get_extensions ( VALUE  self)
static

◆ ossl_x509revoked_get_serial()

static VALUE ossl_x509revoked_get_serial ( VALUE  self)
static

◆ ossl_x509revoked_get_time()

static VALUE ossl_x509revoked_get_time ( VALUE  self)
static

◆ ossl_x509revoked_initialize()

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

Definition at line 106 of file ossl_x509revoked.c.

Referenced by Init_ossl_x509revoked().

◆ ossl_x509revoked_initialize_copy()

static VALUE ossl_x509revoked_initialize_copy ( VALUE  self,
VALUE  other 
)
static

◆ ossl_x509revoked_new()

VALUE ossl_x509revoked_new ( X509_REVOKED *  rev)

◆ ossl_x509revoked_set_extensions()

static VALUE ossl_x509revoked_set_extensions ( VALUE  self,
VALUE  ary 
)
static

◆ ossl_x509revoked_set_serial()

static VALUE ossl_x509revoked_set_serial ( VALUE  self,
VALUE  num 
)
static

Definition at line 142 of file ossl_x509revoked.c.

References eX509RevError, GetX509Rev, NULL, num_to_asn1integer(), and ossl_raise().

Referenced by Init_ossl_x509revoked().

◆ ossl_x509revoked_set_time()

static VALUE ossl_x509revoked_set_time ( VALUE  self,
VALUE  time 
)
static

Definition at line 169 of file ossl_x509revoked.c.

References eX509RevError, GetX509Rev, NULL, ossl_raise(), and ossl_x509_time_adjust().

Referenced by Init_ossl_x509revoked().

Variable Documentation

◆ cX509Rev

VALUE cX509Rev

◆ eX509RevError

VALUE eX509RevError

◆ ossl_x509rev_type

const rb_data_type_t ossl_x509rev_type
static
Initial value:
= {
"OpenSSL/X509/REV",
{
},
}
#define RUBY_TYPED_FREE_IMMEDIATELY
Definition: ruby.h:1145
static void ossl_x509rev_free(void *ptr)

Definition at line 43 of file ossl_x509revoked.c.