diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2014-02-28 17:23:54 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2014-03-01 23:14:08 +0000 |
commit | b60272b01fcb4f69201b3e1659b4f7e9e9298dfb (patch) | |
tree | fb0d3ea959e82f5e6f2f0e74c9bacfa677ca0dd3 /apps | |
parent | 124d218889dfca33d277404612f1319afe04107e (diff) |
PKCS#8 support for alternative PRFs.
Add option to set an alternative to the default hmacWithSHA1 PRF
for PKCS#8 private key encryptions. This is used automatically
by PKCS8_encrypt if the nid specified is a PRF.
Add option to pkcs8 utility.
Update docs.
Diffstat (limited to 'apps')
-rw-r--r-- | apps/pkcs8.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/apps/pkcs8.c b/apps/pkcs8.c index 7edeb179dd..dc9e1ef66f 100644 --- a/apps/pkcs8.c +++ b/apps/pkcs8.c @@ -135,6 +135,22 @@ int MAIN(int argc, char **argv) else badarg = 1; } + else if (!strcmp(*args,"-v2prf")) + { + if (args[1]) + { + args++; + pbe_nid=OBJ_txt2nid(*args); + if (!EVP_PBE_find(EVP_PBE_TYPE_PRF, pbe_nid, NULL, NULL, 0)) + { + BIO_printf(bio_err, + "Unknown PRF algorithm %s\n", *args); + badarg = 1; + } + } + else + badarg = 1; + } else if (!strcmp(*args,"-inform")) { if (args[1]) |