Closed Verseth closed 10 months ago
This fixes https://github.com/ueno/ruby-gpgme/issues/141.
I added a setter and getter for the ignore-mdc-error flag.
ignore-mdc-error
GPGME::Ctx#ignore_mdc_error
GPGME::Ctx#ignore_mdc_error=
Example usage:
ctx = GPGME::Ctx.new ctx.ignore_mdc_error #=> false ctx.ignore_mdc_error = true ctx.ignore_mdc_error #=> true ctx = GPGME::Ctx.new(ignore_mdc_error: true) ctx.ignore_mdc_error #=> true
I also added a generic pair of getter/setter methods that can be used to set ctx flags that have not been exposed through getters and setters in Ruby.
GPGME::Ctx#get_ctx_flag
GPGME::Ctx#set_ctx_flag
ctx = GPGME::Ctx.new ctx.get_ctx_flag("ignore-mdc-error") #=> "" ctx.ignore_mdc_error = true ctx.ignore_mdc_error #=> true ctx.get_ctx_flag("ignore-mdc-error") #=> "1" ctx.set_ctx_flag("ignore-mdc-error", "0") ctx.ignore_mdc_error #=> false ctx.get_ctx_flag("ignore-mdc-error") #=> "" ctx.set_ctx_flag("ignore-mdc-error", "1") ctx.ignore_mdc_error #=> true ctx.get_ctx_flag("ignore-mdc-error") #=> "1"
These two methods make it possible to use features that are available in GPGME but haven't been defined in the Ruby bindings, like the ignore-mdc-error flag prior to this PR.
This fixes https://github.com/ueno/ruby-gpgme/issues/141.
I added a setter and getter for the
ignore-mdc-error
flag.GPGME::Ctx#ignore_mdc_error
GPGME::Ctx#ignore_mdc_error=
Example usage:
I also added a generic pair of getter/setter methods that can be used to set ctx flags that have not been exposed through getters and setters in Ruby.
GPGME::Ctx#get_ctx_flag
GPGME::Ctx#set_ctx_flag
Example usage:
These two methods make it possible to use features that are available in GPGME but haven't been defined in the Ruby bindings, like the
ignore-mdc-error
flag prior to this PR.