Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the activate setting more intuitive #22906

Closed
wants to merge 7 commits into from
Closed

Conversation

nhorman
Copy link
Contributor

@nhorman nhorman commented Dec 1, 2023

Currently, a provider is activated from our config file using the activate parameter. However, the presence of the config parameter is sufficient to trigger activation, leading to a counterintuitive situation in which setting "activate = 0" still activates the provider

Make activation more intuitive by requiring that activate be set to one of yes|true|1 to trigger activation. Any other value, as well as omitting the parameter entirely, prevents activation (and also maintains backward compatibility.

It seems a bit heavyweight to create a test specifically to validate the plurality of these settings. Instead, modify the exiting openssl config files in the test directory to use variants of these settings, and augment the default.cnf file to include a provider section that is explicitly disabled

Checklist
  • documentation is added or updated
  • tests are added or updated

Currently, a provider is activated from our config file using the
activate parameter.  However, the presence of the config parameter is
sufficient to trigger activation, leading to a counterintuitive
situation in which setting "activate = 0" still activates the provider

Make activation more intuitive by requiring that activate be set to one
of yes|true|1 to trigger activation.  Any other value, as well as
omitting the parameter entirely, prevents activation (and also maintains
backward compatibility.

It seems a bit heavyweight to create a test specifically to validate the
plurality of these settings.  Instead, modify the exiting openssl config
files in the test directory to use variants of these settings, and
augment the default.cnf file to include a provider section that is
explicitly disabled
@nhorman nhorman self-assigned this Dec 1, 2023
test/default.cnf Show resolved Hide resolved
crypto/provider_conf.c Outdated Show resolved Hide resolved
@t8m t8m added branch: master Merge to master branch triaged: feature The issue/pr requests/adds a feature hold: need otc decision The OTC needs to make a decision tests: present The PR has suitable tests present labels Dec 4, 2023
@t8m
Copy link
Member

t8m commented Dec 4, 2023

OTC: What is the appropriate behavior for various bogus values of the activate key in a provider section?

@mspncp
Copy link
Contributor

mspncp commented Dec 10, 2023

I'd allow a reasonable set of yes/no pairs and error out on unknown values.

@nhorman
Copy link
Contributor Author

nhorman commented Dec 11, 2023

I don't think we can should error out on unknown values as that would be a behavioral change from the test if the 3.x stream. I think any such change would have to wait until 4.0 I think

doc/man5/config.pod Outdated Show resolved Hide resolved
crypto/provider_conf.c Show resolved Hide resolved
@t8m
Copy link
Member

t8m commented Dec 19, 2023

OTC: We should add explicit values for disabling activation and report an error on unknown values.

@t8m t8m removed the hold: need otc decision The OTC needs to make a decision label Dec 19, 2023
@nhorman
Copy link
Contributor Author

nhorman commented Dec 19, 2023

fixed activation setting to be in line with OTC response

CHANGES.md Outdated Show resolved Hide resolved
crypto/provider_conf.c Show resolved Hide resolved
@nhorman nhorman requested review from t8m and mspncp December 20, 2023 13:06
doc/man5/config.pod Outdated Show resolved Hide resolved
@t8m t8m added approval: review pending This pull request needs review by a committer approval: otc review pending This pull request needs review by an OTC member labels Dec 20, 2023
crypto/provider_conf.c Show resolved Hide resolved
@t8m t8m removed the approval: otc review pending This pull request needs review by an OTC member label Dec 20, 2023
@mattcaswell mattcaswell added approval: done This pull request has the required number of approvals and removed approval: review pending This pull request needs review by a committer labels Dec 20, 2023
@nhorman nhorman requested a review from mspncp December 20, 2023 14:23
@openssl-machine openssl-machine added approval: ready to merge The 24 hour grace period has passed, ready to merge and removed approval: done This pull request has the required number of approvals labels Dec 21, 2023
@openssl-machine
Copy link
Collaborator

This pull request is ready to merge

openssl-machine pushed a commit that referenced this pull request Dec 21, 2023
Currently, a provider is activated from our config file using the
activate parameter.  However, the presence of the config parameter is
sufficient to trigger activation, leading to a counterintuitive
situation in which setting "activate = 0" still activates the provider

Make activation more intuitive by requiring that activate be set to one
of yes|true|1 to trigger activation.  Any other value, as well as
omitting the parameter entirely, prevents activation (and also maintains
backward compatibility.

It seems a bit heavyweight to create a test specifically to validate the
plurality of these settings.  Instead, modify the exiting openssl config
files in the test directory to use variants of these settings, and
augment the default.cnf file to include a provider section that is
explicitly disabled

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from #22906)
@nhorman
Copy link
Contributor Author

nhorman commented Dec 21, 2023

merged

@nhorman nhorman closed this Dec 21, 2023
wanghao75 pushed a commit to openeuler-mirror/openssl that referenced this pull request Dec 22, 2023
Currently, a provider is activated from our config file using the
activate parameter.  However, the presence of the config parameter is
sufficient to trigger activation, leading to a counterintuitive
situation in which setting "activate = 0" still activates the provider

Make activation more intuitive by requiring that activate be set to one
of yes|true|1 to trigger activation.  Any other value, as well as
omitting the parameter entirely, prevents activation (and also maintains
backward compatibility.

It seems a bit heavyweight to create a test specifically to validate the
plurality of these settings.  Instead, modify the exiting openssl config
files in the test directory to use variants of these settings, and
augment the default.cnf file to include a provider section that is
explicitly disabled

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from openssl/openssl#22906)

Signed-off-by: lanming1120 <lanming1120@126.com>
wbeck10 pushed a commit to wbeck10/openssl that referenced this pull request Jan 8, 2024
Currently, a provider is activated from our config file using the
activate parameter.  However, the presence of the config parameter is
sufficient to trigger activation, leading to a counterintuitive
situation in which setting "activate = 0" still activates the provider

Make activation more intuitive by requiring that activate be set to one
of yes|true|1 to trigger activation.  Any other value, as well as
omitting the parameter entirely, prevents activation (and also maintains
backward compatibility.

It seems a bit heavyweight to create a test specifically to validate the
plurality of these settings.  Instead, modify the exiting openssl config
files in the test directory to use variants of these settings, and
augment the default.cnf file to include a provider section that is
explicitly disabled

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from openssl#22906)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approval: ready to merge The 24 hour grace period has passed, ready to merge branch: master Merge to master branch tests: present The PR has suitable tests present triaged: feature The issue/pr requests/adds a feature
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

6 participants