Граф коммитов

371 Коммитов

Автор SHA1 Сообщение Дата
Colin Seymour f9ad550b9e
Merge pull request #4 from github/lildude/resolve-ruby32-warnings
Resolve Ruby 3.2 warnings: undefining the allocator of T_DATA class GPGME::Ctx
2022-08-15 14:24:09 +01:00
Colin Seymour c2bf7a7a6f
Undefine the alloc Ctx, Data and Key functions
See https://bugs.ruby-lang.org/issues/18007 and https://ruby-doc.org/core-3.1.1/doc/extension_rdoc.html#label-C+struct+to+Ruby+object
2022-08-12 13:50:42 +00:00
Colin Seymour 87e36af471
Use byebug 11.1 for Ruby 3.x 2022-08-12 10:38:12 +00:00
Colin Seymour 8a89fd6239
Merge pull request #3 from github/lildude/sync-upstream
Sync with upstream
2022-08-12 11:17:34 +01:00
Colin Seymour 880baf0c69
Merge remote-tracking branch 'upstream/master' into lildude/sync-upstream 2022-08-11 10:11:09 +00:00
timothyjb d48cf033a0 Add .editorconfig file
To set the editor settings to a standard style.
Adding setting to:
- Use 2 space indentation
- Trim trailing white space
2021-12-18 12:51:15 +01:00
timothyjb f055a1df68 update-indentation-type-inconsistency
This PR should only contain white space changes.
I noticed some inconsistency in the use of tabs verses spaces for the indentation. Some editors display them slightly differently causing the indentation to appear oddly.

I replaced each tab with 8 spaces because that seemed to line up similar to the way github was displaying the code.

