Ruby: ext/openssl/ossl_ts.c File Reference

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

Macros | Functions
ossl_ts.c File Reference
`#include "ossl.h"`

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)
rb_eRuntimeError
VALUE rb_eRuntimeError
Definition: error.c:1055

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 1249 of file ossl_ts.c.

References eOSSLError, ID2SYM, INT2NUM, mOSSL, rb_attr(), rb_cObject, rb_define_alloc_func(), rb_define_class_under(), rb_define_const(), rb_define_method, rb_define_module(), and rb_define_module_under().

Referenced by Init_openssl().