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

Go to the source code of this file.

Macros

#define NewOCSPReq(klass)   TypedData_Wrap_Struct((klass), &ossl_ocsp_request_type, 0)
 
#define SetOCSPReq(obj, req)
 
#define GetOCSPReq(obj, req)
 
#define SafeGetOCSPReq(obj, req)
 
#define NewOCSPRes(klass)   TypedData_Wrap_Struct((klass), &ossl_ocsp_response_type, 0)
 
#define SetOCSPRes(obj, res)
 
#define GetOCSPRes(obj, res)
 
#define SafeGetOCSPRes(obj, res)
 
#define NewOCSPBasicRes(klass)   TypedData_Wrap_Struct((klass), &ossl_ocsp_basicresp_type, 0)
 
#define SetOCSPBasicRes(obj, res)
 
#define GetOCSPBasicRes(obj, res)
 
#define SafeGetOCSPBasicRes(obj, res)
 
#define NewOCSPSingleRes(klass)   TypedData_Wrap_Struct((klass), &ossl_ocsp_singleresp_type, 0)
 
#define SetOCSPSingleRes(obj, res)
 
#define GetOCSPSingleRes(obj, res)
 
#define SafeGetOCSPSingleRes(obj, res)
 
#define NewOCSPCertId(klass)   TypedData_Wrap_Struct((klass), &ossl_ocsp_certid_type, 0)
 
#define SetOCSPCertId(obj, cid)
 
#define GetOCSPCertId(obj, cid)
 
#define SafeGetOCSPCertId(obj, cid)
 

Functions

static void ossl_ocsp_request_free (void *ptr)
 
static void ossl_ocsp_response_free (void *ptr)
 
static void ossl_ocsp_basicresp_free (void *ptr)
 
static void ossl_ocsp_singleresp_free (void *ptr)
 
static void ossl_ocsp_certid_free (void *ptr)
 
static VALUE ossl_ocspcertid_new (OCSP_CERTID *cid)
 
static VALUE ossl_ocspreq_alloc (VALUE klass)
 
static VALUE ossl_ocspreq_initialize_copy (VALUE self, VALUE other)
 
static VALUE ossl_ocspreq_initialize (int argc, VALUE *argv, VALUE self)
 
static VALUE ossl_ocspreq_add_nonce (int argc, VALUE *argv, VALUE self)
 
static VALUE ossl_ocspreq_check_nonce (VALUE self, VALUE basic_resp)
 
static VALUE ossl_ocspreq_add_certid (VALUE self, VALUE certid)
 
static VALUE ossl_ocspreq_get_certid (VALUE self)
 
static VALUE ossl_ocspreq_sign (int argc, VALUE *argv, VALUE self)
 
static VALUE ossl_ocspreq_verify (int argc, VALUE *argv, VALUE self)
 
static VALUE ossl_ocspreq_to_der (VALUE self)
 
static VALUE ossl_ocspres_s_create (VALUE klass, VALUE status, VALUE basic_resp)
 
static VALUE ossl_ocspres_alloc (VALUE klass)
 
static VALUE ossl_ocspres_initialize_copy (VALUE self, VALUE other)
 
static VALUE ossl_ocspres_initialize (int argc, VALUE *argv, VALUE self)
 
static VALUE ossl_ocspres_status (VALUE self)
 
static VALUE ossl_ocspres_status_string (VALUE self)
 
static VALUE ossl_ocspres_get_basic (VALUE self)
 
static VALUE ossl_ocspres_to_der (VALUE self)
 
static VALUE ossl_ocspbres_alloc (VALUE klass)
 
static VALUE ossl_ocspbres_initialize_copy (VALUE self, VALUE other)
 
static VALUE ossl_ocspbres_initialize (int argc, VALUE *argv, VALUE self)
 
static VALUE ossl_ocspbres_copy_nonce (VALUE self, VALUE request)
 
static VALUE ossl_ocspbres_add_nonce (int argc, VALUE *argv, VALUE self)
 
static VALUE add_status_convert_time (VALUE obj)
 
static VALUE ossl_ocspbres_add_status (VALUE self, VALUE cid, VALUE status, VALUE reason, VALUE revtime, VALUE thisupd, VALUE nextupd, VALUE ext)
 
static VALUE ossl_ocspbres_get_status (VALUE self)
 
static VALUE ossl_ocspsres_new (OCSP_SINGLERESP *)
 
static VALUE ossl_ocspbres_get_responses (VALUE self)
 
static VALUE ossl_ocspbres_find_response (VALUE self, VALUE target)
 
static VALUE ossl_ocspbres_sign (int argc, VALUE *argv, VALUE self)
 
static VALUE ossl_ocspbres_verify (int argc, VALUE *argv, VALUE self)
 
static VALUE ossl_ocspbres_to_der (VALUE self)
 
static VALUE ossl_ocspsres_alloc (VALUE klass)
 
static VALUE ossl_ocspsres_initialize (VALUE self, VALUE arg)
 
static VALUE ossl_ocspsres_initialize_copy (VALUE self, VALUE other)
 
static VALUE ossl_ocspsres_check_validity (int argc, VALUE *argv, VALUE self)
 
static VALUE ossl_ocspsres_get_certid (VALUE self)
 
