Comments (2)
Closing the file handle in the passphrase callback solved the problem.
Thank you!
from ruby-gpgme.
I'm still looking for a proper way to fix this, but for your use-case, a workaround would be to use a custom passphrase callback and call IO#close at the end:
def pass_function(pass, uid_hint, passphrase_info, prev_was_bad, fd)
io = IO.for_fd(fd, 'w')
io.puts 'password'
io.flush
io.close
end
crypto = GPGME::Crypto.new(armor: false, symmetric: true,
passphrase_callback: method(:pass_function))
However, I doubt that we can simply do that in our default callback, as other gpgme engines might assume the FD is never closed.
from ruby-gpgme.
Related Issues (20)
- how to set "personal-compress-preferences": 'ZIP' HOT 2
- Cannot allocate memory Error
- Building v2.0.20 fails on ubuntu 21.10 HOT 4
- How to get ID / email after import? HOT 1
- Nokigiri 1.12.5 compatibility HOT 3
- How do I set compression method as a ZIP by default? HOT 1
- GPGME performance issue, running too slow
- Ruby 3.2 warning: undefining the allocator of T_DATA class GPGME::Ctx
- Tests failing with multiple NoMethodError HOT 2
- The mini_portile2 required version blocks updating if 2.8.0 is installed HOT 1
- Possible to update `mini_portile2` dependency? HOT 1
- v2.0.22 ignores `pkg-config` failures and creates a shared library that cannot load symbols
- GPGME::Error::NoData when using Heroku
- Build failure with Clang 16 (`-Wincompatible-function-pointer-types`) HOT 2
- Exporting private key returns a public key
- the config.guess in libassuan-2.5.5.tar.bz2 is too old,and it cannot guess build type HOT 3
- Build error with Alpine >= 3.18.0 and musl >= 1.2.4 HOT 2
- new release? HOT 2
- Current warnings
- [macOS] Build with bundled libs fails with GCC due to unsupported flags HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ruby-gpgme.