diff options
author | Ben Toews <mastahyeti@gmail.com> | 2018-07-06 09:38:59 -0600 |
---|---|---|
committer | Samuel Williams <samuel.williams@oriontransfer.co.nz> | 2019-10-01 11:25:06 +1300 |
commit | 8ed5a079a446bfc60a9a6929e877bb4ac55808b8 (patch) | |
tree | 79f7966574ab76d26d986e3037839f1fdbc10812 /ext/openssl/ossl_ts.c | |
parent | a1c033e8d1cf4730c9e5ba5780b2f1ce43483001 (diff) | |
download | ruby-openssl-8ed5a079a446bfc60a9a6929e877bb4ac55808b8.tar.gz |
ts: fix for libressl
- define missing TS_RESP_CTX_set_time_cb
- handle alternate case for nil oid
Diffstat (limited to 'ext/openssl/ossl_ts.c')
-rwxr-xr-x | ext/openssl/ossl_ts.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/openssl/ossl_ts.c b/ext/openssl/ossl_ts.c index 2ad84882..6581c5bf 100755 --- a/ext/openssl/ossl_ts.c +++ b/ext/openssl/ossl_ts.c @@ -218,12 +218,16 @@ ossl_ts_req_get_algorithm(VALUE self) TS_REQ *req; TS_MSG_IMPRINT *mi; X509_ALGOR *algor; + int algi; GetTSRequest(self, req); mi = TS_REQ_get_msg_imprint(req); algor = TS_MSG_IMPRINT_get_algo(mi); - if (!algor || OBJ_obj2nid(algor->algorithm) == NID_undef) + if (!algor) + return Qnil; + algi = OBJ_obj2nid(algor->algorithm); + if (algi == NID_undef || algi == NID_ccitt) return Qnil; return get_asn1obj(algor->algorithm); |