summaryrefslogtreecommitdiff
path: root/ssh-keygen.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-04-16 02:00:02 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-04-16 02:00:02 +0000
commit15f33866a6fb9e67f2a89f5edc8b8c7635f6d984 (patch)
tree71e6283773761cceccd9bca3341348f6a073d333 /ssh-keygen.c
parent897741eeaa0ebb5e2ce10a6b0ada8f3e55d22777 (diff)
- markus@cvs.openbsd.org 2001/04/15 16:58:03
[authfile.c ssh-keygen.c sshd.c] don't use errno for key_{load,save}_private; discussion w/ solar@openwall
Diffstat (limited to 'ssh-keygen.c')
-rw-r--r--ssh-keygen.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/ssh-keygen.c b/ssh-keygen.c
index 0469ca5b6..d4ba23a4b 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -12,7 +12,7 @@
12 */ 12 */
13 13
14#include "includes.h" 14#include "includes.h"
15RCSID("$OpenBSD: ssh-keygen.c,v 1.55 2001/04/05 10:42:54 markus Exp $"); 15RCSID("$OpenBSD: ssh-keygen.c,v 1.56 2001/04/15 16:58:03 markus Exp $");
16 16
17#include <openssl/evp.h> 17#include <openssl/evp.h>
18#include <openssl/pem.h> 18#include <openssl/pem.h>
@@ -512,8 +512,7 @@ do_change_passphrase(struct passwd *pw)
512 512
513 /* Save the file using the new passphrase. */ 513 /* Save the file using the new passphrase. */
514 if (!key_save_private(private, identity_file, passphrase1, comment)) { 514 if (!key_save_private(private, identity_file, passphrase1, comment)) {
515 printf("Saving the key failed: %s: %s.\n", 515 printf("Saving the key failed: %s.\n", identity_file);
516 identity_file, strerror(errno));
517 memset(passphrase1, 0, strlen(passphrase1)); 516 memset(passphrase1, 0, strlen(passphrase1));
518 xfree(passphrase1); 517 xfree(passphrase1);
519 key_free(private); 518 key_free(private);
@@ -591,8 +590,7 @@ do_change_comment(struct passwd *pw)
591 590
592 /* Save the file using the new passphrase. */ 591 /* Save the file using the new passphrase. */
593 if (!key_save_private(private, identity_file, passphrase, new_comment)) { 592 if (!key_save_private(private, identity_file, passphrase, new_comment)) {
594 printf("Saving the key failed: %s: %s.\n", 593 printf("Saving the key failed: %s.\n", identity_file);
595 identity_file, strerror(errno));
596 memset(passphrase, 0, strlen(passphrase)); 594 memset(passphrase, 0, strlen(passphrase));
597 xfree(passphrase); 595 xfree(passphrase);
598 key_free(private); 596 key_free(private);
@@ -838,8 +836,7 @@ passphrase_again:
838 836
839 /* Save the key with the given passphrase and comment. */ 837 /* Save the key with the given passphrase and comment. */
840 if (!key_save_private(private, identity_file, passphrase1, comment)) { 838 if (!key_save_private(private, identity_file, passphrase1, comment)) {
841 printf("Saving the key failed: %s: %s.\n", 839 printf("Saving the key failed: %s.\n", identity_file);
842 identity_file, strerror(errno));
843 memset(passphrase1, 0, strlen(passphrase1)); 840 memset(passphrase1, 0, strlen(passphrase1));
844 xfree(passphrase1); 841 xfree(passphrase1);
845 exit(1); 842 exit(1);