static VALUE ossl_ocspsres_get_cert_status (VALUE self)
 
static VALUE ossl_ocspsres_get_this_update (VALUE self)
 
static VALUE ossl_ocspsres_get_next_update (VALUE self)
 
static VALUE ossl_ocspsres_get_revocation_time (VALUE self)
 
static VALUE ossl_ocspsres_get_revocation_reason (VALUE self)
 
static VALUE ossl_ocspsres_get_extensions (VALUE self)
 
static VALUE ossl_ocspsres_to_der (VALUE self)
 
static VALUE ossl_ocspcid_alloc (VALUE klass)
 
static VALUE ossl_ocspcid_initialize_copy (VALUE self, VALUE other)
 
static VALUE ossl_ocspcid_initialize (int argc, VALUE *argv, VALUE self)
 
static VALUE ossl_ocspcid_cmp (VALUE self, VALUE other)
 
static VALUE ossl_ocspcid_cmp_issuer (VALUE self, VALUE other)
 
static VALUE ossl_ocspcid_get_serial (VALUE self)
 
static VALUE ossl_ocspcid_get_issuer_name_hash (VALUE self)
 
static VALUE ossl_ocspcid_get_issuer_key_hash (VALUE self)
 
static VALUE ossl_ocspcid_get_hash_algorithm (VALUE self)
 
static VALUE ossl_ocspcid_to_der (VALUE self)
 
void Init_ossl_ocsp (void)
 

Variables

VALUE mOCSP
 
VALUE eOCSPError
 
VALUE cOCSPReq
 
VALUE cOCSPRes
 
VALUE cOCSPBasicRes
 
VALUE cOCSPSingleRes
 
VALUE cOCSPCertId
 
static const rb_data_type_t ossl_ocsp_request_type
 
static const rb_data_type_t ossl_ocsp_response_type
 
static const rb_data_type_t ossl_ocsp_basicresp_type
 
static const rb_data_type_t ossl_ocsp_singleresp_type
 
static const rb_data_type_t ossl_ocsp_certid_type
 

Macro Definition Documentation

◆ GetOCSPBasicRes

#define GetOCSPBasicRes (   obj,
  res 
)
Value:
do { \
TypedData_Get_Struct((obj), OCSP_BASICRESP, &ossl_ocsp_basicresp_type, (res)); \
if(!(res)) ossl_raise(rb_eRuntimeError, "Response wasn't initialized!"); \
} while (0)
VALUE rb_eRuntimeError
Definition: error.c:761
void ossl_raise(VALUE exc, const char *fmt,...)
Definition: ossl.c:278
static const rb_data_type_t ossl_ocsp_basicresp_type
Definition: ossl_ocsp.c:132

Definition at line 51 of file ossl_ocsp.c.

Referenced by ossl_ocspbres_add_nonce(), ossl_ocspbres_add_status(), ossl_ocspbres_copy_nonce(), ossl_ocspbres_find_response(), ossl_ocspbres_get_responses(), ossl_ocspbres_get_status(), ossl_ocspbres_initialize(), ossl_ocspbres_initialize_copy(), ossl_ocspbres_sign(), ossl_ocspbres_to_der(), ossl_ocspbres_verify(), and ossl_ocspres_s_create().

◆ GetOCSPCertId

#define GetOCSPCertId (   obj,
  cid 
)
Value:
do { \
TypedData_Get_Struct((obj), OCSP_CERTID, &ossl_ocsp_certid_type, (cid)); \
if(!(cid)) ossl_raise(rb_eRuntimeError, "Cert ID wasn't initialized!"); \
} while (0)
VALUE rb_eRuntimeError
Definition: error.c:761
static const rb_data_type_t ossl_ocsp_certid_type
Definition: ossl_ocsp.c:160
void ossl_raise(VALUE exc, const char *fmt,...)
Definition: ossl.c:278

Definition at line 81 of file ossl_ocsp.c.

Referenced by ossl_ocspcid_cmp(), ossl_ocspcid_cmp_issuer(), ossl_ocspcid_get_hash_algorithm(), ossl_ocspcid_get_issuer_key_hash(), ossl_ocspcid_get_issuer_name_hash(), ossl_ocspcid_get_serial(), ossl_ocspcid_initialize(), ossl_ocspcid_initialize_copy(), ossl_ocspcid_to_der(), and ossl_ocspreq_add_certid().

◆ GetOCSPReq

#define GetOCSPReq (   obj,
  req 
)
Value:
do { \
TypedData_Get_Struct((obj), OCSP_REQUEST, &ossl_ocsp_request_type, (req)); \
if(!(req)) ossl_raise(rb_eRuntimeError, "Request wasn't initialized!"); \
} while (0)
static const rb_data_type_t ossl_ocsp_request_type
Definition: ossl_ocsp.c:104
VALUE rb_eRuntimeError
Definition: error.c:761
void ossl_raise(VALUE exc, const char *fmt,...)
Definition: ossl.c:278

Definition at line 21 of file ossl_ocsp.c.

