Add option to read pkeyopts interactively
authorJohannes Bauer <joe@johannes-bauer.com>
Tue, 1 Aug 2017 17:38:32 +0000 (19:38 +0200)
committerRichard Levitte <levitte@openssl.org>
Sun, 18 Nov 2018 17:52:02 +0000 (18:52 +0100)
commit9d1bf5f7dee88e2fc1149be16256404265765894
tree98c6b6b17de813bd389aa29ef1e329c8607f8e90
parent6b956fe77b8aeb899ef7bdfa147a00bda51b804a
Add option to read pkeyopts interactively

This patch adds the ability to interactively enter passphrases for
the pkeyutl application. For example, you could use

$ openssl pkeyutl -kdf TLS1-PRF -kdflen 8 -pkeyopt md:md5
  -pkeyopt_passin secret -pkeyopt_passin seed

To have the "secret" and "seed" values read interactively from keyboard
(with hidden input). Alternatively, the pass phrase argument syntax is
also supported, e.g.:

$ openssl pkeyutl -kdf TLS1-PRF -kdflen 8 -pkeyopt md:md5
  -pkeyopt_passin secret:stdin -pkeyopt_passin seed:env:SEEDVAR

To have "secret" read from stdin and "seed" from the environment
variable SEEDVAR.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5697)
apps/pkeyutl.c