mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-02 15:45:25 +00:00
Improve error messages printed by dnssec tools when compiled
without crypto support (patch from Olafur)
This commit is contained in:
@@ -17,7 +17,7 @@
|
|||||||
* PERFORMANCE OF THIS SOFTWARE.
|
* 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>
|
#include <config.h>
|
||||||
|
|
||||||
@@ -40,7 +40,6 @@
|
|||||||
#include <dns/secalg.h>
|
#include <dns/secalg.h>
|
||||||
|
|
||||||
#include <dst/dst.h>
|
#include <dst/dst.h>
|
||||||
#include <dst/result.h>
|
|
||||||
|
|
||||||
#include "dnssectool.h"
|
#include "dnssectool.h"
|
||||||
|
|
||||||
@@ -331,7 +330,7 @@ main(int argc, char **argv) {
|
|||||||
dns_name_format(name, namestr, sizeof(namestr));
|
dns_name_format(name, namestr, sizeof(namestr));
|
||||||
alg_format(alg, algstr, sizeof(algstr));
|
alg_format(alg, algstr, sizeof(algstr));
|
||||||
fatal("failed to generate key %s/%s: %s\n",
|
fatal("failed to generate key %s/%s: %s\n",
|
||||||
namestr, algstr, dst_result_totext(ret));
|
namestr, algstr, isc_result_totext(ret));
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
* PERFORMANCE OF THIS SOFTWARE.
|
* 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>
|
#include <config.h>
|
||||||
|
|
||||||
@@ -200,7 +200,8 @@ main(int argc, char *argv[]) {
|
|||||||
eflags |= ISC_ENTROPY_GOODONLY;
|
eflags |= ISC_ENTROPY_GOODONLY;
|
||||||
result = dst_lib_init(mctx, ectx, eflags);
|
result = dst_lib_init(mctx, ectx, eflags);
|
||||||
if (result != ISC_R_SUCCESS)
|
if (result != ISC_R_SUCCESS)
|
||||||
fatal("could not initialize dst");
|
fatal("could not initialize dst: %s",
|
||||||
|
isc_result_totext(result));
|
||||||
|
|
||||||
isc_stdtime_get(&now);
|
isc_stdtime_get(&now);
|
||||||
|
|
||||||
@@ -235,7 +236,8 @@ main(int argc, char *argv[]) {
|
|||||||
result = dst_key_fromnamedfile(argv[i], DST_TYPE_PUBLIC,
|
result = dst_key_fromnamedfile(argv[i], DST_TYPE_PUBLIC,
|
||||||
mctx, &key);
|
mctx, &key);
|
||||||
if (result != ISC_R_SUCCESS)
|
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)
|
if (rdclass == 0)
|
||||||
rdclass = dst_key_class(key);
|
rdclass = dst_key_class(key);
|
||||||
|
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
* PERFORMANCE OF THIS SOFTWARE.
|
* 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>
|
#include <config.h>
|
||||||
|
|
||||||
@@ -241,7 +241,8 @@ main(int argc, char *argv[]) {
|
|||||||
eflags |= ISC_ENTROPY_GOODONLY;
|
eflags |= ISC_ENTROPY_GOODONLY;
|
||||||
result = dst_lib_init(mctx, ectx, eflags);
|
result = dst_lib_init(mctx, ectx, eflags);
|
||||||
if (result != ISC_R_SUCCESS)
|
if (result != ISC_R_SUCCESS)
|
||||||
fatal("could not initialize dst");
|
fatal("could not initialize dst: %s",
|
||||||
|
isc_result_totext(result));
|
||||||
|
|
||||||
isc_stdtime_get(&now);
|
isc_stdtime_get(&now);
|
||||||
|
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
* PERFORMANCE OF THIS SOFTWARE.
|
* 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>
|
#include <config.h>
|
||||||
|
|
||||||
@@ -58,7 +58,6 @@
|
|||||||
#include <dns/time.h>
|
#include <dns/time.h>
|
||||||
|
|
||||||
#include <dst/dst.h>
|
#include <dst/dst.h>
|
||||||
#include <dst/result.h>
|
|
||||||
|
|
||||||
#include "dnssectool.h"
|
#include "dnssectool.h"
|
||||||
|
|
||||||
@@ -493,7 +492,8 @@ hasnullkey(dns_rdataset_t *rdataset) {
|
|||||||
result = dns_dnssec_keyfromrdata(dns_rootname,
|
result = dns_dnssec_keyfromrdata(dns_rootname,
|
||||||
&rdata, mctx, &key);
|
&rdata, mctx, &key);
|
||||||
if (result != ISC_R_SUCCESS)
|
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)) {
|
if (dst_key_isnullkey(key)) {
|
||||||
dst_key_free(&key);
|
dst_key_free(&key);
|
||||||
return (ISC_TRUE);
|
return (ISC_TRUE);
|
||||||
@@ -1680,7 +1680,8 @@ main(int argc, char *argv[]) {
|
|||||||
DST_TYPE_PRIVATE,
|
DST_TYPE_PRIVATE,
|
||||||
mctx, &newkey);
|
mctx, &newkey);
|
||||||
if (result != ISC_R_SUCCESS)
|
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);
|
key = ISC_LIST_HEAD(keylist);
|
||||||
while (key != NULL) {
|
while (key != NULL) {
|
||||||
|
Reference in New Issue
Block a user