Referenced by ossl_ocspreq_add_certid(), ossl_ocspreq_add_nonce(), ossl_ocspreq_check_nonce(), ossl_ocspreq_get_certid(), ossl_ocspreq_initialize(), ossl_ocspreq_initialize_copy(), ossl_ocspreq_sign(), ossl_ocspreq_to_der(), and ossl_ocspreq_verify().

◆ GetOCSPRes

#define GetOCSPRes (   obj,
  res 
)
Value:
do { \
TypedData_Get_Struct((obj), OCSP_RESPONSE, &ossl_ocsp_response_type, (res)); \
if(!(res)) ossl_raise(rb_eRuntimeError, "Response wasn't initialized!"); \
} while (0)
static const rb_data_type_t ossl_ocsp_response_type
Definition: ossl_ocsp.c:118
VALUE rb_eRuntimeError
Definition: error.c:761
void ossl_raise(VALUE exc, const char *fmt,...)
Definition: ossl.c:278

Definition at line 36 of file ossl_ocsp.c.

Referenced by ossl_ocspres_get_basic(), ossl_ocspres_initialize(), ossl_ocspres_initialize_copy(), ossl_ocspres_status(), ossl_ocspres_status_string(), and ossl_ocspres_to_der().

◆ GetOCSPSingleRes

#define GetOCSPSingleRes (   obj,
  res 
)
Value:
do { \
TypedData_Get_Struct((obj), OCSP_SINGLERESP, &ossl_ocsp_singleresp_type, (res)); \
if(!(res)) ossl_raise(rb_eRuntimeError, "SingleResponse wasn't initialized!"); \
} while (0)
VALUE rb_eRuntimeError
Definition: error.c:761
static const rb_data_type_t ossl_ocsp_singleresp_type
Definition: ossl_ocsp.c:146
void ossl_raise(VALUE exc, const char *fmt,...)
Definition: ossl.c:278

Definition at line 66 of file ossl_ocsp.c.

Referenced by ossl_ocspsres_check_validity(), ossl_ocspsres_get_cert_status(), ossl_ocspsres_get_certid(), ossl_ocspsres_get_extensions(), ossl_ocspsres_get_next_update(), ossl_ocspsres_get_revocation_reason(), ossl_ocspsres_get_revocation_time(), ossl_ocspsres_get_this_update(), ossl_ocspsres_initialize(), ossl_ocspsres_initialize_copy(), and ossl_ocspsres_to_der().

◆ NewOCSPBasicRes

#define NewOCSPBasicRes (   klass)    TypedData_Wrap_Struct((klass), &ossl_ocsp_basicresp_type, 0)

Definition at line 45 of file ossl_ocsp.c.

Referenced by ossl_ocspbres_alloc(), and ossl_ocspres_get_basic().

◆ NewOCSPCertId

#define NewOCSPCertId (   klass)    TypedData_Wrap_Struct((klass), &ossl_ocsp_certid_type, 0)

Definition at line 75 of file ossl_ocsp.c.

Referenced by ossl_ocspcertid_new(), ossl_ocspcid_alloc(), and ossl_ocspreq_get_certid().

◆ NewOCSPReq

#define NewOCSPReq (   klass)    TypedData_Wrap_Struct((klass), &ossl_ocsp_request_type, 0)

Definition at line 15 of file ossl_ocsp.c.

Referenced by ossl_ocspreq_alloc().

◆ NewOCSPRes

#define NewOCSPRes (   klass)    TypedData_Wrap_Struct((klass), &ossl_ocsp_response_type, 0)

Definition at line 30 of file ossl_ocsp.c.

Referenced by ossl_ocspres_alloc(), and ossl_ocspres_s_create().

◆ NewOCSPSingleRes

#define NewOCSPSingleRes (   klass)    TypedData_Wrap_Struct((klass), &ossl_ocsp_singleresp_type, 0)

Definition at line 60 of file ossl_ocsp.c.

Referenced by ossl_ocspsres_alloc(), and ossl_ocspsres_new().

◆ SafeGetOCSPBasicRes

#define SafeGetOCSPBasicRes (   obj,
  res 
)
Value:
do { \
OSSL_Check_Kind((obj), cOCSPBasicRes); \
GetOCSPBasicRes((obj), (res)); \
} while (0)
VALUE cOCSPBasicRes
Definition: ossl_ocsp.c:94

Definition at line 55 of file ossl_ocsp.c.

Referenced by ossl_ocspbres_initialize_copy(), and ossl_ocspreq_check_nonce().

◆ SafeGetOCSPCertId

#define SafeGetOCSPCertId (   obj,
  cid 
)
Value:
do { \
OSSL_Check_Kind((obj), cOCSPCertId); \
GetOCSPCertId((obj), (cid)); \
} while (0)
VALUE cOCSPCertId
Definition: ossl_ocsp.c:96

Definition at line 85 of file ossl_ocsp.c.

Referenced by ossl_ocspbres_add_status(), ossl_ocspbres_find_response(), ossl_ocspcid_cmp(), ossl_ocspcid_cmp_issuer(), and ossl_ocspcid_initialize_copy().

◆ SafeGetOCSPReq

#define SafeGetOCSPReq (   obj,
  req 
)
Value:
do { \
OSSL_Check_Kind((obj), cOCSPReq); \
GetOCSPReq((obj), (req)); \
} while (0)
VALUE cOCSPReq
Definition: ossl_ocsp.c:92

