summaryrefslogtreecommitdiff
path: root/ssh-keygen.c
diff options
context:
space:
mode:
Diffstat (limited to 'ssh-keygen.c')
-rw-r--r--ssh-keygen.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/ssh-keygen.c b/ssh-keygen.c
index f7e284062..5765cff08 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-keygen.c,v 1.171 2008/07/13 21:22:52 sthen Exp $ */ 1/* $OpenBSD: ssh-keygen.c,v 1.173 2009/02/21 19:32:04 tobias Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -135,7 +135,7 @@ ask_filename(struct passwd *pw, const char *prompt)
135 name = _PATH_SSH_CLIENT_ID_RSA; 135 name = _PATH_SSH_CLIENT_ID_RSA;
136 break; 136 break;
137 default: 137 default:
138 fprintf(stderr, "bad key type"); 138 fprintf(stderr, "bad key type\n");
139 exit(1); 139 exit(1);
140 break; 140 break;
141 } 141 }
@@ -421,7 +421,7 @@ do_convert_from_ssh2(struct passwd *pw)
421 PEM_write_RSAPrivateKey(stdout, k->rsa, NULL, NULL, 0, NULL, NULL)) : 421 PEM_write_RSAPrivateKey(stdout, k->rsa, NULL, NULL, 0, NULL, NULL)) :
422 key_write(k, stdout); 422 key_write(k, stdout);
423 if (!ok) { 423 if (!ok) {
424 fprintf(stderr, "key write failed"); 424 fprintf(stderr, "key write failed\n");
425 exit(1); 425 exit(1);
426 } 426 }
427 key_free(k); 427 key_free(k);
@@ -1015,11 +1015,11 @@ do_change_comment(struct passwd *pw)
1015 } 1015 }
1016 f = fdopen(fd, "w"); 1016 f = fdopen(fd, "w");
1017 if (f == NULL) { 1017 if (f == NULL) {
1018 printf("fdopen %s failed", identity_file); 1018 printf("fdopen %s failed\n", identity_file);
1019 exit(1); 1019 exit(1);
1020 } 1020 }
1021 if (!key_write(public, f)) 1021 if (!key_write(public, f))
1022 fprintf(stderr, "write key failed"); 1022 fprintf(stderr, "write key failed\n");
1023 key_free(public); 1023 key_free(public);
1024 fprintf(f, " %s\n", new_comment); 1024 fprintf(f, " %s\n", new_comment);
1025 fclose(f); 1025 fclose(f);
@@ -1366,7 +1366,7 @@ main(int argc, char **argv)
1366 printf("Generating public/private %s key pair.\n", key_type_name); 1366 printf("Generating public/private %s key pair.\n", key_type_name);
1367 private = key_generate(type, bits); 1367 private = key_generate(type, bits);
1368 if (private == NULL) { 1368 if (private == NULL) {
1369 fprintf(stderr, "key_generate failed"); 1369 fprintf(stderr, "key_generate failed\n");
1370 exit(1); 1370 exit(1);
1371 } 1371 }
1372 public = key_from_private(private); 1372 public = key_from_private(private);
@@ -1426,7 +1426,7 @@ passphrase_again:
1426 if (identity_comment) { 1426 if (identity_comment) {
1427 strlcpy(comment, identity_comment, sizeof(comment)); 1427 strlcpy(comment, identity_comment, sizeof(comment));
1428 } else { 1428 } else {
1429 /* Create default commend field for the passphrase. */ 1429 /* Create default comment field for the passphrase. */
1430 snprintf(comment, sizeof comment, "%s@%s", pw->pw_name, hostname); 1430 snprintf(comment, sizeof comment, "%s@%s", pw->pw_name, hostname);
1431 } 1431 }
1432 1432
@@ -1456,11 +1456,11 @@ passphrase_again:
1456 } 1456 }
1457 f = fdopen(fd, "w"); 1457 f = fdopen(fd, "w");
1458 if (f == NULL) { 1458 if (f == NULL) {
1459 printf("fdopen %s failed", identity_file); 1459 printf("fdopen %s failed\n", identity_file);
1460 exit(1); 1460 exit(1);
1461 } 1461 }
1462 if (!key_write(public, f)) 1462 if (!key_write(public, f))
1463 fprintf(stderr, "write key failed"); 1463 fprintf(stderr, "write key failed\n");
1464 fprintf(f, " %s\n", comment); 1464 fprintf(f, " %s\n", comment);
1465 fclose(f); 1465 fclose(f);
1466 1466