14#define NewTSRequest(klass) \
15 TypedData_Wrap_Struct((klass), &ossl_ts_req_type, 0)
16#define SetTSRequest(obj, req) do { \
18 ossl_raise(rb_eRuntimeError, "TS_REQ wasn't initialized."); \
20 RTYPEDDATA_DATA(obj) = (req); \
22#define GetTSRequest(obj, req) do { \
23 TypedData_Get_Struct((obj), TS_REQ, &ossl_ts_req_type, (req)); \
25 ossl_raise(rb_eRuntimeError, "TS_REQ wasn't initialized."); \
29#define NewTSResponse(klass) \
30 TypedData_Wrap_Struct((klass), &ossl_ts_resp_type, 0)
31#define SetTSResponse(obj, resp) do { \
33 ossl_raise(rb_eRuntimeError, "TS_RESP wasn't initialized."); \
35 RTYPEDDATA_DATA(obj) = (resp); \
37#define GetTSResponse(obj, resp) do { \
38 TypedData_Get_Struct((obj), TS_RESP, &ossl_ts_resp_type, (resp)); \
40 ossl_raise(rb_eRuntimeError, "TS_RESP wasn't initialized."); \
44#define NewTSTokenInfo(klass) \
45 TypedData_Wrap_Struct((klass), &ossl_ts_token_info_type, 0)
46#define SetTSTokenInfo(obj, info) do { \
48 ossl_raise(rb_eRuntimeError, "TS_TST_INFO wasn't initialized."); \
50 RTYPEDDATA_DATA(obj) = (info); \
52#define GetTSTokenInfo(obj, info) do { \
53 TypedData_Get_Struct((obj), TS_TST_INFO, &ossl_ts_token_info_type, (info)); \
55 ossl_raise(rb_eRuntimeError, "TS_TST_INFO wasn't initialized."); \
59#define ossl_tsfac_get_default_policy_id(o) rb_attr_get((o),rb_intern("@default_policy_id"))
60#define ossl_tsfac_get_serial_number(o) rb_attr_get((o),rb_intern("@serial_number"))
61#define ossl_tsfac_get_gen_time(o) rb_attr_get((o),rb_intern("@gen_time"))
62#define ossl_tsfac_get_additional_certs(o) rb_attr_get((o),rb_intern("@additional_certs"))
63#define ossl_tsfac_get_allowed_digests(o) rb_attr_get((o),rb_intern("@allowed_digests"))
65static VALUE mTimestamp;
66static VALUE eTimestampError;
67static VALUE cTimestampRequest;
68static VALUE cTimestampResponse;
69static VALUE cTimestampTokenInfo;
70static VALUE cTimestampFactory;
71static VALUE sBAD_ALG, sBAD_REQUEST, sBAD_DATA_FORMAT, sTIME_NOT_AVAILABLE;
72static VALUE sUNACCEPTED_POLICY, sUNACCEPTED_EXTENSION, sADD_INFO_NOT_AVAILABLE;
73static VALUE sSYSTEM_FAILURE;
76ossl_ts_req_free(
void *
ptr)
82 "OpenSSL/Timestamp/Request",
90ossl_ts_resp_free(
void *
ptr)
96 "OpenSSL/Timestamp/Response",
104ossl_ts_token_info_free(
void *
ptr)
106 TS_TST_INFO_free(
ptr);
110 "OpenSSL/Timestamp/TokenInfo",
112 0, ossl_ts_token_info_free,
118asn1_to_der(
void *
template,
int (*i2d)(
void *
template,
unsigned char **pp))
124 if((
len = i2d(
template,
NULL)) <= 0)
125 ossl_raise(eTimestampError,
"Error when encoding to DER");
128 if(i2d(
template, &p) <= 0)
129 ossl_raise(eTimestampError,
"Error when encoding to DER");
136obj_to_asn1obj(
VALUE obj)
142 if(!a1obj) a1obj = OBJ_txt2obj(
RSTRING_PTR(obj), 1);
149get_asn1obj(ASN1_OBJECT *obj)
154 if ((
nid = OBJ_obj2nid(obj)) != NID_undef)
157 if (!(
out = BIO_new(BIO_s_mem())))
159 i2a_ASN1_OBJECT(
out, obj);
167ossl_ts_req_alloc(
VALUE klass)
173 if (!(req = TS_REQ_new()))
178 TS_REQ_set_version(req, 1);
179 TS_REQ_set_cert_req(req, 1);
206 ts_req = d2i_TS_REQ_bio(
in, &ts_req);
210 ossl_raise(eTimestampError,
"Error when decoding the timestamp request");
225ossl_ts_req_get_algorithm(
VALUE self)
232 mi = TS_REQ_get_msg_imprint(req);
233 algor = TS_MSG_IMPRINT_get_algo(mi);
234 return get_asn1obj(algor->algorithm);
248ossl_ts_req_set_algorithm(
VALUE self,
VALUE algo)
256 obj = obj_to_asn1obj(algo);
257 mi = TS_REQ_get_msg_imprint(req);
258 algor = TS_MSG_IMPRINT_get_algo(mi);
259 if (!X509_ALGOR_set0(algor, obj, V_ASN1_NULL,
NULL)) {
260 ASN1_OBJECT_free(obj);
261 ossl_raise(eTimestampError,
"X509_ALGOR_set0");
274ossl_ts_req_get_msg_imprint(
VALUE self)
278 ASN1_OCTET_STRING *hashed_msg;
282 mi = TS_REQ_get_msg_imprint(req);
283 hashed_msg = TS_MSG_IMPRINT_get_msg(mi);
285 ret =
rb_str_new((
const char *)hashed_msg->data, hashed_msg->length);
297ossl_ts_req_set_msg_imprint(
VALUE self,
VALUE hash)
304 mi = TS_REQ_get_msg_imprint(req);
305 if (!TS_MSG_IMPRINT_set_msg(mi, (
unsigned char *)
RSTRING_PTR(hash), RSTRING_LENINT(hash)))
306 ossl_raise(eTimestampError,
"TS_MSG_IMPRINT_set_msg");
318ossl_ts_req_get_version(
VALUE self)
323 return LONG2NUM(TS_REQ_get_version(req));
334ossl_ts_req_set_version(
VALUE self,
VALUE version)
340 ossl_raise(eTimestampError,
"version must be >= 0!");
342 if (!TS_REQ_set_version(req, ver))
343 ossl_raise(eTimestampError,
"TS_REQ_set_version");
356ossl_ts_req_get_policy_id(
VALUE self)
361 if (!TS_REQ_get_policy_id(req))
363 return get_asn1obj(TS_REQ_get_policy_id(req));
379ossl_ts_req_set_policy_id(
VALUE self,
VALUE oid)
386 obj = obj_to_asn1obj(oid);
387 ok = TS_REQ_set_policy_id(req, obj);
388 ASN1_OBJECT_free(obj);
390 ossl_raise(eTimestampError,
"TS_REQ_set_policy_id");
403ossl_ts_req_get_nonce(
VALUE self)
406 const ASN1_INTEGER * nonce;
409 if (!(nonce = TS_REQ_get_nonce(req)))
431 ok = TS_REQ_set_nonce(req, nonce);
432 ASN1_INTEGER_free(nonce);
446ossl_ts_req_get_cert_requested(
VALUE self)
462ossl_ts_req_set_cert_requested(
VALUE self,
VALUE requested)
467 TS_REQ_set_cert_req(req,
RTEST(requested));
479ossl_ts_req_to_der(
VALUE self)
484 ASN1_OCTET_STRING *hashed_msg;
487 mi = TS_REQ_get_msg_imprint(req);
489 algo = TS_MSG_IMPRINT_get_algo(mi);
490 if (OBJ_obj2nid(algo->algorithm) == NID_undef)
491 ossl_raise(eTimestampError,
"Message imprint missing algorithm");
493 hashed_msg = TS_MSG_IMPRINT_get_msg(mi);
494 if (!hashed_msg->length)
495 ossl_raise(eTimestampError,
"Message imprint missing hashed message");
497 return asn1_to_der((
void *)req, (
int (*)(
void *,
unsigned char **))i2d_TS_REQ);
501ossl_ts_resp_alloc(
VALUE klass)
507 if (!(resp = TS_RESP_new()))
532 ts_resp = d2i_TS_RESP_bio(
in, &ts_resp);
536 ossl_raise(eTimestampError,
"Error when decoding the timestamp response");
552ossl_ts_resp_get_status(
VALUE self)
556 const ASN1_INTEGER *st;
559 si = TS_RESP_get_status_info(resp);
591ossl_ts_resp_get_failure_info(
VALUE self)
598 #if defined(HAVE_TS_STATUS_INFO_GET0_FAILURE_INFO)
599 const ASN1_BIT_STRING *fi;
605 si = TS_RESP_get_status_info(resp);
609 if (ASN1_BIT_STRING_get_bit(fi, TS_INFO_BAD_ALG))
611 if (ASN1_BIT_STRING_get_bit(fi, TS_INFO_BAD_REQUEST))
613 if (ASN1_BIT_STRING_get_bit(fi, TS_INFO_BAD_DATA_FORMAT))
614 return sBAD_DATA_FORMAT;
615 if (ASN1_BIT_STRING_get_bit(fi, TS_INFO_TIME_NOT_AVAILABLE))
616 return sTIME_NOT_AVAILABLE;
617 if (ASN1_BIT_STRING_get_bit(fi, TS_INFO_UNACCEPTED_POLICY))
618 return sUNACCEPTED_POLICY;
619 if (ASN1_BIT_STRING_get_bit(fi, TS_INFO_UNACCEPTED_EXTENSION))
620 return sUNACCEPTED_EXTENSION;
621 if (ASN1_BIT_STRING_get_bit(fi, TS_INFO_ADD_INFO_NOT_AVAILABLE))
622 return sADD_INFO_NOT_AVAILABLE;
623 if (ASN1_BIT_STRING_get_bit(fi, TS_INFO_SYSTEM_FAILURE))
624 return sSYSTEM_FAILURE;
626 ossl_raise(eTimestampError,
"Unrecognized failure info.");
637ossl_ts_resp_get_status_text(
VALUE self)
641 const STACK_OF(ASN1_UTF8STRING) *text;
642 ASN1_UTF8STRING *current;
647 si = TS_RESP_get_status_info(resp);
649 for (i = 0; i < sk_ASN1_UTF8STRING_num(text); i++) {
650 current = sk_ASN1_UTF8STRING_value(text, i);
666ossl_ts_resp_get_token(
VALUE self)
673 if (!(p7 = TS_RESP_get_token(resp)))
678 if (!(copy = PKCS7_dup(p7)))
693ossl_ts_resp_get_token_info(
VALUE self)
696 TS_TST_INFO *info, *copy;
700 if (!(info = TS_RESP_get_tst_info(resp)))
705 if (!(copy = TS_TST_INFO_dup(info)))
722ossl_ts_resp_get_tsa_certificate(
VALUE self)
726 PKCS7_SIGNER_INFO *ts_info;
730 if (!(p7 = TS_RESP_get_token(resp)))
732 ts_info = sk_PKCS7_SIGNER_INFO_value(p7->d.sign->signer_info, 0);
733 cert = PKCS7_cert_from_signer_info(p7, ts_info);
746ossl_ts_resp_to_der(
VALUE self)
751 return asn1_to_der((
void *)resp, (
int (*)(
void *,
unsigned char **))i2d_TS_RESP);
777 VALUE ts_req, store, intermediates;
793 if (!(ctx = TS_REQ_to_TS_VERIFY_CTX(req,
NULL))) {
794 ossl_raise(eTimestampError,
"Error when creating the verification context.");
797 if (!
NIL_P(intermediates)) {
798 x509inter = ossl_protect_x509_ary2sk(intermediates, &status);
800 TS_VERIFY_CTX_free(ctx);
803 }
else if (!(x509inter = sk_X509_new_null())) {
804 TS_VERIFY_CTX_free(ctx);
805 ossl_raise(eTimestampError,
"sk_X509_new_null");
808 if (!(p7 = TS_RESP_get_token(resp))) {
809 TS_VERIFY_CTX_free(ctx);
810 sk_X509_pop_free(x509inter, X509_free);
811 ossl_raise(eTimestampError,
"TS_RESP_get_token");
813 for (i=0; i < sk_X509_num(p7->d.sign->cert); i++) {
814 cert = sk_X509_value(p7->d.sign->cert, i);
815 if (!sk_X509_push(x509inter, cert)) {
816 sk_X509_pop_free(x509inter, X509_free);
817 TS_VERIFY_CTX_free(ctx);
827 ok = TS_RESP_verify_response(ctx, resp);
836 TS_VERIFY_CTX_free(ctx);
839 ossl_raise(eTimestampError,
"TS_RESP_verify_response");
845ossl_ts_token_info_alloc(
VALUE klass)
851 if (!(info = TS_TST_INFO_new()))
869ossl_ts_token_info_initialize(
VALUE self,
VALUE der)
876 info = d2i_TS_TST_INFO_bio(
in, &info);
880 ossl_raise(eTimestampError,
"Error when decoding the timestamp token info");
896ossl_ts_token_info_get_version(
VALUE self)
901 return LONG2NUM(TS_TST_INFO_get_version(info));
917ossl_ts_token_info_get_policy_id(
VALUE self)
922 return get_asn1obj(TS_TST_INFO_get_policy_id(info));
939ossl_ts_token_info_get_algorithm(
VALUE self)
946 mi = TS_TST_INFO_get_msg_imprint(info);
947 algo = TS_MSG_IMPRINT_get_algo(mi);
948 return get_asn1obj(algo->algorithm);
964ossl_ts_token_info_get_msg_imprint(
VALUE self)
968 ASN1_OCTET_STRING *hashed_msg;
972 mi = TS_TST_INFO_get_msg_imprint(info);
973 hashed_msg = TS_MSG_IMPRINT_get_msg(mi);
974 ret =
rb_str_new((
const char *)hashed_msg->data, hashed_msg->length);
988ossl_ts_token_info_get_serial_number(
VALUE self)
1004ossl_ts_token_info_get_gen_time(
VALUE self)
1030ossl_ts_token_info_get_ordering(
VALUE self)
1035 return TS_TST_INFO_get_ordering(info) ?
Qtrue :
Qfalse;
1046ossl_ts_token_info_get_nonce(
VALUE self)
1049 const ASN1_INTEGER *nonce;
1052 if (!(nonce = TS_TST_INFO_get_nonce(info)))
1065ossl_ts_token_info_to_der(
VALUE self)
1070 return asn1_to_der((
void *)info, (
int (*)(
void *,
unsigned char **))i2d_TS_TST_INFO);
1073static ASN1_INTEGER *
1074ossl_tsfac_serial_cb(
struct TS_resp_ctx *ctx,
void *data)
1076 ASN1_INTEGER **snptr = (ASN1_INTEGER **)data;
1077 ASN1_INTEGER *sn = *snptr;
1083#if !defined(LIBRESSL_VERSION_NUMBER)
1084ossl_tsfac_time_cb(
struct TS_resp_ctx *ctx,
void *data,
long *sec,
long *usec)
1086ossl_tsfac_time_cb(
struct TS_resp_ctx *ctx,
void *data, time_t *sec,
long *usec)
1089 *sec = *((
long *)data);
1121 VALUE serial_number, def_policy_id, gen_time, additional_certs, allowed_digests;
1128 TS_RESP *response =
NULL;
1129 TS_RESP_CTX *ctx =
NULL;
1131 ASN1_INTEGER *asn1_serial =
NULL;
1132 ASN1_OBJECT *def_policy_id_obj =
NULL;
1134 const char * err_msg =
NULL;
1144 err_msg =
"@gen_time must be a Time.";
1150 if (
NIL_P(serial_number)) {
1151 err_msg =
"@serial_number must be set.";
1157 if (
NIL_P(def_policy_id) && !TS_REQ_get_policy_id(req)) {
1158 err_msg =
"No policy id in the request and no default policy set";
1161 if (!
NIL_P(def_policy_id) && !TS_REQ_get_policy_id(req)) {
1167 if (!(ctx = TS_RESP_CTX_new())) {
1168 err_msg =
"Memory allocation failed.";
1172 TS_RESP_CTX_set_serial_cb(ctx, ossl_tsfac_serial_cb, &asn1_serial);
1173 if (!TS_RESP_CTX_set_signer_cert(ctx, tsa_cert)) {
1174 err_msg =
"Certificate does not contain the timestamping extension";
1180 inter_certs = ossl_protect_x509_ary2sk(additional_certs, &status);
1185 TS_RESP_CTX_set_certs(ctx, inter_certs);
1186 sk_X509_pop_free(inter_certs, X509_free);
1189 TS_RESP_CTX_set_signer_key(ctx, sign_key);
1190 if (!
NIL_P(def_policy_id) && !TS_REQ_get_policy_id(req))
1191 TS_RESP_CTX_set_def_policy(ctx, def_policy_id_obj);
1192 if (TS_REQ_get_policy_id(req))
1193 TS_RESP_CTX_set_def_policy(ctx, TS_REQ_get_policy_id(req));
1202 for (i = 0; i <
RARRAY_LEN(allowed_digests); i++) {
1207 TS_RESP_CTX_add_md(ctx, md);
1219 response = TS_RESP_create_response(ctx, req_bio);
1223 err_msg =
"Error during response generation";
1235 ASN1_INTEGER_free(asn1_serial);
1236 ASN1_OBJECT_free(def_policy_id_obj);
1237 TS_RESP_CTX_free(ctx);
1260 sBAD_ALG =
ID2SYM(rb_intern_const(
"BAD_ALG"));
1266 sBAD_REQUEST =
ID2SYM(rb_intern_const(
"BAD_REQUEST"));
1271 sBAD_DATA_FORMAT =
ID2SYM(rb_intern_const(
"BAD_DATA_FORMAT"));
1273 sTIME_NOT_AVAILABLE =
ID2SYM(rb_intern_const(
"TIME_NOT_AVAILABLE"));
1274 sUNACCEPTED_POLICY =
ID2SYM(rb_intern_const(
"UNACCEPTED_POLICY"));
1275 sUNACCEPTED_EXTENSION =
ID2SYM(rb_intern_const(
"UNACCEPTED_EXTENSION"));
1276 sADD_INFO_NOT_AVAILABLE =
ID2SYM(rb_intern_const(
"ADD_INFO_NOT_AVAILABLE"));
1277 sSYSTEM_FAILURE =
ID2SYM(rb_intern_const(
"SYSTEM_FAILURE"));
1336 rb_define_method(cTimestampResponse,
"initialize", ossl_ts_resp_initialize, 1);
1337 rb_define_method(cTimestampResponse,
"status", ossl_ts_resp_get_status, 0);
1338 rb_define_method(cTimestampResponse,
"failure_info", ossl_ts_resp_get_failure_info, 0);
1339 rb_define_method(cTimestampResponse,
"status_text", ossl_ts_resp_get_status_text, 0);
1341 rb_define_method(cTimestampResponse,
"token_info", ossl_ts_resp_get_token_info, 0);
1342 rb_define_method(cTimestampResponse,
"tsa_certificate", ossl_ts_resp_get_tsa_certificate, 0);
1352 rb_define_method(cTimestampTokenInfo,
"initialize", ossl_ts_token_info_initialize, 1);
1353 rb_define_method(cTimestampTokenInfo,
"version", ossl_ts_token_info_get_version, 0);
1354 rb_define_method(cTimestampTokenInfo,
"policy_id", ossl_ts_token_info_get_policy_id, 0);
1355 rb_define_method(cTimestampTokenInfo,
"algorithm", ossl_ts_token_info_get_algorithm, 0);
1356 rb_define_method(cTimestampTokenInfo,
"message_imprint", ossl_ts_token_info_get_msg_imprint, 0);
1357 rb_define_method(cTimestampTokenInfo,
"serial_number", ossl_ts_token_info_get_serial_number, 0);
1358 rb_define_method(cTimestampTokenInfo,
"gen_time", ossl_ts_token_info_get_gen_time, 0);
1359 rb_define_method(cTimestampTokenInfo,
"ordering", ossl_ts_token_info_get_ordering, 0);
1360 rb_define_method(cTimestampTokenInfo,
"nonce", ossl_ts_token_info_get_nonce, 0);
1361 rb_define_method(cTimestampTokenInfo,
"to_der", ossl_ts_token_info_to_der, 0);
1373 rb_define_method(cTimestampRequest,
"initialize", ossl_ts_req_initialize, -1);
1374 rb_define_method(cTimestampRequest,
"version=", ossl_ts_req_set_version, 1);
1375 rb_define_method(cTimestampRequest,
"version", ossl_ts_req_get_version, 0);
1376 rb_define_method(cTimestampRequest,
"algorithm=", ossl_ts_req_set_algorithm, 1);
1377 rb_define_method(cTimestampRequest,
"algorithm", ossl_ts_req_get_algorithm, 0);
1378 rb_define_method(cTimestampRequest,
"message_imprint=", ossl_ts_req_set_msg_imprint, 1);
1379 rb_define_method(cTimestampRequest,
"message_imprint", ossl_ts_req_get_msg_imprint, 0);
1380 rb_define_method(cTimestampRequest,
"policy_id=", ossl_ts_req_set_policy_id, 1);
1381 rb_define_method(cTimestampRequest,
"policy_id", ossl_ts_req_get_policy_id, 0);
1384 rb_define_method(cTimestampRequest,
"cert_requested=", ossl_ts_req_set_cert_requested, 1);
1385 rb_define_method(cTimestampRequest,
"cert_requested?", ossl_ts_req_get_cert_requested, 0);
1414 rb_define_const(cTimestampResponse,
"REVOCATION_NOTIFICATION",
INT2NUM(TS_STATUS_REVOCATION_NOTIFICATION));
1516 rb_attr(cTimestampFactory, rb_intern_const(
"allowed_digests"), 1, 1, 0);
1517 rb_attr(cTimestampFactory, rb_intern_const(
"default_policy_id"), 1, 1, 0);
1518 rb_attr(cTimestampFactory, rb_intern_const(
"serial_number"), 1, 1, 0);
1519 rb_attr(cTimestampFactory, rb_intern_const(
"gen_time"), 1, 1, 0);
1520 rb_attr(cTimestampFactory, rb_intern_const(
"additional_certs"), 1, 1, 0);
1521 rb_define_method(cTimestampFactory,
"create_timestamp", ossl_tsfac_create_ts, 3);
VALUE rb_ary_push(VALUE ary, VALUE item)
VALUE rb_ary_entry(VALUE ary, long offset)
#define rb_define_method(klass, mid, func, arity)
Defines klass#mid.
char str[HTML_ESCAPE_MAX_LEN+1]
#define RSTRING_PTR(string)
VALUE rb_define_class_under(VALUE outer, const char *name, VALUE super)
Defines a class under the namespace of outer.
VALUE rb_define_module(const char *name)
VALUE rb_define_module_under(VALUE outer, const char *name)
int rb_scan_args(int argc, const VALUE *argv, const char *fmt,...)
VALUE rb_protect(VALUE(*proc)(VALUE), VALUE data, int *pstate)
Protects a function call from potential global escapes from the function.
void rb_jump_tag(int tag)
Continues the exception caught by rb_protect() and rb_eval_string_protect().
VALUE rb_cObject
Object class.
VALUE rb_obj_is_instance_of(VALUE, VALUE)
Determines if obj is an instance of c.
VALUE rb_obj_is_kind_of(VALUE, VALUE)
Determines if obj is a kind of c.
unsigned in(void *in_desc, z_const unsigned char **buf)
VALUE rb_funcall(VALUE, ID, int,...)
Calls a method.
#define rb_str_new(str, len)
void rb_str_set_len(VALUE, long)
void rb_attr(VALUE, ID, int, int, int)
void rb_define_alloc_func(VALUE, rb_alloc_func_t)
ID rb_intern(const char *)
void rb_define_const(VALUE, const char *, VALUE)
#define TS_RESP_CTX_set_time_cb(ctx, callback, dta)
#define TS_VERIFY_CTX_set_store(ctx, str)
#define TS_VERIFY_CTS_set_certs(ctx, crts)
#define TS_STATUS_INFO_get0_failure_info(a)
#define TS_STATUS_INFO_get0_text(a)
#define TS_VERIFY_CTX_add_flags(ctx, f)
#define TS_STATUS_INFO_get0_status(a)
VALUE ossl_to_der(VALUE obj)
VALUE ossl_to_der_if_possible(VALUE obj)
void ossl_raise(VALUE exc, const char *fmt,...)
void ossl_clear_error(void)
STACK_OF(X509) *ossl_x509_ary2sk(VALUE)
VALUE asn1integer_to_num(const ASN1_INTEGER *ai)
VALUE asn1time_to_time(const ASN1_TIME *time)
ASN1_INTEGER * num_to_asn1integer(VALUE obj, ASN1_INTEGER *ai)
VALUE asn1str_to_str(const ASN1_STRING *str)
BIO * ossl_obj2bio(volatile VALUE *pobj)
VALUE ossl_membio2str(BIO *bio)
const EVP_MD * ossl_evp_get_digestbyname(VALUE obj)
#define SetPKCS7(obj, pkcs7)
EVP_PKEY * GetPrivPKeyPtr(VALUE obj)
#define SetTSTokenInfo(obj, info)
#define SetTSRequest(obj, req)
#define NewTSTokenInfo(klass)
#define GetTSRequest(obj, req)
#define ossl_tsfac_get_additional_certs(o)
#define GetTSTokenInfo(obj, info)
#define ossl_tsfac_get_serial_number(o)
#define ossl_tsfac_get_gen_time(o)
#define NewTSResponse(klass)
#define ossl_tsfac_get_default_policy_id(o)
#define NewTSRequest(klass)
#define ossl_tsfac_get_allowed_digests(o)
#define SetTSResponse(obj, resp)
#define GetTSResponse(obj, resp)
VALUE ossl_x509_new(X509 *)
X509_STORE * GetX509StorePtr(VALUE)
X509 * GetX509CertPtr(VALUE)
@ RUBY_TYPED_FREE_IMMEDIATELY