diff options
Diffstat (limited to 'apps/pkcs8.c')
-rw-r--r-- | apps/pkcs8.c | 44 |
1 files changed, 3 insertions, 41 deletions
diff --git a/apps/pkcs8.c b/apps/pkcs8.c index 0968fef946..8a4d5423d1 100644 --- a/apps/pkcs8.c +++ b/apps/pkcs8.c @@ -67,7 +67,7 @@ typedef enum OPTION_choice { OPT_ERR = -1, OPT_EOF = 0, OPT_HELP, OPT_INFORM, OPT_OUTFORM, OPT_ENGINE, OPT_IN, OPT_OUT, - OPT_TOPK8, OPT_NOITER, OPT_NOCRYPT, OPT_NOOCT, OPT_NSDB, OPT_EMBED, + OPT_TOPK8, OPT_NOITER, OPT_NOCRYPT, #ifndef OPENSSL_NO_SCRYPT OPT_SCRYPT, OPT_SCRYPT_N, OPT_SCRYPT_R, OPT_SCRYPT_P, #endif @@ -83,10 +83,6 @@ OPTIONS pkcs8_options[] = { {"topk8", OPT_TOPK8, '-', "Output PKCS8 file"}, {"noiter", OPT_NOITER, '-', "Use 1 as iteration count"}, {"nocrypt", OPT_NOCRYPT, '-', "Use or expect unencrypted private key"}, - {"nooct", OPT_NOOCT, '-', "Use (nonstandard) no octet format"}, - {"nsdb", OPT_NSDB, '-', "Use (nonstandard) DSA Netscape DB format"}, - {"embed", OPT_EMBED, '-', - "Use (nonstandard) embedded DSA parameters format"}, {"v2", OPT_V2, 's', "Use PKCS#5 v2.0 and cipher"}, {"v1", OPT_V1, 's', "Use PKCS#5 v1.5 and cipher"}, {"v2prf", OPT_V2PRF, 's'}, @@ -117,7 +113,7 @@ int pkcs8_main(int argc, char **argv) char *passinarg = NULL, *passoutarg = NULL, *prog; char pass[50], *passin = NULL, *passout = NULL, *p8pass = NULL; OPTION_CHOICE o; - int nocrypt = 0, ret = 1, iter = PKCS12_DEFAULT_ITER, p8_broken = PKCS8_OK; + int nocrypt = 0, ret = 1, iter = PKCS12_DEFAULT_ITER; int informat = FORMAT_PEM, outformat = FORMAT_PEM, topk8 = 0, pbe_nid = -1; int private = 0; #ifndef OPENSSL_NO_SCRYPT @@ -159,15 +155,6 @@ int pkcs8_main(int argc, char **argv) case OPT_NOCRYPT: nocrypt = 1; break; - case OPT_NOOCT: - p8_broken = PKCS8_NO_OCTET; - break; - case OPT_NSDB: - p8_broken = PKCS8_NS_DB; - break; - case OPT_EMBED: - p8_broken = PKCS8_EMBEDDED_PARAM; - break; case OPT_V2: if (!opt_cipher(opt_arg(), &cipher)) goto opthelp; @@ -249,7 +236,7 @@ int pkcs8_main(int argc, char **argv) pkey = load_key(infile, informat, 1, passin, e, "key"); if (!pkey) goto end; - if ((p8inf = EVP_PKEY2PKCS8_broken(pkey, p8_broken)) == NULL) { + if ((p8inf = EVP_PKEY2PKCS8(pkey)) == NULL) { BIO_printf(bio_err, "Error converting key\n"); ERR_print_errors(bio_err); goto end; @@ -362,31 +349,6 @@ int pkcs8_main(int argc, char **argv) goto end; } - if (p8inf->broken) { - BIO_printf(bio_err, "Warning: broken key encoding: "); - switch (p8inf->broken) { - case PKCS8_NO_OCTET: - BIO_printf(bio_err, "No Octet String in PrivateKey\n"); - break; - - case PKCS8_EMBEDDED_PARAM: - BIO_printf(bio_err, "DSA parameters included in PrivateKey\n"); - break; - - case PKCS8_NS_DB: - BIO_printf(bio_err, "DSA public key include in PrivateKey\n"); - break; - - case PKCS8_NEG_PRIVKEY: - BIO_printf(bio_err, "DSA private key value is negative\n"); - break; - - default: - BIO_printf(bio_err, "Unknown broken type\n"); - break; - } - } - assert(private); if (outformat == FORMAT_PEM) PEM_write_bio_PrivateKey(out, pkey, NULL, NULL, 0, NULL, passout); |