-/* $OpenBSD: ssh-keygen.c,v 1.172 2008/11/07 00:42:12 stevesk Exp $ */
+/* $OpenBSD: ssh-keygen.c,v 1.175 2009/08/27 17:33:49 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
name = _PATH_SSH_CLIENT_ID_RSA;
break;
default:
- fprintf(stderr, "bad key type");
+ fprintf(stderr, "bad key type\n");
exit(1);
break;
}
PEM_write_RSAPrivateKey(stdout, k->rsa, NULL, NULL, 0, NULL, NULL)) :
key_write(k, stdout);
if (!ok) {
- fprintf(stderr, "key write failed");
+ fprintf(stderr, "key write failed\n");
exit(1);
}
key_free(k);
public = key_load_public(identity_file, &comment);
if (public != NULL) {
fp = key_fingerprint(public, fptype, rep);
- ra = key_fingerprint(public, fptype, SSH_FP_RANDOMART);
+ ra = key_fingerprint(public, SSH_FP_MD5, SSH_FP_RANDOMART);
printf("%u %s %s (%s)\n", key_size(public), fp, comment,
key_type(public));
if (log_level >= SYSLOG_LEVEL_VERBOSE)
}
comment = *cp ? cp : comment;
fp = key_fingerprint(public, fptype, rep);
- ra = key_fingerprint(public, fptype, SSH_FP_RANDOMART);
+ ra = key_fingerprint(public, SSH_FP_MD5, SSH_FP_RANDOMART);
printf("%u %s %s (%s)\n", key_size(public), fp,
comment ? comment : "no comment", key_type(public));
if (log_level >= SYSLOG_LEVEL_VERBOSE)
fptype = print_bubblebabble ? SSH_FP_SHA1 : SSH_FP_MD5;
rep = print_bubblebabble ? SSH_FP_BUBBLEBABBLE : SSH_FP_HEX;
fp = key_fingerprint(public, fptype, rep);
- ra = key_fingerprint(public, fptype, SSH_FP_RANDOMART);
+ ra = key_fingerprint(public, SSH_FP_MD5, SSH_FP_RANDOMART);
printf("%u %s %s (%s)\n", key_size(public), fp, name,
key_type(public));
if (log_level >= SYSLOG_LEVEL_VERBOSE)
}
f = fdopen(fd, "w");
if (f == NULL) {
- printf("fdopen %s failed", identity_file);
+ printf("fdopen %s failed\n", identity_file);
exit(1);
}
if (!key_write(public, f))
- fprintf(stderr, "write key failed");
+ fprintf(stderr, "write key failed\n");
key_free(public);
fprintf(f, " %s\n", new_comment);
fclose(f);
printf("Generating public/private %s key pair.\n", key_type_name);
private = key_generate(type, bits);
if (private == NULL) {
- fprintf(stderr, "key_generate failed");
+ fprintf(stderr, "key_generate failed\n");
exit(1);
}
public = key_from_private(private);
}
f = fdopen(fd, "w");
if (f == NULL) {
- printf("fdopen %s failed", identity_file);
+ printf("fdopen %s failed\n", identity_file);
exit(1);
}
if (!key_write(public, f))
- fprintf(stderr, "write key failed");
+ fprintf(stderr, "write key failed\n");
fprintf(f, " %s\n", comment);
fclose(f);