aboutsummaryrefslogtreecommitdiffstats
path: root/ext/openssl/ossl_ts.c
Commit message (Collapse)AuthorAgeFilesLines
* Use rb_intern_const instead of rb_intern in Init functionsNobuyoshi Nakada2021-10-161-13/+13
| | | | | | | | | | | | | [ This is a backport to the 2.2 branch. ] ``` find . -name \*.o -exec nm {} + |& sed '/Init_.*\.rbimpl_id/!d;s/^.* b //;s/\.[1-9][0-9]*$//;s/\.rbimpl_id$//' | uniq ``` should be empty. (cherry picked from commit 9e4d4704e65bccd3cedeb9a07c9101f3c2eb02e9)
* Merge pull request #407 from no6v/fix-timestamp-segvKazuki Yamaguchi2021-09-271-3/+9
|\ | | | | fix segv in Timestamp::{Request,Response,TokenInfo}.new
| * fix segv in Timestamp::{Request,Response,TokenInfo}.newNobuhiro IMAI2021-09-271-3/+9
| | | | | | | | prevent `ossl_ts_*_free()` from calling when `d2i_TS_*_bio()` failed.
* | ts: libressl build fix warningDavid Carlier2021-09-271-0/+4
|/ | | | TS_time_cb on libressl expects an long long/time_t 64 bits long instead.
* Look up digest by name instead of constantBart de Water2020-04-211-3/+3
|
* ts: simplify OpenSSL::Timestamp::Request#algorithmky/ts-simplify-tsreq-get-algorithmKazuki Yamaguchi2020-02-171-6/+1
| | | | | | | | | | | | | | Stop the special treatment of invalid hashAlgorithm of the message imprint. Those invalid values can only appear after the object is instantiated, before the user sets an actual message digest algorithm. OpenSSL::Timestamp::TokenInfo#algorithm already does the same. Also, remove the test case "test_create_request" since it does not make much sense. Those fields are to be set by the user after creation of the object and checking the initial value is pointless. Fixes: https://github.com/ruby/openssl/issues/335
* expand tabsBen Toews2019-10-011-113/+113
|
* ts: require list of allowed digest algos for FactoryBen Toews2019-10-011-27/+45
|
* ts: address more feedbackBen Toews2019-10-011-39/+48
|
* ts: move TS_TST_INFO accessors to a new Timestamp::TokenInfo classBen Toews2019-10-011-188/+289
|
* ts: fix another leakBen Toews2019-10-011-4/+5
|
* ts: don't do anything that might raise in callbacksBen Toews2019-10-011-22/+20
|
* ts: simplify signature for TimestampFactory#additional_certs alsoBen Toews2019-10-011-19/+11
|
* ts: simplify TimestampResponse#response signatureBen Toews2019-10-011-123/+55
| | | | | | | This method allowed roots and intermediates to be specified in a number of ways. This complexity wasn't super valuable though and its better to only allow an X509::Store with an optional Array of intermediates. This greatly simplifies the code and fixes a few leaks.
* ts: address minor feedback from rhenium (more changes coming)Ben Toews2019-10-011-116/+57
| | | | | | | | | | | | | | - make some global variables static instead of extern - get rid of GetTsReqPtr/GetTsRespPtr functions - don't use c99 comments - fix some leaks - clarify what numeric type is returned (Integer or BN, never Fixnum) - typos - add missing checks, remove unecessary checks - use OPENSSL_NO_TS instead of our own macros checking for ts support - use EVP_{digest-name} instead of looking up algos by NID - don't differentiate between failure reasons when verifying - rename Response#pkcs7 to #token
* ts: fix windows buildBen Toews2019-10-011-14/+1
|
* ts: fix for libresslBen Toews2019-10-011-1/+5
| | | | | - define missing TS_RESP_CTX_set_time_cb - handle alternate case for nil oid
* ts: clean up some memory leaksBen Toews2019-10-011-38/+50
|
* ts: use newer TypedData_* macros instead of Data_* onesBen Toews2019-10-011-129/+153
|
* ts: update to work with openssl 1.1.xBen Toews2019-10-011-265/+235
| | | | | | | - clean up whitespace - be consistent with not returning after ossl_raise - use accessor functions when working with openssl TS_* structs - backport accessors for TS_STATUS_INFO, TS_VERIFY_CTX, and TS_RESP_CTX as macros
* ts: get tests running/passingBen Toews2019-10-011-8/+14
| | | | | | | A number of conventions seem to have changed, causing a fair bit of breakage: - `Data_*` was deprecated in favor of `TypedData_*` - `ossl_obj2bio` takes a `VALUE*` instead of `VALUE` now - `time_to_time_t()` was removed
* ts: Timestamp support (3/3)Martin Bosslet2019-10-011-3/+3
| | | | This commit applies the third patches (tsr3.tar.gz) from https://bugs.ruby-lang.org/issues/4183
* ts: Timestamp support (2/3)Martin Bosslet2019-10-011-41/+19
| | | | This commit applies the second patches (ts2.tar.gz) from https://bugs.ruby-lang.org/issues/4183
* ts: Timestamp support (1/3)Martin Bosslet2019-10-011-0/+1546
This commit applies the initial patches (ts.tar.gz) from https://bugs.ruby-lang.org/issues/4183 This compiles with several warnings. Tests don't run yet.