Home | History | Annotate | Line # | Download | only in dst
      1 /*	$NetBSD: result.h,v 1.1 2024/02/18 20:57:39 christos Exp $	*/
      2 
      3 /*
      4  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
      5  *
      6  * SPDX-License-Identifier: MPL-2.0
      7  *
      8  * This Source Code Form is subject to the terms of the Mozilla Public
      9  * License, v. 2.0.  If a copy of the MPL was not distributed with this
     10  * file, you can obtain one at https://mozilla.org/MPL/2.0/.
     11  *
     12  * See the COPYRIGHT file distributed with this work for additional
     13  * information regarding copyright ownership.
     14  */
     15 
     16 #ifndef DST_RESULT_H
     17 #define DST_RESULT_H 1
     18 
     19 /*! \file dst/result.h */
     20 
     21 #include <isc/lang.h>
     22 #include <isc/resultclass.h>
     23 
     24 /*
     25  * Nothing in this file truly depends on <isc/result.h>, but the
     26  * DST result codes are considered to be publicly derived from
     27  * the ISC result codes, so including this file buys you the ISC_R_
     28  * namespace too.
     29  */
     30 #include <isc/result.h> /* Contractual promise. */
     31 
     32 #define DST_R_UNSUPPORTEDALG (ISC_RESULTCLASS_DST + 0)
     33 #define DST_R_CRYPTOFAILURE  (ISC_RESULTCLASS_DST + 1)
     34 /* compat */
     35 #define DST_R_OPENSSLFAILURE	DST_R_CRYPTOFAILURE
     36 #define DST_R_NOCRYPTO		(ISC_RESULTCLASS_DST + 2)
     37 #define DST_R_NULLKEY		(ISC_RESULTCLASS_DST + 3)
     38 #define DST_R_INVALIDPUBLICKEY	(ISC_RESULTCLASS_DST + 4)
     39 #define DST_R_INVALIDPRIVATEKEY (ISC_RESULTCLASS_DST + 5)
     40 /* 6 is unused */
     41 #define DST_R_WRITEERROR   (ISC_RESULTCLASS_DST + 7)
     42 #define DST_R_INVALIDPARAM (ISC_RESULTCLASS_DST + 8)
     43 /* 9 is unused */
     44 /* 10 is unused */
     45 #define DST_R_SIGNFAILURE (ISC_RESULTCLASS_DST + 11)
     46 /* 12 is unused */
     47 /* 13 is unused */
     48 #define DST_R_VERIFYFAILURE	     (ISC_RESULTCLASS_DST + 14)
     49 #define DST_R_NOTPUBLICKEY	     (ISC_RESULTCLASS_DST + 15)
     50 #define DST_R_NOTPRIVATEKEY	     (ISC_RESULTCLASS_DST + 16)
     51 #define DST_R_KEYCANNOTCOMPUTESECRET (ISC_RESULTCLASS_DST + 17)
     52 #define DST_R_COMPUTESECRETFAILURE   (ISC_RESULTCLASS_DST + 18)
     53 #define DST_R_NORANDOMNESS	     (ISC_RESULTCLASS_DST + 19)
     54 #define DST_R_BADKEYTYPE	     (ISC_RESULTCLASS_DST + 20)
     55 #define DST_R_NOENGINE		     (ISC_RESULTCLASS_DST + 21)
     56 #define DST_R_EXTERNALKEY	     (ISC_RESULTCLASS_DST + 22)
     57 
     58 #define DST_R_NRESULTS 23 /* Number of results */
     59 
     60 ISC_LANG_BEGINDECLS
     61 
     62 const char *dst_result_totext(isc_result_t);
     63 
     64 void
     65 dst_result_register(void);
     66 
     67 ISC_LANG_ENDDECLS
     68 
     69 #endif /* DST_RESULT_H */
     70