⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Ruby master
All Projects
Ruby
»
Ruby master
Overview
Activity
Roadmap
Issues
Repository
Like
Download (390 Bytes)
Bug #14882
ยป ossl_pkey_intr.rb
normalperson (Eric Wong)
, 06/30/2018 03:41 AM
require
'openssl'
$stdout
.
sync
=
true
trap
(
:USR1
)
{
$stdout
.
syswrite
"USR1 received
\n
"
}
[
OpenSSL
::
PKey
::
RSA
,
OpenSSL
::
PKey
::
DSA
,
OpenSSL
::
PKey
::
DH
].
each
do
|
cls
|
begin
th
=
Thread
.
new
do
sleep
0.1
Process
.
kill
(
:USR1
,
$$
)
end
ok
=
cls
.
new
(
4096
)
warn
"OK
#{
cls
}
"
rescue
=>
e
warn
"FAIL
#{
cls
}
:
#{
e
.
message
}
(
#{
e
.
class
}
)"
ensure
th
&
.
join
end
end
(1-1/1)
Loading...