-/* $OpenBSD: ssh-keygen.c,v 1.253 2015/01/16 06:40:12 deraadt Exp $ */
+/* $OpenBSD: ssh-keygen.c,v 1.254 2015/01/16 15:55:07 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
first = 0;
continue;
}
- if (!sshkey_write(public, f)) {
- fprintf(stderr, "write key failed\n");
+ if ((r = sshkey_write(public, f)) != 0) {
+ fprintf(stderr, "write key failed: %s\n", ssh_err(r));
fclose(f);
sshkey_free(public);
first = 0;