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
Add help for pkeyopt values for the genpkey commandline app. #19931
Conversation
Example output for
|
return; | ||
ctx = EVP_PKEY_CTX_new_from_name(libctx, algname, propq); | ||
if (ctx == NULL) | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we not have some kind of output in the event of error (or at least a process exit code)?
const char *name = param_datatype_2name(params[i].data_type, &ishex); | ||
|
||
if (name != NULL) | ||
BIO_printf(bio_err, " %s%s:%s\n", ishex ? "hex" : "", params[i].key, name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would print e.g. hexpropname:string
... this seems confusing?
Perhaps propname:string (hex)
/ propname:string
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it still needs the hex in front of the name as that is what you do to parse hex format.
foreach (@algs) { | ||
my $alg = $_; | ||
|
||
ok(run(app([ 'openssl', 'genpkey', '-algorithm', $alg, '-help'])), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the output be checked for minimal sanity?
E.g. the string "pkeyopt values are" appears. Perhaps an option as well.
You do know, I hope, that you're kinda sorta reinventing the wheel? Have a look at Of course, the output from those functions is bit more verbose, but I suspect it wouldn't be too hard to add a verbosity parameter. Also, I would expect that this sort of help will find its way to all the other commands that use these sorts of opts too... not asking for it in this PR, but I'd really like it if that was the intent, at least. |
This is NOT trying to print out every possible param value like the list does.. Only ones that are actually usable by the command (e.g. OSSL_PARAM_UTF8_PTR is not something you can set from here). |
Is there really that many of them? This particular one is the one I keep on looking up all the time. |
I haven't looked thoroughly, but I suspect that all |
Having the command I want to run produce a list is useful IMO. Knowing that |
This PR is in a state where it requires action by @openssl/committers but the last update was 30 days ago |
@hlandau ? |
24 hours has passed since 'approval: done' was set, but as this PR has been updated in that time the label 'approval: ready to merge' is not being automatically set. Please review the updates and set the label manually. |
As @hlandau removed their stale review, this has passed the 24 hour threshold. |
Merged to master. Thank you for your contribution! |
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Todd Short <todd.short@me.com> (Merged from #19931)
Checklist