Feel free to ignore if this is incorrect or too petty of a request
2021-12-18 12:51:15 +01:00
Carlos Cebrecos b1dd398952 Update crypto.rb
Typo on symmetric.
2021-03-01 21:14:44 +01:00
Andrey "Zed" Zaikin dde4afed28
fix comment example for GPGME::Engine.set_info (#139) 2021-01-29 21:46:39 +10:00
Dan Sketcher 6e7e831860 Version 2.0.20 release 2020-02-18 21:45:18 +10:00
Dan Sketcher 657f48d08c
Update lib versions (#138)
Update `libgpg-error` to 1.37, `libassuan` to 2.5.3, `gpgme` to 1.13.1
2020-02-18 21:35:35 +10:00
Vicent Martí 64af9cadb9 ctx: do not autoclose in `path_function` (#135)
The default callback for writing a password to GPGME takes a file
descriptor and needs to write the given password to it. By creating a
new `IO` object directly on the file descriptor, the object will take
ownership of it. This is a problem because the file descriptor passed to
this callback will be explicitly closed by GPGME, and eventually, the
`IO` allocated in `self.pass_function` will be garbage collected,
closing the file descriptor again.

Usually, closing a file descriptor that has already been closed results
in a silent `EBADFD`, but a serious race condition can happen if the
Kernel allocates the same file descriptor (e.g. through another `open`
call in another part of your Ruby program): when GC triggers, the
FD will be closed unexpectedly.

To prevent this, simply set `IO#autoclose = false` on the `IO` object:
the garbage collector will no longer close the file descriptor on
cleanup, so the descriptor will only be closed once (in the explicit
close call performed by us).
2020-01-25 16:40:09 +10:00
Dan Sketcher 67d151c502 Whoops wrong month 2019-10-03 22:07:23 +10:00
Dan Sketcher f4f282e001 Version bump and docs 2019-10-03 22:04:34 +10:00
Tim Kretschmer 522d61c44d added GPGME::Key.valid? method (#133) 2019-10-03 21:52:27 +10:00
Fup Duck f00a99f253 Enable minimal key exports. (#132)
'Minimal' is the smallest possible key, all signatures removed except
for the latest self-signatures.
2019-09-30 21:31:53 +10:00
Sebastian Skałacki e84f42e2e8 Reorder Rubies in Travis build CI
The first RVM entry is considered the default one.

This change has no impact on current build matrix, however if at some
point following would be added:

    matrix:
      include:
        - ...

Then it runs such additional job with default (first mentioned) Ruby
version unless that job definition specifies Ruby version explicitly.
Therefore, it's generally good when Rubies are listed from latest to
oldest.
2019-03-24 13:09:14 +01:00
Sebastian Skałacki ef821c30d4 Specify Rubies in MAJOR.MINOR manner
This way RVM takes the latest available PATCH for given MAJOR and MINOR
version numbers.

See: https://github.com/ueno/ruby-gpgme/pull/130#issuecomment-475905448
2019-03-24 13:09:14 +01:00
Sebastian Skałacki 58826c48e5 Test against Ruby 2.6 2019-03-24 13:09:14 +01:00
Sebastian Skałacki cf693f269d Remove has_rdoc from gemspec
Gem specification attribute #has_rdoc is deprecated and ignored.
According to deprecation warning, it may be removed "on or after
2018-12-01" with no replacement.

This attribute used to describe whether RDoc can be generated for given
gem or not.  According to RubyGems v1.3.3 release notes, "RDoc is now
generated regardless of Gem::Specification#has_rdoc?".

See:
- https://blog.rubygems.org/2009/05/04/1.3.3-released.html
2019-03-23 02:34:24 +01:00
Allan Tokuda c9e924f336 More verbose comments derived from GPGME code (#127) 2018-12-22 11:17:19 +10:00
Daiki Ueno bc0ee0dd44 Fix test failures on Travis CI (#126)
* test: Use dummy pinentry program
We can't simply use loopback pinentry in our CI, because the gpg2
command installed on travis is too old to support it.  Instead, import
the dummy pinentry hack from the GPGME test suite.
* travis: Print information about installed gpg commands
* test: Skip tests that use passphrase callback
* test: Skip checks on expired keys for now
2018-12-05 20:35:35 +10:00
Dan Sketcher 2a9ba02fc0 Comment tidy-up 2018-11-29 10:57:54 +10:00
Dan Sketcher b952b90ad6 Comment tidy-up 2018-11-29 10:52:25 +10:00
Dan Sketcher 13111a6b54 Move docs from Issue #26 2018-11-29 10:40:44 +10:00
Dan Sketcher 0b2b60d329 Update to 2.0.18 2018-11-22 23:04:19 +10:00
Dirkjan Bussink 4ae61d0acb Disable running tests when configuring gpgme (#125)
This disables more tests when building gpgme. This adds a significant
amount of installation time and it also currently prevents this gem from
being installed on MacOS.

On MacOS, it fails with a message like the following:

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

With this change, installing the gpgme gem succeeds.
2018-11-22 22:59:22 +10:00
Dan Sketcher b175182113 Update to 2.0.17 2018-11-22 17:10:49 +10:00
Casey Tucker 12d4aa1c2e
Merge pull request #2 from ueno/master
merging upstream
2018-11-20 15:28:30 -08:00
Casey Tucker a39c7268ab oops! removing old SHA 2018-11-20 12:56:26 +01:00
Casey Tucker 8f08b6df36 updates gpgme 1.12.0, assuan 2.5.1, error 1.32
The motivation behind this PR is to use the latest versions of gpgme,
libassuan, and libgpg-error. This change will be useful to those
running ruby within Docker, where gpgme 1.9 has very poor performance
due to inefficiently attempting to close as many file descriptors as
RLIMIT_NOFILE on every spawn. This has been resolved in gpgme 1.12 by
checking directory entries in /proc/self/fd to determine how many file
descriptors to attempt to close.
2018-11-20 12:56:26 +01:00
Nicolas Leger 387c775859 [CI] Test against Ruby 2.4 and .5 2018-03-05 10:36:36 +01:00
Dan Sketcher f951ee54de Update to 2.0.16 (Closes #101) 2018-01-03 21:50:25 +10:00
iwat b7f30a03c1 Expose gpgme_data_set_file_name
When using `gpg -dv <filename>` to decrypt a file, it displays "original
file name" that shows the name of the original file before encrypting.
But when encrypting from GPGME::Data stream, the file name was lost. And
gpg displays "-&20" or similar string as the original file name.

This commit adds the ability to set the `file_name` property of
GPGME::Data object, this property will be displayed as "original file
name" when decrypting with `gpg -dv` command.
2017-12-24 06:50:34 +01:00
Daiki Ueno f4f45406be Update yard dependency 2017-12-21 11:09:42 +01:00
Dan Sketcher a288683fed Link to issue resolved in NEWS (Closes #106) 2017-12-19 21:49:16 +10:00
Dan Sketcher 5ae91f05d6 Link to issue resolved in NEWS 2017-12-19 21:42:05 +10:00
Ryan Clemente c1ab0ac363 Bump to 2.0.15 2017-12-19 15:05:19 +08:00
Ryan Clemente e9098c38c4 Nokogiri 1.8.1 compatibility update 2017-12-18 05:41:26 +01:00
Dan Sketcher f70d0268ed Update to 2.0.14 2017-10-30 21:13:24 +10:00
Daiki Ueno a261dc9aff Don't build language bindings
Fixes issue #93.
2017-07-14 11:24:30 +02:00
Daiki Ueno 2a6781e283 Update to 2.0.13 2017-07-02 04:40:00 +02:00
Daiki Ueno 70723177fb Update tarballs 2017-07-02 04:39:24 +02:00
Dmytro Shteflyuk cef92dbae9 Switch to HTTPS + checksum validation for GPG libraries
Downloading files from FTP without checksum validation is insecure and open a potential security hole in the system. Instead, we will download library sources via HTTPS and then validate file signatures locally. This will make sure files are not modified in flight, and also will make sure that if somebody managed to replace files on the server – we will fail fast and stop compiling the potentially malicious code.
2017-06-20 13:54:28 +02:00
Gordon McNaughton 2635ebf7dd Fixes #88: relax mini_portile2 version dependency to prevent conflicts with nokogiri 1.8.0 (which requires ~>2.2.0) 2017-06-12 13:20:32 +02:00
Daiki Ueno 2e2c57a6eb Update tarballs 2016-11-25 16:54:35 +01:00
Daiki Ueno d97a993273 test: Factor out temporary home directory creation 2016-10-31 14:55:20 +01:00
Daiki Ueno 94e4212464 test: Clean temporary home directory 2016-10-31 13:24:25 +01:00
Daiki Ueno 468400d140 travis: Add more ruby versions 2016-10-07 14:50:27 +02:00
Daiki Ueno 6d667929e3 travis: Use rng-tools to speed up key generation 2016-10-07 14:35:39 +02:00