You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-g option is incoherent with --identifier option it represent. Changed
to -a as plenty of unix tools use it when displaying all information.
Also removed double space and indented a block of code for linting.
Change-Id: I1de7355da1f47b5ea1200d3dd4fe3373091e7403
" -h, --help Display this help message and then exit.\n"
201
-
" -v, --version Show the version of the program.\n"
202
-
" -p, --privatekey Provide the path to the private key as an argument.\n"
203
-
" -c, --certificate Provide the path to the certificate as an argument.\n"
204
-
" -o, --output Provide the path where the generated certificate should be saved as an argument.\n"
205
-
" -g, --identifier Display the user identifier.\n"
206
-
" -n, --name Provide the name of the certificate to be generated.\n"
207
-
" -s, --setup Create an CA and a certificate.\n"
208
-
" -i, --interactive Interactively create and setup identities.\n");
200
+
" -h, --help Display this help message and then exit.\n"
201
+
" -v, --version Show the version of the program.\n"
202
+
" -p, --privatekey [PATH] Provide the path to the private key as an argument.\n"
203
+
" -c, --certificate [PATH] Provide the path to the certificate as an argument.\n"
204
+
" -o, --output [FOLDER] Provide the path where the generated certificate should be saved as an argument.\n"
205
+
" -a, --identifier Display the user identifier.\n"
206
+
" -n, --name [NAME] Provide the name of the certificate to be generated.\n"
207
+
" -s, --setup Create an CA and a certificate.\n"
208
+
" -i, --interactive Interactively create and setup identities.\n");
209
209
return EXIT_SUCCESS;
210
210
}
211
211
@@ -216,7 +216,7 @@ main(int argc, char** argv)
216
216
// check if the public key id is requested
217
217
if (params.pkid) {
218
218
if (params.ca.empty() || params.privatekey.empty()) {
219
-
fmt::print(stderr, "Error: The path to the private key and the certificate is not provided.\n Please specify the path for the private key and the certificate using the -p and -c options.\n");
219
+
fmt::print(stderr, "Error: The path to the private key and the certificate is not provided.\n Please specify the path for the private key and the certificate using the -p and -c options.\n");
220
220
exit(EXIT_FAILURE);
221
221
}
222
222
auto identity = dhtnet::loadIdentity(params.privatekey, params.ca);
@@ -362,8 +362,8 @@ main(int argc, char** argv)
362
362
auto ca = dhtnet::generateIdentity(params.id, "ca");
363
363
fmt::print("Generated certificate in {}: {} {}\n", params.id, "ca", ca.second->getId());
364
364
}else{
365
-
auto ca = dhtnet::generateIdentity(params.id, params.name);
366
-
fmt::print("Generated certificate in {}: {} {}\n", params.id, params.name, ca.second->getId());
365
+
auto ca = dhtnet::generateIdentity(params.id, params.name);
366
+
fmt::print("Generated certificate in {}: {} {}\n", params.id, params.name, ca.second->getId());
367
367
}
368
368
}else{
369
369
auto ca = dhtnet::loadIdentity(params.privatekey, params.ca);
0 commit comments