Definition at line 25 of file ossl_ocsp.c.

Referenced by ossl_ocspbres_copy_nonce(), and ossl_ocspreq_initialize_copy().

◆ SafeGetOCSPRes

#define SafeGetOCSPRes (   obj,
  res 
)
Value:
do { \
OSSL_Check_Kind((obj), cOCSPRes); \
GetOCSPRes((obj), (res)); \
} while (0)
VALUE cOCSPRes
Definition: ossl_ocsp.c:93

Definition at line 40 of file ossl_ocsp.c.

Referenced by ossl_ocspres_initialize_copy().

◆ SafeGetOCSPSingleRes

#define SafeGetOCSPSingleRes (   obj,
  res 
)
Value:
do { \
OSSL_Check_Kind((obj), cOCSPSingleRes); \
GetOCSPSingleRes((obj), (res)); \
} while (0)
VALUE cOCSPSingleRes
Definition: ossl_ocsp.c:95

Definition at line 70 of file ossl_ocsp.c.

Referenced by ossl_ocspsres_initialize_copy().

◆ SetOCSPBasicRes

#define SetOCSPBasicRes (   obj,
  res 
)
Value:
do { \
if(!(res)) ossl_raise(rb_eRuntimeError, "Response wasn't initialized!"); \
RTYPEDDATA_DATA(obj) = (res); \
} while (0)
VALUE rb_eRuntimeError
Definition: error.c:761
void ossl_raise(VALUE exc, const char *fmt,...)
Definition: ossl.c:278

Definition at line 47 of file ossl_ocsp.c.

Referenced by ossl_ocspbres_alloc(), ossl_ocspbres_initialize(), ossl_ocspbres_initialize_copy(), and ossl_ocspres_get_basic().

◆ SetOCSPCertId

#define SetOCSPCertId (   obj,
  cid 
)
Value:
do { \
if(!(cid)) ossl_raise(rb_eRuntimeError, "Cert ID wasn't initialized!"); \
RTYPEDDATA_DATA(obj) = (cid); \
} while (0)
VALUE rb_eRuntimeError
Definition: error.c:761
void ossl_raise(VALUE exc, const char *fmt,...)
Definition: ossl.c:278

Definition at line 77 of file ossl_ocsp.c.

Referenced by ossl_ocspcertid_new(), ossl_ocspcid_alloc(), ossl_ocspcid_initialize(), ossl_ocspcid_initialize_copy(), and ossl_ocspreq_get_certid().

◆ SetOCSPReq

#define SetOCSPReq (   obj,
  req 
)
Value:
do { \
if(!(req)) ossl_raise(rb_eRuntimeError, "Request wasn't initialized!"); \
RTYPEDDATA_DATA(obj) = (req); \
} while (0)
VALUE rb_eRuntimeError
Definition: error.c:761
void ossl_raise(VALUE exc, const char *fmt,...)
Definition: ossl.c:278

Definition at line 17 of file ossl_ocsp.c.

Referenced by ossl_ocspreq_alloc(), ossl_ocspreq_initialize(), and ossl_ocspreq_initialize_copy().

◆ SetOCSPRes

#define SetOCSPRes (   obj,
  res 
)
Value:
do { \
if(!(res)) ossl_raise(rb_eRuntimeError, "Response wasn't initialized!"); \
RTYPEDDATA_DATA(obj) = (res); \
} while (0)
VALUE rb_eRuntimeError
Definition: error.c:761
void ossl_raise(VALUE exc, const char *fmt,...)
Definition: ossl.c:278

Definition at line 32 of file ossl_ocsp.c.

Referenced by ossl_ocspres_alloc(), ossl_ocspres_initialize(), ossl_ocspres_initialize_copy(), and ossl_ocspres_s_create().

◆ SetOCSPSingleRes

#define SetOCSPSingleRes (   obj,
  res 
)
Value:
do { \
if(!(res)) ossl_raise(rb_eRuntimeError, "SingleResponse wasn't initialized!"); \
RTYPEDDATA_DATA(obj) = (res); \
} while (0)
VALUE rb_eRuntimeError
Definition: error.c:761
void ossl_raise(VALUE exc, const char *fmt,...)
Definition: ossl.c:278

Definition at line 62 of file ossl_ocsp.c.

Referenced by ossl_ocspsres_alloc(), ossl_ocspsres_initialize(), ossl_ocspsres_initialize_copy(), and ossl_ocspsres_new().

Function Documentation

◆ add_status_convert_time()

static VALUE add_status_convert_time ( VALUE  obj)
static

◆ Init_ossl_ocsp()

void Init_ossl_ocsp ( void  )

Definition at line 1693 of file ossl_ocsp.c.

