diff options
Diffstat (limited to 'contrib/bind9/bin/dnssec/dnssec-keygen.c')
-rw-r--r-- | contrib/bind9/bin/dnssec/dnssec-keygen.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/contrib/bind9/bin/dnssec/dnssec-keygen.c b/contrib/bind9/bin/dnssec/dnssec-keygen.c index f369326..9a93ee3 100644 --- a/contrib/bind9/bin/dnssec/dnssec-keygen.c +++ b/contrib/bind9/bin/dnssec/dnssec-keygen.c @@ -1,5 +1,5 @@ /* - * Portions Copyright (C) 2004-2010 Internet Systems Consortium, Inc. ("ISC") + * Portions Copyright (C) 2004-2011 Internet Systems Consortium, Inc. ("ISC") * Portions Copyright (C) 1999-2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -29,7 +29,7 @@ * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dnssec-keygen.c,v 1.115 2010-12-23 04:07:59 marka Exp $ */ +/* $Id: dnssec-keygen.c,v 1.115.14.2 2011-03-12 04:59:14 tbox Exp $ */ /*! \file */ @@ -975,12 +975,15 @@ main(int argc, char **argv) { if (verbose > 0) { isc_buffer_clear(&buf); - dst_key_buildfilename(key, 0, directory, &buf); - fprintf(stderr, - "%s: %s already exists, or might " - "collide with another key upon " - "revokation. Generating a new key\n", - program, filename); + ret = dst_key_buildfilename(key, 0, + directory, &buf); + if (ret == ISC_R_SUCCESS) + fprintf(stderr, + "%s: %s already exists, or " + "might collide with another " + "key upon revokation. " + "Generating a new key\n", + program, filename); } dst_key_free(&key); @@ -1001,6 +1004,9 @@ main(int argc, char **argv) { isc_buffer_clear(&buf); ret = dst_key_buildfilename(key, 0, NULL, &buf); + if (ret != ISC_R_SUCCESS) + fatal("dst_key_buildfilename returned: %s\n", + isc_result_totext(ret)); printf("%s\n", filename); dst_key_free(&key); if (prevkey != NULL) |