Ruby  3.1.0dev(2021-09-10revisionb76ad15ed0da636161de0243c547ee1e6fc95681)
Macros | Functions
ossl_ts.c File Reference

(b76ad15ed0da636161de0243c547ee1e6fc95681)

#include "ossl.h"
Include dependency graph for ossl_ts.c:

Go to the source code of this file.

Macros

#define NewTSRequest(klass)   TypedData_Wrap_Struct((klass), &ossl_ts_req_type, 0)
 
#define SetTSRequest(obj, req)
 
#define GetTSRequest(obj, req)
 
#define NewTSResponse(klass)   TypedData_Wrap_Struct((klass), &ossl_ts_resp_type, 0)
 
#define SetTSResponse(obj, resp)
 
#define GetTSResponse(obj, resp)
 
#define NewTSTokenInfo(klass)   TypedData_Wrap_Struct((klass), &ossl_ts_token_info_type, 0)
 
#define SetTSTokenInfo(obj, info)
 
#define GetTSTokenInfo(obj, info)
 
#define ossl_tsfac_get_default_policy_id(o)   rb_attr_get((o),rb_intern("@default_policy_id"))
 
#define ossl_tsfac_get_serial_number(o)   rb_attr_get((o),rb_intern("@serial_number"))
 
#define ossl_tsfac_get_gen_time(o)   rb_attr_get((o),rb_intern("@gen_time"))
 
#define ossl_tsfac_get_additional_certs(o)   rb_attr_get((o),rb_intern("@additional_certs"))
 
#define ossl_tsfac_get_allowed_digests(o)   rb_attr_get((o),rb_intern("@allowed_digests"))
 

Functions

void Init_ossl_ts (void)
 

Macro Definition Documentation

◆ GetTSRequest

#define GetTSRequest (   obj,
  req 
)
Value:
do { \
TypedData_Get_Struct((obj), TS_REQ, &ossl_ts_req_type, (req)); \
if (!(req)) { \
ossl_raise(rb_eRuntimeError, "TS_REQ wasn't initialized."); \
} \
} while (0)

Definition at line 22 of file ossl_ts.c.

◆ GetTSResponse

#define GetTSResponse (   obj,
  resp 
)
Value:
do { \
TypedData_Get_Struct((obj), TS_RESP, &ossl_ts_resp_type, (resp)); \
if (!(resp)) { \
ossl_raise(rb_eRuntimeError, "TS_RESP wasn't initialized."); \
} \
} while (0)

Definition at line 37 of file ossl_ts.c.

◆ GetTSTokenInfo

#define GetTSTokenInfo (   obj,
  info 
)
Value:
do { \
TypedData_Get_Struct((obj), TS_TST_INFO, &ossl_ts_token_info_type, (info)); \
if (!(info)) { \
ossl_raise(rb_eRuntimeError, "TS_TST_INFO wasn't initialized."); \
} \
} while (0)

Definition at line 52 of file ossl_ts.c.

◆ NewTSRequest

#define NewTSRequest (   klass)    TypedData_Wrap_Struct((klass), &ossl_ts_req_type, 0)

Definition at line 14 of file ossl_ts.c.

◆ NewTSResponse

#define NewTSResponse (   klass)    TypedData_Wrap_Struct((klass), &ossl_ts_resp_type, 0)

Definition at line 29 of file ossl_ts.c.

◆ NewTSTokenInfo

#define NewTSTokenInfo (   klass)    TypedData_Wrap_Struct((klass), &ossl_ts_token_info_type, 0)

Definition at line 44 of file ossl_ts.c.

◆ ossl_tsfac_get_additional_certs

#define ossl_tsfac_get_additional_certs (   o)    rb_attr_get((o),rb_intern("@additional_certs"))

Definition at line 62 of file ossl_ts.c.

◆ ossl_tsfac_get_allowed_digests

#define ossl_tsfac_get_allowed_digests (   o)    rb_attr_get((o),rb_intern("@allowed_digests"))

Definition at line 63 of file ossl_ts.c.

◆ ossl_tsfac_get_default_policy_id

#define ossl_tsfac_get_default_policy_id (   o)    rb_attr_get((o),rb_intern("@default_policy_id"))

Definition at line 59 of file ossl_ts.c.

◆ ossl_tsfac_get_gen_time

#define ossl_tsfac_get_gen_time (   o)    rb_attr_get((o),rb_intern("@gen_time"))

Definition at line 61 of file ossl_ts.c.

◆ ossl_tsfac_get_serial_number

#define ossl_tsfac_get_serial_number (   o)    rb_attr_get((o),rb_intern("@serial_number"))

Definition at line 60 of file ossl_ts.c.

◆ SetTSRequest

#define SetTSRequest (   obj,
  req 
)
Value:
do { \
if (!(req)) { \
ossl_raise(rb_eRuntimeError, "TS_REQ wasn't initialized."); \
} \
RTYPEDDATA_DATA(obj) = (req); \
} while (0)

Definition at line 16 of file ossl_ts.c.

◆ SetTSResponse

#define SetTSResponse (   obj,
  resp 
)
Value:
do { \
if (!(resp)) { \
ossl_raise(rb_eRuntimeError, "TS_RESP wasn't initialized."); \
} \
RTYPEDDATA_DATA(obj) = (resp); \
} while (0)

Definition at line 31 of file ossl_ts.c.

◆ SetTSTokenInfo

#define SetTSTokenInfo (   obj,
  info 
)
Value:
do { \
if (!(info)) { \
ossl_raise(rb_eRuntimeError, "TS_TST_INFO wasn't initialized."); \
} \
RTYPEDDATA_DATA(obj) = (info); \
} while (0)

Definition at line 46 of file ossl_ts.c.

Function Documentation

◆ Init_ossl_ts()

void Init_ossl_ts ( void  )

Definition at line 1236 of file ossl_ts.c.

References mOSSL, and rb_define_module().

rb_eRuntimeError
VALUE rb_eRuntimeError
Definition: error.c:1091