projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dtlsv1listentest includes e_os.h, reflect that in include dirs
[oweals/openssl.git]
/
apps
/
pkcs8.c
diff --git
a/apps/pkcs8.c
b/apps/pkcs8.c
index b120b93aa9c3da7adb8b4e9571e6e37f13fd78d2..5db78fc216d3b46527077f99cc0664cc994f2ded 100644
(file)
--- a/
apps/pkcs8.c
+++ b/
apps/pkcs8.c
@@
-121,7
+121,7
@@
int pkcs8_main(int argc, char **argv)
int informat = FORMAT_PEM, outformat = FORMAT_PEM, topk8 = 0, pbe_nid = -1;
int private = 0;
#ifndef OPENSSL_NO_SCRYPT
int informat = FORMAT_PEM, outformat = FORMAT_PEM, topk8 = 0, pbe_nid = -1;
int private = 0;
#ifndef OPENSSL_NO_SCRYPT
-
unsigned
long scrypt_N = 0, scrypt_r = 0, scrypt_p = 0;
+ long scrypt_N = 0, scrypt_r = 0, scrypt_p = 0;
#endif
prog = opt_init(argc, argv, pkcs8_options);
#endif
prog = opt_init(argc, argv, pkcs8_options);
@@
-210,15
+210,15
@@
int pkcs8_main(int argc, char **argv)
cipher = EVP_aes_256_cbc();
break;
case OPT_SCRYPT_N:
cipher = EVP_aes_256_cbc();
break;
case OPT_SCRYPT_N:
- if (!opt_
ulong(opt_arg(), &scrypt_N)
)
+ if (!opt_
long(opt_arg(), &scrypt_N) || scrypt_N <= 0
)
goto opthelp;
break;
case OPT_SCRYPT_R:
goto opthelp;
break;
case OPT_SCRYPT_R:
- if (!opt_
ulong(opt_arg(), &scrypt_r)
)
+ if (!opt_
long(opt_arg(), &scrypt_r) || scrypt_r <= 0
)
goto opthelp;
break;
case OPT_SCRYPT_P:
goto opthelp;
break;
case OPT_SCRYPT_P:
- if (!opt_
ulong(opt_arg(), &scrypt_p)
)
+ if (!opt_
long(opt_arg(), &scrypt_p) || scrypt_p <= 0
)
goto opthelp;
break;
#endif
goto opthelp;
break;
#endif
@@
-233,16
+233,13
@@
int pkcs8_main(int argc, char **argv)
goto end;
}
goto end;
}
- if (!app_load_modules(NULL))
- goto end;
-
if ((pbe_nid == -1) && !cipher)
pbe_nid = NID_pbeWithMD5AndDES_CBC;
if ((pbe_nid == -1) && !cipher)
pbe_nid = NID_pbeWithMD5AndDES_CBC;
- in = bio_open_default(infile,
"rb"
);
+ in = bio_open_default(infile,
'r', informat
);
if (in == NULL)
goto end;
if (in == NULL)
goto end;
- out = bio_open_owner(outfile,
"wb"
, private);
+ out = bio_open_owner(outfile,
outformat
, private);
if (out == NULL)
goto end;
if (out == NULL)
goto end;