You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Previously, the `certificate` and `private_key` methods created `Tempfile`
objects without maintaining references after the methods exited. This allowed
the Ruby garbage collector to collect and delete these temporary files at any
time. As a result, there was a race condition where the `keytool` binary could
fail with a `java.io.FileNotFoundException` if the temporary files were deleted
before `keytool` accessed them.
This commit resolves the issue by memoizing the `Tempfile` objects using
instance variables (`@temp_certificate_file` and `@temp_private_key_file`). By
caching these objects, we prevent them from being garbage collected
prematurely, ensuring that the temporary files remain available for the
duration of the provider instance.
Fixes#425
0 commit comments