References cOCSPBasicRes, cOCSPCertId, cOCSPReq, cOCSPRes, cOCSPSingleRes, eOCSPError, eOSSLError, Init_ossl_ocsp(), INT2NUM, mOCSP, mOSSL, ossl_ocspbres_add_nonce(), ossl_ocspbres_add_status(), ossl_ocspbres_alloc(), ossl_ocspbres_copy_nonce(), ossl_ocspbres_find_response(), ossl_ocspbres_get_responses(), ossl_ocspbres_get_status(), ossl_ocspbres_initialize(), ossl_ocspbres_initialize_copy(), ossl_ocspbres_sign(), ossl_ocspbres_to_der(), ossl_ocspbres_verify(), ossl_ocspcid_alloc(), ossl_ocspcid_cmp(), ossl_ocspcid_cmp_issuer(), ossl_ocspcid_get_hash_algorithm(), ossl_ocspcid_get_issuer_key_hash(), ossl_ocspcid_get_issuer_name_hash(), ossl_ocspcid_get_serial(), ossl_ocspcid_initialize(), ossl_ocspcid_initialize_copy(), ossl_ocspcid_to_der(), ossl_ocspreq_add_certid(), ossl_ocspreq_add_nonce(), ossl_ocspreq_alloc(), ossl_ocspreq_check_nonce(), ossl_ocspreq_get_certid(), ossl_ocspreq_initialize(), ossl_ocspreq_initialize_copy(), ossl_ocspreq_sign(), ossl_ocspreq_to_der(), ossl_ocspreq_verify(), ossl_ocspres_alloc(), ossl_ocspres_get_basic(), ossl_ocspres_initialize(), ossl_ocspres_initialize_copy(), ossl_ocspres_s_create(), ossl_ocspres_status(), ossl_ocspres_status_string(), ossl_ocspres_to_der(), ossl_ocspsres_alloc(), ossl_ocspsres_check_validity(), ossl_ocspsres_get_cert_status(), ossl_ocspsres_get_certid(), ossl_ocspsres_get_extensions(), ossl_ocspsres_get_next_update(), ossl_ocspsres_get_revocation_reason(), ossl_ocspsres_get_revocation_time(), ossl_ocspsres_get_this_update(), ossl_ocspsres_initialize(), ossl_ocspsres_initialize_copy(), ossl_ocspsres_to_der(), rb_cObject, rb_define_alloc_func(), rb_define_class_under(), rb_define_const(), rb_define_copy_func, rb_define_method(), rb_define_module(), rb_define_module_under(), rb_define_singleton_method(), and rb_eStandardError.

Referenced by Init_openssl(), and Init_ossl_ocsp().

◆ ossl_ocsp_basicresp_free()

static void ossl_ocsp_basicresp_free ( void *  ptr)
static

Definition at line 127 of file ossl_ocsp.c.

◆ ossl_ocsp_certid_free()

static void ossl_ocsp_certid_free ( void *  ptr)
static

Definition at line 155 of file ossl_ocsp.c.

◆ ossl_ocsp_request_free()

static void ossl_ocsp_request_free ( void *  ptr)
static

Definition at line 99 of file ossl_ocsp.c.

◆ ossl_ocsp_response_free()

static void ossl_ocsp_response_free ( void *  ptr)
static

Definition at line 113 of file ossl_ocsp.c.

◆ ossl_ocsp_singleresp_free()

static void ossl_ocsp_singleresp_free ( void *  ptr)
static

Definition at line 141 of file ossl_ocsp.c.

◆ ossl_ocspbres_add_nonce()

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

◆ ossl_ocspbres_add_status()

static VALUE ossl_ocspbres_add_status ( VALUE  self,
VALUE  cid,
VALUE  status,
VALUE  reason,
VALUE  revtime,
VALUE  thisupd,
VALUE  nextupd,
VALUE  ext 
)
static

◆ ossl_ocspbres_alloc()

static VALUE ossl_ocspbres_alloc ( VALUE  klass)
static

Definition at line 660 of file ossl_ocsp.c.

References eOCSPError, NewOCSPBasicRes, NULL, ossl_raise(), and SetOCSPBasicRes.

Referenced by Init_ossl_ocsp().

◆ ossl_ocspbres_copy_nonce()

static VALUE ossl_ocspbres_copy_nonce ( VALUE  self,
VALUE  request 
)
static

Definition at line 732 of file ossl_ocsp.c.

References GetOCSPBasicRes, INT2NUM, and SafeGetOCSPReq.

Referenced by Init_ossl_ocsp().

◆ ossl_ocspbres_find_response()

static VALUE ossl_ocspbres_find_response ( VALUE  self,
VALUE  target 
)
static

Definition at line 984 of file ossl_ocsp.c.

References eOCSPError, GetOCSPBasicRes, id, ossl_ocspsres_new(), ossl_raise(), Qnil, and SafeGetOCSPCertId.

Referenced by Init_ossl_ocsp().

◆ ossl_ocspbres_get_responses()

static VALUE ossl_ocspbres_get_responses ( VALUE  self)
static

◆ ossl_ocspbres_get_status()

static VALUE ossl_ocspbres_get_status ( VALUE  self)
static

◆ ossl_ocspbres_initialize()

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

◆ ossl_ocspbres_initialize_copy()

static VALUE ossl_ocspbres_initialize_copy ( VALUE  self,
VALUE  other 
)
static

◆ ossl_ocspbres_sign()

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

◆ ossl_ocspbres_to_der()

static VALUE ossl_ocspbres_to_der ( VALUE  self)
static

Definition at line 1136 of file ossl_ocsp.c.

References eOCSPError, GetOCSPBasicRes, len, NULL, ossl_raise(), ossl_str_adjust, rb_str_new(), and RSTRING_PTR.

Referenced by Init_ossl_ocsp().

◆ ossl_ocspbres_verify()

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

◆ ossl_ocspcertid_new()

static VALUE ossl_ocspcertid_new ( OCSP_CERTID *  cid)
static

Definition at line 172 of file ossl_ocsp.c.

References cOCSPCertId, NewOCSPCertId, and SetOCSPCertId.

Referenced by ossl_ocspbres_get_status(), and ossl_ocspsres_get_certid().

◆ ossl_ocspcid_alloc()

static VALUE ossl_ocspcid_alloc ( VALUE  klass)
static

Definition at line 1451 of file ossl_ocsp.c.

References eOCSPError, id, NewOCSPCertId, NULL, ossl_raise(), and SetOCSPCertId.

Referenced by Init_ossl_ocsp().

◆ ossl_ocspcid_cmp()

static VALUE ossl_ocspcid_cmp ( VALUE  self,
VALUE  other 
)
static

Definition at line 1541 of file ossl_ocsp.c.

References GetOCSPCertId, id, Qfalse, Qtrue, result, and SafeGetOCSPCertId.

Referenced by Init_ossl_ocsp().

◆ ossl_ocspcid_cmp_issuer()

static VALUE ossl_ocspcid_cmp_issuer ( VALUE  self,
VALUE  other 
)
static

Definition at line 1562 of file ossl_ocsp.c.

References GetOCSPCertId, id, Qfalse, Qtrue, result, and SafeGetOCSPCertId.

Referenced by Init_ossl_ocsp().

◆ ossl_ocspcid_get_hash_algorithm()

static VALUE ossl_ocspcid_get_hash_algorithm ( VALUE  self)
static

Definition at line 1647 of file ossl_ocsp.c.

References eOCSPError, GetOCSPCertId, id, NULL, ossl_membio2str(), and ossl_raise().

Referenced by Init_ossl_ocsp().

◆ ossl_ocspcid_get_issuer_key_hash()

static VALUE ossl_ocspcid_get_issuer_key_hash ( VALUE  self)
static

Definition at line 1624 of file ossl_ocsp.c.

References GetOCSPCertId, id, NULL, ossl_bin2hex(), rb_str_new(), and RSTRING_PTR.

Referenced by Init_ossl_ocsp().

◆ ossl_ocspcid_get_issuer_name_hash()

static VALUE ossl_ocspcid_get_issuer_name_hash ( VALUE  self)
static

Definition at line 1601 of file ossl_ocsp.c.

References GetOCSPCertId, id, NULL, ossl_bin2hex(), rb_str_new(), and RSTRING_PTR.

Referenced by Init_ossl_ocsp().

◆ ossl_ocspcid_get_serial()

static VALUE ossl_ocspcid_get_serial ( VALUE  self)
static

Definition at line 1582 of file ossl_ocsp.c.

References asn1integer_to_num(), GetOCSPCertId, id, and NULL.

Referenced by Init_ossl_ocsp().

◆ ossl_ocspcid_initialize()

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

◆ ossl_ocspcid_initialize_copy()

static VALUE ossl_ocspcid_initialize_copy ( VALUE  self,
VALUE  other 
)
static

Definition at line 1465 of file ossl_ocsp.c.

References eOCSPError, GetOCSPCertId, ossl_raise(), rb_check_frozen, SafeGetOCSPCertId, and SetOCSPCertId.

Referenced by Init_ossl_ocsp().

◆ ossl_ocspcid_to_der()

static VALUE ossl_ocspcid_to_der ( VALUE  self)
static

Definition at line 1673 of file ossl_ocsp.c.

References eOCSPError, GetOCSPCertId, id, len, NULL, ossl_raise(), ossl_str_adjust, rb_str_new(), and RSTRING_PTR.

Referenced by Init_ossl_ocsp().

◆ ossl_ocspreq_add_certid()

static VALUE ossl_ocspreq_add_certid ( VALUE  self,
VALUE  certid 
)
static

Definition at line 321 of file ossl_ocsp.c.

References eOCSPError, GetOCSPCertId, GetOCSPReq, id, id_new, and ossl_raise().

Referenced by Init_ossl_ocsp().

◆ ossl_ocspreq_add_nonce()

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

◆ ossl_ocspreq_alloc()

static VALUE ossl_ocspreq_alloc ( VALUE  klass)
static

Definition at line 183 of file ossl_ocsp.c.

References eOCSPError, NewOCSPReq, NULL, ossl_raise(), and SetOCSPReq.

Referenced by Init_ossl_ocsp().

◆ ossl_ocspreq_check_nonce()

static VALUE ossl_ocspreq_check_nonce ( VALUE  self,
VALUE  basic_resp 
)
static

Definition at line 300 of file ossl_ocsp.c.

References GetOCSPReq, INT2NUM, and SafeGetOCSPBasicRes.

Referenced by Init_ossl_ocsp().

◆ ossl_ocspreq_get_certid()

static VALUE ossl_ocspreq_get_certid ( VALUE  self)
static

◆ ossl_ocspreq_initialize()

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

◆ ossl_ocspreq_initialize_copy()

static VALUE ossl_ocspreq_initialize_copy ( VALUE  self,
VALUE  other 
)
static

Definition at line 197 of file ossl_ocsp.c.

References eOCSPError, GetOCSPReq, ossl_raise(), rb_check_frozen, SafeGetOCSPReq, and SetOCSPReq.

Referenced by Init_ossl_ocsp().

◆ ossl_ocspreq_sign()

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

◆ ossl_ocspreq_to_der()

static VALUE ossl_ocspreq_to_der ( VALUE  self)
static

Definition at line 456 of file ossl_ocsp.c.

References eOCSPError, GetOCSPReq, len, NULL, ossl_raise(), ossl_str_adjust, rb_str_new(), and RSTRING_PTR.

Referenced by Init_ossl_ocsp().

◆ ossl_ocspreq_verify()

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

◆ ossl_ocspres_alloc()

static VALUE ossl_ocspres_alloc ( VALUE  klass)
static

Definition at line 504 of file ossl_ocsp.c.

References eOCSPError, NewOCSPRes, NULL, ossl_raise(), and SetOCSPRes.

Referenced by Init_ossl_ocsp().

◆ ossl_ocspres_get_basic()

static VALUE ossl_ocspres_get_basic ( VALUE  self)
static

Definition at line 614 of file ossl_ocsp.c.

References cOCSPBasicRes, GetOCSPRes, NewOCSPBasicRes, Qnil, and SetOCSPBasicRes.

Referenced by Init_ossl_ocsp().

◆ ossl_ocspres_initialize()

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

◆ ossl_ocspres_initialize_copy()

static VALUE ossl_ocspres_initialize_copy ( VALUE  self,
VALUE  other 
)
static

Definition at line 518 of file ossl_ocsp.c.

References eOCSPError, GetOCSPRes, ossl_raise(), rb_check_frozen, SafeGetOCSPRes, and SetOCSPRes.

Referenced by Init_ossl_ocsp().

◆ ossl_ocspres_s_create()

static VALUE ossl_ocspres_s_create ( VALUE  klass,
VALUE  status,
VALUE  basic_resp 
)
static

Definition at line 486 of file ossl_ocsp.c.

References eOCSPError, GetOCSPBasicRes, NewOCSPRes, NIL_P, NULL, NUM2INT, ossl_raise(), and SetOCSPRes.

Referenced by Init_ossl_ocsp().

◆ ossl_ocspres_status()

static VALUE ossl_ocspres_status ( VALUE  self)
static

Definition at line 576 of file ossl_ocsp.c.

References GetOCSPRes, and INT2NUM.

Referenced by Init_ossl_ocsp().

◆ ossl_ocspres_status_string()

static VALUE ossl_ocspres_status_string ( VALUE  self)
static

Definition at line 595 of file ossl_ocsp.c.

References GetOCSPRes, and rb_str_new2.

Referenced by Init_ossl_ocsp().

◆ ossl_ocspres_to_der()

static VALUE ossl_ocspres_to_der ( VALUE  self)
static

Definition at line 637 of file ossl_ocsp.c.

References eOCSPError, GetOCSPRes, len, NULL, ossl_raise(), ossl_str_adjust, rb_str_new(), and RSTRING_PTR.

Referenced by Init_ossl_ocsp().

◆ ossl_ocspsres_alloc()

static VALUE ossl_ocspsres_alloc ( VALUE  klass)
static

Definition at line 1170 of file ossl_ocsp.c.

References eOCSPError, NewOCSPSingleRes, NULL, ossl_raise(), and SetOCSPSingleRes.

Referenced by Init_ossl_ocsp().

◆ ossl_ocspsres_check_validity()

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

◆ ossl_ocspsres_get_cert_status()

static VALUE ossl_ocspsres_get_cert_status ( VALUE  self)
static

Definition at line 1304 of file ossl_ocsp.c.

References eOCSPError, GetOCSPSingleRes, INT2NUM, NULL, and ossl_raise().

Referenced by Init_ossl_ocsp().

◆ ossl_ocspsres_get_certid()

static VALUE ossl_ocspsres_get_certid ( VALUE  self)
static

Definition at line 1278 of file ossl_ocsp.c.

References GetOCSPSingleRes, id, OCSP_SINGLERESP_get0_id, and ossl_ocspcertid_new().

Referenced by Init_ossl_ocsp().

◆ ossl_ocspsres_get_extensions()

static VALUE ossl_ocspsres_get_extensions ( VALUE  self)
static

Definition at line 1401 of file ossl_ocsp.c.

References count, GetOCSPSingleRes, ossl_x509ext_new(), rb_ary_new2, and rb_ary_push().

Referenced by Init_ossl_ocsp().

◆ ossl_ocspsres_get_next_update()

static VALUE ossl_ocspsres_get_next_update ( VALUE  self)
static

Definition at line 1341 of file ossl_ocsp.c.

References asn1time_to_time(), eOCSPError, GetOCSPSingleRes, NULL, and ossl_raise().

Referenced by Init_ossl_ocsp().

◆ ossl_ocspsres_get_revocation_reason()

static VALUE ossl_ocspsres_get_revocation_reason ( VALUE  self)
static

