update to 9.7.1-P2
[tridge/bind9.git] / lib / dns / include / dns / tsig.h
index e8c0e2caff1849d2716907501132dba5eef5e533..b4770b4ed1c18d32ab2b25b55655a82b7337c2e2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2004-2007  Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2007, 2009  Internet Systems Consortium, Inc. ("ISC")
  * Copyright (C) 1999-2002  Internet Software Consortium.
  *
  * Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: tsig.h,v 1.51 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: tsig.h,v 1.53 2009/06/11 23:47:55 tbox Exp $ */
 
 #ifndef DNS_TSIG_H
 #define DNS_TSIG_H 1
@@ -81,8 +81,8 @@ struct dns_tsigkey {
 
 #define dns_tsigkey_identity(tsigkey) \
        ((tsigkey) == NULL ? NULL : \
-         (tsigkey)->generated ? ((tsigkey)->creator) : \
-         (&((tsigkey)->name)))
+        (tsigkey)->generated ? ((tsigkey)->creator) : \
+        (&((tsigkey)->name)))
 
 ISC_LANG_BEGINDECLS
 
@@ -242,6 +242,20 @@ dns_tsigkeyring_create(isc_mem_t *mctx, dns_tsig_keyring_t **ringp);
  *\li          #ISC_R_NOMEMORY
  */
 
+isc_result_t
+dns_tsigkeyring_add(dns_tsig_keyring_t *ring, dns_name_t *name,
+                   dns_tsigkey_t *tkey);
+/*%<
+ *      Place a TSIG key onto a key ring.
+ *
+ *     Requires:
+ *\li          'ring', 'name' and 'tkey' are not NULL
+ *
+ *     Returns:
+ *\li          #ISC_R_SUCCESS
+ *\li          Any other value indicates failure.
+ */
+
 
 void
 dns_tsigkeyring_destroy(dns_tsig_keyring_t **ringp);