diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2021-01-06 12:12:25 +0100 |
---|---|---|
committer | Dr. David von Oheimb <dev@ddvo.net> | 2021-01-13 11:53:15 +0100 |
commit | 0ae8d4ca9e2db5fd93683dbc42d28c2eba18045d (patch) | |
tree | ee05741e90baf7940e6ae396fa4f50fe84b319f8 /apps/req.c | |
parent | 73b1d24c1abfdf0c890b4461c3d07b8bff45844c (diff) | |
download | openssl-0ae8d4ca9e2db5fd93683dbc42d28c2eba18045d.tar.gz |
apps/req.c: Cosmetic improvements of code and documentation
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/13658)
Diffstat (limited to 'apps/req.c')
-rw-r--r-- | apps/req.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/apps/req.c b/apps/req.c index 5663eebc45..3aef8882a8 100644 --- a/apps/req.c +++ b/apps/req.c @@ -437,7 +437,8 @@ int req_main(int argc, char **argv) break; case OPT_COPY_EXTENSIONS: if (!set_ext_copy(&ext_copy, opt_arg())) { - BIO_printf(bio_err, "Invalid extension copy option: \"%s\"\n", opt_arg()); + BIO_printf(bio_err, "Invalid extension copy option: \"%s\"\n", + opt_arg()); goto end; } break; @@ -837,13 +838,12 @@ int req_main(int argc, char **argv) goto end; if (!pub_key || !X509_set_pubkey(new_x509, pub_key)) goto end; - if (ext_copy == EXT_COPY_UNSET) + if (ext_copy == EXT_COPY_UNSET) { BIO_printf(bio_err, "Warning: No -copy_extensions given; ignoring any extensions in the request\n"); - else if (!copy_extensions(new_x509, req, ext_copy)) { + } else if (!copy_extensions(new_x509, req, ext_copy)) { BIO_printf(bio_err, "Error copying extensions from request\n"); goto end; } - /* TODO: (optionally) copy X.509 extensions from req */ /* Set up V3 context struct */ X509V3_set_ctx(&ext_ctx, CAcert != NULL ? CAcert : new_x509, @@ -1116,8 +1116,7 @@ static int make_REQ(X509_REQ *req, EVP_PKEY *pkey, X509_NAME *fsubj, } } - /* tentatively set X.509 version 1 */ - if (!X509_REQ_set_version(req, 0L)) + if (!X509_REQ_set_version(req, 0L)) /* so far there is only version 1 */ goto err; if (fsubj != NULL) |