summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorJakob Schlyter <jakob@cvs.openbsd.org>2010-01-15 19:24:55 +0000
committerJakob Schlyter <jakob@cvs.openbsd.org>2010-01-15 19:24:55 +0000
commit74f036e8be39ad211c751886c323451e9b337d8a (patch)
tree32df8fd0ba1f768fcd40bac9b13581cc4548c64d /usr.sbin
parentb0a2cdbb77af38008d6bcb38992d606d728a0255 (diff)
NSD v3.2.4
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/nsd/tsig-openssl.h6
-rw-r--r--usr.sbin/nsd/tsig.h19
2 files changed, 13 insertions, 12 deletions
diff --git a/usr.sbin/nsd/tsig-openssl.h b/usr.sbin/nsd/tsig-openssl.h
index c3c9b2359c8..30345b6596f 100644
--- a/usr.sbin/nsd/tsig-openssl.h
+++ b/usr.sbin/nsd/tsig-openssl.h
@@ -10,7 +10,7 @@
#ifndef _TSIG_OPENSSL_H_
#define _TSIG_OPENSSL_H_
-#if defined(HAVE_SSL)
+#if defined(TSIG) && defined(HAVE_SSL)
#include "region-allocator.h"
@@ -22,8 +22,8 @@
*/
int tsig_openssl_init(region_type *region);
-void tsig_openssl_finalize(void);
+void tsig_openssl_finalize();
-#endif /* defined(HAVE_SSL) */
+#endif /* defined(TSIG) && defined(HAVE_SSL) */
#endif /* _TSIG_H_ */
diff --git a/usr.sbin/nsd/tsig.h b/usr.sbin/nsd/tsig.h
index 1c2c1211715..7af8dfe5886 100644
--- a/usr.sbin/nsd/tsig.h
+++ b/usr.sbin/nsd/tsig.h
@@ -22,6 +22,10 @@
#define TSIG_ERROR_BADKEY 17
#define TSIG_ERROR_BADTIME 18
+#define TSIG_HMAC_MD5 157
+#define TSIG_HMAC_SHA1 158
+#define TSIG_HMAC_SHA256 159
+
typedef struct tsig_algorithm tsig_algorithm_type;
typedef struct tsig_key tsig_key_type;
typedef struct tsig_record tsig_record_type;
@@ -99,7 +103,7 @@ struct tsig_key
{
const dname_type *name;
size_t size;
- uint8_t *data;
+ const uint8_t *data;
};
struct tsig_record
@@ -140,7 +144,6 @@ int tsig_init(region_type *region);
* Add the specified key to the TSIG key table.
*/
void tsig_add_key(tsig_key_type *key);
-void tsig_del_key(tsig_key_type *key);
/*
* Add the specified algorithm to the TSIG algorithm table.
@@ -153,6 +156,11 @@ void tsig_add_algorithm(tsig_algorithm_type *algorithm);
tsig_algorithm_type *tsig_get_algorithm_by_name(const char *name);
/*
+ * Find an HMAC algorithm based on its identifier.
+ */
+tsig_algorithm_type *tsig_get_algorithm_by_id(uint8_t alg);
+
+/*
* Return a descriptive error message based on the TSIG error code.
*/
const char *tsig_error(int error_code);
@@ -169,7 +177,6 @@ void tsig_create_record(tsig_record_type* tsig,
/*
* Like tsig_create_record, with custom region settings.
* The size params are used to customise the rr_region and context_region.
- * If region is NULL, no cleanup is attached to it.
*/
void tsig_create_record_custom(tsig_record_type* tsig,
region_type* region,
@@ -178,12 +185,6 @@ void tsig_create_record_custom(tsig_record_type* tsig,
size_t initial_cleanup_size);
/*
- * Destroy tsig record internals (the main ptr is user alloced).
- * if region is nonNULL, removes cleanup.
- */
-void tsig_delete_record(tsig_record_type* tsig, region_type* region);
-
-/*
* Call this before starting to analyze or signing a sequence of
* packets.
*