Definition at line 1381 of file ossl_ocsp.c.

References eOCSPError, GetOCSPSingleRes, INT2NUM, NULL, and ossl_raise().

Referenced by Init_ossl_ocsp().

◆ ossl_ocspsres_get_revocation_time()

static VALUE ossl_ocspsres_get_revocation_time ( VALUE  self)
static

Definition at line 1360 of file ossl_ocsp.c.

References asn1time_to_time(), eOCSPError, GetOCSPSingleRes, NULL, and ossl_raise().

Referenced by Init_ossl_ocsp().

◆ ossl_ocspsres_get_this_update()

static VALUE ossl_ocspsres_get_this_update ( VALUE  self)
static

Definition at line 1322 of file ossl_ocsp.c.

References asn1time_to_time(), eOCSPError, GetOCSPSingleRes, NULL, and ossl_raise().

Referenced by Init_ossl_ocsp().

◆ ossl_ocspsres_initialize()

static VALUE ossl_ocspsres_initialize ( VALUE  self,
VALUE  arg 
)
static

◆ ossl_ocspsres_initialize_copy()

static VALUE ossl_ocspsres_initialize_copy ( VALUE  self,
VALUE  other 
)
static

◆ ossl_ocspsres_new()

static VALUE ossl_ocspsres_new ( OCSP_SINGLERESP *  sres)
static

◆ ossl_ocspsres_to_der()

static VALUE ossl_ocspsres_to_der ( VALUE  self)
static

Definition at line 1427 of file ossl_ocsp.c.

References eOCSPError, GetOCSPSingleRes, len, NULL, ossl_raise(), ossl_str_adjust, rb_str_new(), and RSTRING_PTR.

Referenced by Init_ossl_ocsp().

Variable Documentation

◆ cOCSPBasicRes

VALUE cOCSPBasicRes

Definition at line 94 of file ossl_ocsp.c.

Referenced by Init_ossl_ocsp(), and ossl_ocspres_get_basic().

◆ cOCSPCertId

VALUE cOCSPCertId

Definition at line 96 of file ossl_ocsp.c.

Referenced by Init_ossl_ocsp(), ossl_ocspcertid_new(), and ossl_ocspreq_get_certid().

◆ cOCSPReq

VALUE cOCSPReq

Definition at line 92 of file ossl_ocsp.c.

Referenced by Init_ossl_ocsp().

◆ cOCSPRes

VALUE cOCSPRes

Definition at line 93 of file ossl_ocsp.c.

Referenced by Init_ossl_ocsp().

◆ cOCSPSingleRes

VALUE cOCSPSingleRes

Definition at line 95 of file ossl_ocsp.c.

Referenced by Init_ossl_ocsp(), and ossl_ocspsres_new().

◆ eOCSPError

VALUE eOCSPError

◆ mOCSP

VALUE mOCSP

Definition at line 90 of file ossl_ocsp.c.

Referenced by Init_ossl_ocsp().

◆ ossl_ocsp_basicresp_type

const rb_data_type_t ossl_ocsp_basicresp_type
static
Initial value:
= {
"OpenSSL/OCSP/BASICRESP",
{
},
}
#define RUBY_TYPED_FREE_IMMEDIATELY
Definition: ruby.h:1145
static void ossl_ocsp_basicresp_free(void *ptr)
Definition: ossl_ocsp.c:127

Definition at line 132 of file ossl_ocsp.c.

◆ ossl_ocsp_certid_type

const rb_data_type_t ossl_ocsp_certid_type
static
Initial value:
= {
"OpenSSL/OCSP/CERTID",
{
},
}
#define RUBY_TYPED_FREE_IMMEDIATELY
Definition: ruby.h:1145
static void ossl_ocsp_certid_free(void *ptr)
Definition: ossl_ocsp.c:155

Definition at line 160 of file ossl_ocsp.c.

◆ ossl_ocsp_request_type

const rb_data_type_t ossl_ocsp_request_type
static
Initial value:
= {
"OpenSSL/OCSP/REQUEST",
{
},
}
#define RUBY_TYPED_FREE_IMMEDIATELY
Definition: ruby.h:1145
static void ossl_ocsp_request_free(void *ptr)
Definition: ossl_ocsp.c:99

Definition at line 104 of file ossl_ocsp.c.

◆ ossl_ocsp_response_type

const rb_data_type_t ossl_ocsp_response_type
static
Initial value:
= {
"OpenSSL/OCSP/RESPONSE",
{
},
}
#define RUBY_TYPED_FREE_IMMEDIATELY
Definition: ruby.h:1145
static void ossl_ocsp_response_free(void *ptr)
Definition: ossl_ocsp.c:113

Definition at line 118 of file ossl_ocsp.c.

◆ ossl_ocsp_singleresp_type

const rb_data_type_t ossl_ocsp_singleresp_type
static
Initial value:
= {
"OpenSSL/OCSP/SINGLERESP",
{
},
}
#define RUBY_TYPED_FREE_IMMEDIATELY
Definition: ruby.h:1145
static void ossl_ocsp_singleresp_free(void *ptr)
Definition: ossl_ocsp.c:141

Definition at line 146 of file ossl_ocsp.c.