diff options
Diffstat (limited to 'src/pki/commands/req.c')
-rw-r--r-- | src/pki/commands/req.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/pki/commands/req.c b/src/pki/commands/req.c index d90ddc251..628463e7b 100644 --- a/src/pki/commands/req.c +++ b/src/pki/commands/req.c @@ -116,8 +116,12 @@ static int req() } else { + chunk_t chunk; + + chunk = chunk_from_fd(0); private = lib->creds->create(lib->creds, CRED_PRIVATE_KEY, type, - BUILD_FROM_FD, 0, BUILD_END); + BUILD_BLOB, chunk, BUILD_END); + free(chunk.ptr); } if (!private) { @@ -174,9 +178,8 @@ static void __attribute__ ((constructor))reg() command_register((command_t) { req, 'r', "req", "create a PKCS#10 certificate request", - {"[--in file] [--type rsa|ecdsa]", - " --dn distinguished-name [--san subjectAltName]+", - "[--password challengePassword]", + {" [--in file] [--type rsa|ecdsa] --dn distinguished-name", + "[--san subjectAltName]+ [--password challengePassword]", "[--digest md5|sha1|sha224|sha256|sha384|sha512] [--outform der|pem]"}, { {"help", 'h', 0, "show usage information"}, |