summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorinoguchi <>2019-07-16 12:50:30 +0000
committerinoguchi <>2019-07-16 12:50:30 +0000
commit744668b82ff00e90df639e26eca6530ebec0ed4d (patch)
treef4abf461b77415fdc904b9f2936eb47a18a1ee2c
parentf72df1c13ac4c3efe17fdd738c39c6938998e292 (diff)
downloadopenbsd-744668b82ff00e90df639e26eca6530ebec0ed4d.tar.gz
openbsd-744668b82ff00e90df639e26eca6530ebec0ed4d.tar.bz2
openbsd-744668b82ff00e90df639e26eca6530ebec0ed4d.zip
Fix long line by wrapping with 80 chars
-rw-r--r--src/usr.bin/openssl/genrsa.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/usr.bin/openssl/genrsa.c b/src/usr.bin/openssl/genrsa.c
index d7cd6b0528..002842b04b 100644
--- a/src/usr.bin/openssl/genrsa.c
+++ b/src/usr.bin/openssl/genrsa.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: genrsa.c,v 1.15 2019/07/14 03:30:46 guenther Exp $ */ 1/* $OpenBSD: genrsa.c,v 1.16 2019/07/16 12:50:30 inoguchi Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -305,12 +305,14 @@ genrsa_main(int argc, char **argv)
305 goto err; 305 goto err;
306 } 306 }
307 307
308 if ((numbits != NULL) && ((sscanf(numbits, "%d", &num) == 0) || (num < 0))) { 308 if ((numbits != NULL) &&
309 ((sscanf(numbits, "%d", &num) == 0) || (num < 0))) {
309 genrsa_usage(); 310 genrsa_usage();
310 goto err; 311 goto err;
311 } 312 }
312 313
313 if (!app_passwd(bio_err, NULL, genrsa_config.passargout, NULL, &passout)) { 314 if (!app_passwd(bio_err, NULL, genrsa_config.passargout, NULL,
315 &passout)) {
314 BIO_printf(bio_err, "Error getting password\n"); 316 BIO_printf(bio_err, "Error getting password\n");
315 goto err; 317 goto err;
316 } 318 }
@@ -330,7 +332,8 @@ genrsa_main(int argc, char **argv)
330 if (!rsa) 332 if (!rsa)
331 goto err; 333 goto err;
332 334
333 if (!BN_set_word(bn, genrsa_config.f4) || !RSA_generate_key_ex(rsa, num, bn, &cb)) 335 if (!BN_set_word(bn, genrsa_config.f4) ||
336 !RSA_generate_key_ex(rsa, num, bn, &cb))
334 goto err; 337 goto err;
335 338
336 /* 339 /*
@@ -350,8 +353,8 @@ genrsa_main(int argc, char **argv)
350 PW_CB_DATA cb_data; 353 PW_CB_DATA cb_data;
351 cb_data.password = passout; 354 cb_data.password = passout;
352 cb_data.prompt_info = genrsa_config.outfile; 355 cb_data.prompt_info = genrsa_config.outfile;
353 if (!PEM_write_bio_RSAPrivateKey(out, rsa, genrsa_config.enc, NULL, 0, 356 if (!PEM_write_bio_RSAPrivateKey(out, rsa, genrsa_config.enc,
354 password_callback, &cb_data)) 357 NULL, 0, password_callback, &cb_data))
355 goto err; 358 goto err;
356 } 359 }
357 360