| Age | Commit message (Collapse) | Author |
|
It is exported only for the extension library to test, but the method
is no longer used since 29e31e72fb5a14194a78ec974c4ba56c33ad8d45.
|
|
(https://github.com/ruby/stringio/pull/194)
https://github.com/ruby/stringio/commit/3cef1e0e5f
|
|
(https://github.com/ruby/stringio/pull/193)
https://github.com/ruby/stringio/commit/90728bbbca
|
|
(https://github.com/ruby/stringio/pull/192)
https://github.com/ruby/stringio/commit/8b1ee03cbe
|
|
(https://github.com/ruby/stringio/pull/191)
https://github.com/ruby/stringio/commit/f2a2a5a99e
|
|
https://github.com/ruby/stringio/commit/a7c118d786
|
|
ASN1_ENUMERATED_to_BN() has been const-correct for a long time in all
supported libcrytos, so we can remove this workaround.
https://github.com/ruby/openssl/commit/d0f36a7c65
|
|
It's possible that both half_days_in_day and day_in_nanoseconds are Ruby
objects, which means that creating day_in_nanoseconds may trigger GC.
Since half_days_in_day is not registered as a mark object until after
day_in_nanoseconds is allocated, the GC may reclaim half_days_in_day.
We can see this crash:
ruby(rb_print_backtrace+0xb) [0x63a373c0] vm_dump.c:1105
ruby(rb_vm_bugreport) vm_dump.c:1450
ruby(rb_assert_failure_detail+0xdb) [0x6371d3a2] error.c:1216
ruby(RB_FL_TEST_RAW+0x0) [0x6371d3d5] error.c:1192
ruby(rb_assert_failure) (null):0
ruby(rb_gc_impl_writebarrier+0xb4) [0x636f01e4] gc/default/default.c:6103
ruby(pin_array_list_append+0x72) [0x638f9787] include/ruby/internal/gc.h:788
ruby(rb_vm_register_global_object) vm.c:4713
ruby(rb_gc_register_mark_object+0x3a) [0x6374144a] gc.c:3449
.ext/i686-linux-gnu/date_core.so(Init_date_core+0x204) [0xdbec86c4] ext/date/date_core.c:9511
.ext/i686-linux-gnu/date_core.so(Init_date_core) (null):0
ruby(dln_load_and_init+0x71) [0x6392c541] dln.c:521
ruby(dln_load_feature+0xd2) [0x6392c7d2] dln.c:566
ruby(load_ext+0xc3) [0x637931b3] load.c:1210
ruby(rb_vm_pop_frame+0x0) [0x638f80cd] vm.c:3120
ruby(rb_vm_call_cfunc_in_box) vm.c:3122
ruby(rb_long2num_inline+0x0) [0x637956f8] load.c:1353
ruby(require_internal) load.c:1354
ruby(rb_require_string_internal+0x60) [0x63795fa1] load.c:1457
ruby(rb_require_string) load.c:1443
https://github.com/ruby/date/commit/cbec5948e0
|
|
https://github.com/ruby/openssl/commit/a41cf28bab
|
|
https://github.com/ruby/openssl/commit/8945f379b3
|
|
https://github.com/ruby/openssl/commit/0941ebbda5
|
|
This uses the normal accessors but leaves out BIT STRINGS, which will
need compat implementations for ASN1_BIT_STRING_get_length() and
ASN1_BIT_STRING_set1() for older libcryptos.
https://github.com/openssl/openssl/issues/29184
https://github.com/openssl/openssl/issues/29185
https://github.com/ruby/openssl/commit/ba3d1cc5c2
|
|
OpenSSL plans to make asn1_string_st opaque, the struct underlying most
ASN.1 types such as ASN1_*STRING, ASN1_ENUMERATED, ASN1_INTEGER, etc.
Most of ruby/openssl's C code can be straigtforwardly converted to use
accessors available since OpenSS
https://github.com/ruby/openssl/commit/374262435a
|
|
This helper only reads from its in parameter. Making that const
avoids a couple of casts in an upcoming change.
https://github.com/ruby/openssl/commit/970d5764e3
|
|
|
|
https://github.com/ruby/stringio/commit/dc93aa51d2
|
|
In a newly allocated OpenSSL X509 object, the notBefore and notAfter
fields contain an ASN1_STRING object with type V_ASN1_UNDEF rather than
an ASN1_TIME.
Commit https://github.com/ruby/openssl/commit/73484f67949a made asn1time_to_time() stricter and it now raises
an exception if the argument is not an ASN1_TIME. Previously, it would
print a verbose-mode warning and return nil.
OpenSSL::X509::Certificate#inspect should work even when the certificate
is invalid. Let's handle this.
https://github.com/ruby/openssl/commit/18c283f2b6
|
|
https://github.com/ruby/psych/commit/907fd4fa97
|
|
Previously we only allocated bignums from the 40 byte sizepool, and
embedded bignum used a fixed size.
|
|
The current logic relies on sscanf() and error checks are almost
entirely missing. It also assumes that ASN1_STRING contents are NUL
terminated, which is undocumented and not guaranteed for all valid
ASN1_TIME objects.
Switch to using ASN1_TIME_to_tm() added in OpenSSL 1.1.1. It is also
supported by LibreSSL and AWS-LC.
In the long term, we may want to replace ASN1_TIME_to_tm() with a
hand-rolled decoder, since the function is intended for a specific
use-case. It is too permissive for strict DER, yet still does not
support all valid DER inputs and silently drops information such as
fractional seconds. However, it handles everything that the current
sscanf() code could handle.
https://github.com/ruby/openssl/commit/73484f6794
|
|
Move variable declarations for OpenSSL::ASN1 classes to the top of the
file. asn1time_to_time() will need eASN1Error in the next patch.
https://github.com/ruby/openssl/commit/6c0ef87897
|
|
Since around 2018, we have been using spaces for indentation for newly
added code[1]. The mixed use of tabs and spaces has repeatedly confused
new contributors who configured their editors to use a different tab
size than 8. Since git blame can now skip specific commits, ruby/ruby
did a mass reformatting of tabs in 2022[2]. Do the same in ruby/openssl.
While at it, fix a few indentation issues, mainly in switch-case labels
and in ossl_ssl_session.c, which used doubled indentation size.
This patch contains white-space changes only. git diff -w output should
be empty.
[1] https://bugs.ruby-lang.org/issues/14246
[2] https://bugs.ruby-lang.org/issues/18891
https://github.com/ruby/openssl/commit/4d6214f507
|
|
This reverts commit https://github.com/ruby/openssl/commit/830505172882.
The commit is part of the bigger effort to rewrite OpenSSL::ASN1 in
Ruby. OpenSSL::ASN1 is relatively isolated from the rest of ruby/openssl
and is not tightly bound to the OpenSSL API. The current implementation
also needs a major refactor for several reasons, so this remains a
long-term goal.
However, the work is not yet complete. We are close to releasing v4.0.0,
and we want to avoid shipping fragmented code in a stable branch. The
changes can be reapplied when the rest is ready.
https://github.com/ruby/openssl/commit/362942dcbf
|
|
https://github.com/ruby/json/commit/e5e4fd558e
|
|
Fix: https://github.com/ruby/json/issues/912
In the case of surogate pairs we consume two backslashes, so
`json_next_backslash` need to ensure it's not sending us back in the
stream.
https://github.com/ruby/json/commit/0fce370c41
|
|
https://github.com/ruby/psych/commit/4e9d08c285
|
|
Fixes: ruby#685
This feature can easily break how you use other gems like factory_bot or prawn.
https://github.com/ruby/psych/pull/747#issuecomment-3413139525
> But I kind of think we should leave `psych/y` around. If people really want to use it they could require the file.
If you miss the function in Kernel, you can require it interactively or add it to `.irbrc`:
```ruby
require 'psych/y'
```
https://github.com/ruby/psych/commit/f1610b3f05
|
|
https://github.com/ruby/json/commit/4bdb2d14fe
|
|
https://github.com/ruby/json/commit/ccca602274
|
|
The NEWOBJ tracepoint can generate an object_id, that's alright,
what we don't want is actual instance variables.
|
|
The "EXIVAR" terminology has been replaced by "gen fields"
AKA "generic fields".
Exivar implies variable, but generic fields include more than
just variables, e.g. `object_id`.
|
|
When serializing an Array, and one of the elements of the Array requires
calling `to_json`, if the depth is changed, it will be used for the next
entries, which wasn't the case before
https://github.com/ruby/json/commit/5abd43490714, and is not the case with
TruffleRuby and JRuby.
Additionally, with TruffleRuby and JRuby the state's depth after the
`to_json` call is used to close the Array, which isn't the case with
CRuby.
https://github.com/ruby/json/commit/386b36fde5
|
|
options as second argument
Otherwise it's very error prone.
https://github.com/ruby/json/commit/c54de70f90
|
|
[Bug #21710]
- struct.c: `struct_alloc`
It is possible for a `NEWOBJ` tracepoint call back to write fields
into a newly allocated object before `struct_alloc` had the time
to set the `RSTRUCT_GEN_FIELDS` flags and such.
Hence we can't blindly initialize the `fields_obj` reference to `0`
we first need to check no fields were added yet.
- object.c: `rb_class_allocate_instance`
Similarly, if a `NEWOBJ` tracepoint tries to set fields on the object,
the `shape_id` must already be set, as it's required on T_OBJECT to
know where to write fields.
`NEWOBJ_OF` had to be refactored to accept a `shape_id`.
|
|
`ALWAYS_INLINE()` and `NOINLINE()` are defined with one argument.
https://github.com/ruby/json/commit/8fb727901e
|
|
* From https://github.com/truffleruby/truffleruby/commit/1f81db82d2969ff7c5de0dacdecb38252664f42c
https://github.com/ruby/psych/commit/dbabe7aac6
|
|
values and not a Hash
* rb_struct_initialize() does not accept a Hash, and it's very brittle
to pass `[{...}]` and to rely on that C function using rb_keyword_given_p().
It basically worked accidentally, by having **members in the caller of the caller.
Such logic when Struct#initialize is defined in Ruby (as in TruffleRuby) is basically impossible to implement,
because it's incorrectly treating positional arguments as keyword arguments.
* rb_struct_initialize() is used in CRuby to set members of Data instances in marshal.c (there is no rb_data_initialize() yet).
There, the code passes an Array of members values for Data (and for Struct which are not `keyword_init: true`):
https://github.com/ruby/ruby/blob/48c7f349f68846e10d60ae77ad299a38ee014479/marshal.c#L2150-L2176
So we should do the same in psych.
* Rename to init_data since it's only used for Data.
* See https://github.com/ruby/psych/pull/692#discussion_r2483947279.
https://github.com/ruby/psych/commit/3550148378
|
|
These declarations were added to every source file because older
versions of RDoc did not resolve ancestor tree across files. Since
RDoc 6.9.0 supports this, this workaround is no longer needed.
https://redirect.github.com/ruby/rdoc/pull/1217
https://github.com/ruby/openssl/commit/6491ce63be
|
|
Move attribute documentation out of the class-level section and into
the appropriate sections so that they attach correctly.
https://github.com/ruby/openssl/commit/61410acc50
|
|
Re-organize page docs
|
|
https://github.com/ruby/json/commit/9c36681b17
|
|
|
|
Now that the state isn't mutated in generate_new, we no longer need to
copy the struct, we can just use it.
https://github.com/ruby/json/commit/d7964f8892
|
|
For `JSON.generate` and `JSON::State#generate_new`, don't copy
generate_json_data::depth to JSON_Generator_State::depth.
In `JSON.generate`, the JSON_Generator_State is on the stack and
discarded anyway. In `JSON::State#generate_new`, we copy the struct to
avoid mutating the original one.
https://github.com/ruby/json/commit/873b29ea34
|
|
Instead of incrementing JSON_Generator_State::depth, we now increment
generate_json_data::depth, and only copied at the end.
https://github.com/ruby/json/commit/5abd434907
|
|
Use C90 syntax only, as far as supporting ruby 2.6 or earlier.
https://github.com/ruby/cgi/commit/886c82982a
|
|
It should check the type of the argument and coercion before
converting the encoding.
|
|
ruby/openssl exposes OIDs to Ruby as strings in many places, but the
conversion logic has been duplicated and the behavior is inconsistent.
There are mainly two patterns:
- Returns the short name associated with the OID/NID, or the dotted
decimal notation if it is unknown to OpenSSL.
- Returns the long name, or the dotted decimal notation.
These patterns are implemented using different OpenSSL APIs and that
caused subtle differences. Add helper functions ossl_asn1obj_to_string()
and ossl_asn1obj_to_string_long_name() to unify the logic.
Also, document the current behaviors where it is not yet done. The
inconsistency was likely unintentional, but since it dates back to the
original implementations, standardizing it now would cause more issues
than it resolves.
https://github.com/ruby/openssl/commit/2ea36c21a4
|
|
obj_to_asn1obj() in ossl_ts.c and ossl_asn1.c are identical. Let's
remove one in ossl_ts.c.
eASN1Error can now be made static to ossl_asn1.c.
https://github.com/ruby/openssl/commit/dcb05c40c2
|
|
curves
EC_GROUP_get_curve_name() returns NID_undef when OpenSSL does not
recognize the curve and there is no associated OID.
Handle this case explicitly and return nil instead of the string
"UNDEF", which should not be exposed outside the extension.
https://github.com/ruby/openssl/commit/2c16821c07
|