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

Problems with genpkey #16238

Closed
paulidale opened this issue Aug 5, 2021 · 5 comments
Closed

Problems with genpkey #16238

paulidale opened this issue Aug 5, 2021 · 5 comments
Labels
triaged: bug The issue/pr is/fixes a bug triaged: OTC evaluated This issue/pr was triaged by OTC

Comments

@paulidale
Copy link
Contributor

From openssl-users:

Should these be posted here or as github issues? (May be user error)

  1. openssl genpkey -algorithm rsa -outform der -out key.der -quiet
    returns:
    genpkey: Option -quiet needs a value
    But the docs don't indicate that a value is needed.
  2. openssl genpkey -algorithm rsa -outform der -out key.der -text
    Docs say that the unencrypted key should be printed, but it isn't.
  3. openssl genpkey .... -cipher des3
    returns:
    genpkey: Use -help for summary.
    I tried other values for -cipher but none worked
  4. -aes-128-cbc works but is not documented
@paulidale paulidale added the triaged: bug The issue/pr is/fixes a bug label Aug 5, 2021
@paulidale paulidale added this to the 3.0.0 milestone Aug 5, 2021
@paulidale
Copy link
Contributor Author

  1. Confirmed this is a bug
  2. This is not a regression against 1.1., the text output is included in the .der file.
  3. -cipher isn't a valid option for the genpkey command: use -des3 as documented.
    1. It is documented, this is line in the -help output:

-* Cipher to use to encrypt the key

paulidale added a commit to paulidale/openssl that referenced this issue Aug 6, 2021
@kgold2
Copy link

kgold2 commented Aug 6, 2021

  1. It is surprising that -text appends text to a (binary) der file. All the previous commands sent the text to stdout (openssl pkey, rsa, x509, ...) As a minimum, change the man page "prints ... along with" to "prints ... into". I suggest that a print to stdout is more useful.
  2. Perhaps -cipher is not a valid option, but the man page at https://www.openssl.org/docs/manmaster/man1/openssl-genpkey.html says that it is. Maybe it's trying to say that the string 'cipher' should be replaced by the actual cipher? In that case, an example like -des3 would be helpful.
  3. -* isn't a commonly used idiom.

@kgold2
Copy link

kgold2 commented Aug 6, 2021

Paul suggested I add version info: This is the latest openssl master, pulled 5 August, running on Linux RHEL 6.7

@richsalz
Copy link
Contributor

richsalz commented Aug 6, 2021

Agreed that -* isn't used anywhere except in OpenSSL, but it is used in all programs/manpages where an argument is interpreted as a cipher or digest, etc.

@kgold2
Copy link

kgold2 commented Aug 6, 2021

-* is used in the help, but some man pages gave explicit examples. E.g., genrsa, ec. I just suggest an example, to help newbies who try "-cipher aes" rather than -aes.

@mattcaswell mattcaswell added the triaged: OTC evaluated This issue/pr was triaged by OTC label Aug 10, 2021
@mattcaswell mattcaswell removed this from the 3.0.0 milestone Aug 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triaged: bug The issue/pr is/fixes a bug triaged: OTC evaluated This issue/pr was triaged by OTC
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants