diff options
author | Tomas Mraz <tomas@openssl.org> | 2021-04-30 16:57:53 +0200 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2021-05-06 11:43:32 +0100 |
commit | d382e79632677f2457025be3d820e08d7ea12d85 (patch) | |
tree | 3a429b630ec1cce9656ee67434324c6930c677f4 /apps/rsa.c | |
parent | b86fa8c55682169c88e14e616170d6caeb208865 (diff) | |
download | openssl-new-d382e79632677f2457025be3d820e08d7ea12d85.tar.gz |
Make the -inform option to be respected if possible
Add OSSL_STORE_PARAM_INPUT_TYPE and make it possible to be
set when OSSL_STORE_open_ex() or OSSL_STORE_attach() is called.
The input type format is enforced only in case the file
type file store is used.
By default we use FORMAT_UNDEF meaning the input type
is not enforced.
Fixes #14569
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15100)
Diffstat (limited to 'apps/rsa.c')
-rw-r--r-- | apps/rsa.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/rsa.c b/apps/rsa.c index 0ff6cf3266..83fd8350df 100644 --- a/apps/rsa.c +++ b/apps/rsa.c @@ -96,7 +96,7 @@ int rsa_main(int argc, char **argv) char *infile = NULL, *outfile = NULL, *ciphername = NULL, *prog; char *passin = NULL, *passout = NULL, *passinarg = NULL, *passoutarg = NULL; int private = 0; - int informat = FORMAT_PEM, outformat = FORMAT_PEM, text = 0, check = 0; + int informat = FORMAT_UNDEF, outformat = FORMAT_PEM, text = 0, check = 0; int noout = 0, modulus = 0, pubin = 0, pubout = 0, ret = 1; int pvk_encr = DEFAULT_PVK_ENCR_STRENGTH; OPTION_CHOICE o; @@ -204,7 +204,7 @@ int rsa_main(int argc, char **argv) } if (pubin) { - int tmpformat = -1; + int tmpformat = FORMAT_UNDEF; if (pubin == 2) { if (informat == FORMAT_PEM) |