Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkey: resume key generation after interrupt [Bug #14882] #205

Merged
merged 1 commit into from
Aug 8, 2018

Conversation

rhenium
Copy link
Member

@rhenium rhenium commented Jul 2, 2018

Key/parameter generation (OpenSSL::PKey::*.{new,generate}) immediately
aborts when it is done with GVL released (in other words, no block is
given) and the thread is interrupted (e.g., by a signal) during the
operation.

Have ossl_generate_cb_2() acquire GVL and call rb_thread_check_ints()
if needed to process the pending interrupt rather than abort the
operation completely by returning 0.

Reference: https://bugs.ruby-lang.org/issues/14882

@rhenium rhenium force-pushed the ky/pkey-generate-interrupt-resume branch from 5daeb8b to 39b1061 Compare July 2, 2018 13:03
Key/parameter generation (OpenSSL::PKey::*.{new,generate}) immediately
aborts when it is done with GVL released (in other words, no block is
given) and the thread is interrupted (e.g., by a signal) during the
operation.

Have ossl_generate_cb_2() acquire GVL and call rb_thread_check_ints()
if needed to process the pending interrupt rather than abort the
operation completely by returning 0.

Reference: https://bugs.ruby-lang.org/issues/14882
@rhenium rhenium force-pushed the ky/pkey-generate-interrupt-resume branch from 39b1061 to 8bb519b Compare August 6, 2018 17:21
@rhenium rhenium merged commit a1e8aac into ruby:maint-2.0 Aug 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant