Commit 94ce9c52 authored by Andreas Gustafsson's avatar Andreas Gustafsson
Browse files

Improve error messages printed by dnssec tools when compiled

without crypto support (patch from Olafur)
parent ed2cefaf
......@@ -17,7 +17,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dnssec-keygen.c,v 1.55 2001/09/25 22:47:02 bwelling Exp $ */
/* $Id: dnssec-keygen.c,v 1.56 2001/10/04 23:48:13 gson Exp $ */
#include <config.h>
......@@ -40,7 +40,6 @@
#include <dns/secalg.h>
#include <dst/dst.h>
#include <dst/result.h>
#include "dnssectool.h"
......@@ -331,7 +330,7 @@ main(int argc, char **argv) {
dns_name_format(name, namestr, sizeof(namestr));
alg_format(alg, algstr, sizeof(algstr));
fatal("failed to generate key %s/%s: %s\n",
namestr, algstr, dst_result_totext(ret));
namestr, algstr, isc_result_totext(ret));
exit(-1);
}
......
......@@ -17,7 +17,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dnssec-makekeyset.c,v 1.57 2001/09/19 23:05:12 gson Exp $ */
/* $Id: dnssec-makekeyset.c,v 1.58 2001/10/04 23:48:14 gson Exp $ */
#include <config.h>
......@@ -200,7 +200,8 @@ main(int argc, char *argv[]) {
eflags |= ISC_ENTROPY_GOODONLY;
result = dst_lib_init(mctx, ectx, eflags);
if (result != ISC_R_SUCCESS)
fatal("could not initialize dst");
fatal("could not initialize dst: %s",
isc_result_totext(result));
isc_stdtime_get(&now);
......@@ -235,7 +236,8 @@ main(int argc, char *argv[]) {
result = dst_key_fromnamedfile(argv[i], DST_TYPE_PUBLIC,
mctx, &key);
if (result != ISC_R_SUCCESS)
fatal("error loading key from %s", argv[i]);
fatal("error loading key from %s: %s", argv[i],
isc_result_totext(result));
if (rdclass == 0)
rdclass = dst_key_class(key);
......
......@@ -17,7 +17,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dnssec-signkey.c,v 1.55 2001/09/21 00:16:57 bwelling Exp $ */
/* $Id: dnssec-signkey.c,v 1.56 2001/10/04 23:48:15 gson Exp $ */
#include <config.h>
......@@ -241,7 +241,8 @@ main(int argc, char *argv[]) {
eflags |= ISC_ENTROPY_GOODONLY;
result = dst_lib_init(mctx, ectx, eflags);
if (result != ISC_R_SUCCESS)
fatal("could not initialize dst");
fatal("could not initialize dst: %s",
isc_result_totext(result));
isc_stdtime_get(&now);
......
......@@ -17,7 +17,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dnssec-signzone.c,v 1.145 2001/09/21 00:16:59 bwelling Exp $ */
/* $Id: dnssec-signzone.c,v 1.146 2001/10/04 23:48:16 gson Exp $ */
#include <config.h>
......@@ -58,7 +58,6 @@
#include <dns/time.h>
#include <dst/dst.h>
#include <dst/result.h>
#include "dnssectool.h"
......@@ -493,7 +492,8 @@ hasnullkey(dns_rdataset_t *rdataset) {
result = dns_dnssec_keyfromrdata(dns_rootname,
&rdata, mctx, &key);
if (result != ISC_R_SUCCESS)
fatal("could not convert KEY into internal format");
fatal("could not convert KEY into internal "
"format: %s", isc_result_totext(result));
if (dst_key_isnullkey(key)) {
dst_key_free(&key);
return (ISC_TRUE);
......@@ -1680,7 +1680,8 @@ main(int argc, char *argv[]) {
DST_TYPE_PRIVATE,
mctx, &newkey);
if (result != ISC_R_SUCCESS)
fatal("cannot load key %s", argv[i]);
fatal("cannot load key %s: %s", argv[i],
isc_result_totext(result));
key = ISC_LIST_HEAD(keylist);
while (key != NULL) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment