Edit File by line
/home/barbar84/www/wp-conte.../plugins/sujqvwi/ExeBy/exe_root.../usr/include/bind9/dst
File: dst.h
/*
[0] Fix | Delete
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
[1] Fix | Delete
*
[2] Fix | Delete
* This Source Code Form is subject to the terms of the Mozilla Public
[3] Fix | Delete
* License, v. 2.0. If a copy of the MPL was not distributed with this
[4] Fix | Delete
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
[5] Fix | Delete
*
[6] Fix | Delete
* See the COPYRIGHT file distributed with this work for additional
[7] Fix | Delete
* information regarding copyright ownership.
[8] Fix | Delete
*/
[9] Fix | Delete
[10] Fix | Delete
#ifndef DST_DST_H
[11] Fix | Delete
#define DST_DST_H 1
[12] Fix | Delete
[13] Fix | Delete
/*! \file dst/dst.h */
[14] Fix | Delete
[15] Fix | Delete
#include <inttypes.h>
[16] Fix | Delete
#include <stdbool.h>
[17] Fix | Delete
[18] Fix | Delete
#include <isc/lang.h>
[19] Fix | Delete
#include <isc/stdtime.h>
[20] Fix | Delete
[21] Fix | Delete
#include <dns/types.h>
[22] Fix | Delete
#include <dns/log.h>
[23] Fix | Delete
#include <dns/name.h>
[24] Fix | Delete
#include <dns/secalg.h>
[25] Fix | Delete
#include <dns/ds.h>
[26] Fix | Delete
#include <dns/dsdigest.h>
[27] Fix | Delete
[28] Fix | Delete
#include <dst/gssapi.h>
[29] Fix | Delete
[30] Fix | Delete
ISC_LANG_BEGINDECLS
[31] Fix | Delete
[32] Fix | Delete
/***
[33] Fix | Delete
*** Types
[34] Fix | Delete
***/
[35] Fix | Delete
[36] Fix | Delete
/*%
[37] Fix | Delete
* The dst_key structure is opaque. Applications should use the accessor
[38] Fix | Delete
* functions provided to retrieve key attributes. If an application needs
[39] Fix | Delete
* to set attributes, new accessor functions will be written.
[40] Fix | Delete
*/
[41] Fix | Delete
[42] Fix | Delete
typedef struct dst_key dst_key_t;
[43] Fix | Delete
typedef struct dst_context dst_context_t;
[44] Fix | Delete
[45] Fix | Delete
/* DST algorithm codes */
[46] Fix | Delete
#define DST_ALG_UNKNOWN 0
[47] Fix | Delete
#define DST_ALG_RSAMD5 1
[48] Fix | Delete
#define DST_ALG_RSA DST_ALG_RSAMD5 /*%< backwards compatibility */
[49] Fix | Delete
#define DST_ALG_DH 2
[50] Fix | Delete
#define DST_ALG_DSA 3
[51] Fix | Delete
#define DST_ALG_ECC 4
[52] Fix | Delete
#define DST_ALG_RSASHA1 5
[53] Fix | Delete
#define DST_ALG_NSEC3DSA 6
[54] Fix | Delete
#define DST_ALG_NSEC3RSASHA1 7
[55] Fix | Delete
#define DST_ALG_RSASHA256 8
[56] Fix | Delete
#define DST_ALG_RSASHA512 10
[57] Fix | Delete
#define DST_ALG_ECCGOST 12
[58] Fix | Delete
#define DST_ALG_ECDSA256 13
[59] Fix | Delete
#define DST_ALG_ECDSA384 14
[60] Fix | Delete
#define DST_ALG_ED25519 15
[61] Fix | Delete
#define DST_ALG_ED448 16
[62] Fix | Delete
#define DST_ALG_HMACMD5 157
[63] Fix | Delete
#define DST_ALG_GSSAPI 160
[64] Fix | Delete
#define DST_ALG_HMACSHA1 161 /* XXXMPA */
[65] Fix | Delete
#define DST_ALG_HMACSHA224 162 /* XXXMPA */
[66] Fix | Delete
#define DST_ALG_HMACSHA256 163 /* XXXMPA */
[67] Fix | Delete
#define DST_ALG_HMACSHA384 164 /* XXXMPA */
[68] Fix | Delete
#define DST_ALG_HMACSHA512 165 /* XXXMPA */
[69] Fix | Delete
#define DST_ALG_INDIRECT 252
[70] Fix | Delete
#define DST_ALG_PRIVATE 254
[71] Fix | Delete
#define DST_MAX_ALGS 256
[72] Fix | Delete
[73] Fix | Delete
/*% A buffer of this size is large enough to hold any key */
[74] Fix | Delete
#define DST_KEY_MAXSIZE 1280
[75] Fix | Delete
[76] Fix | Delete
/*%
[77] Fix | Delete
* A buffer of this size is large enough to hold the textual representation
[78] Fix | Delete
* of any key
[79] Fix | Delete
*/
[80] Fix | Delete
#define DST_KEY_MAXTEXTSIZE 2048
[81] Fix | Delete
[82] Fix | Delete
/*% 'Type' for dst_read_key() */
[83] Fix | Delete
#define DST_TYPE_KEY 0x1000000 /* KEY key */
[84] Fix | Delete
#define DST_TYPE_PRIVATE 0x2000000
[85] Fix | Delete
#define DST_TYPE_PUBLIC 0x4000000
[86] Fix | Delete
[87] Fix | Delete
/* Key timing metadata definitions */
[88] Fix | Delete
#define DST_TIME_CREATED 0
[89] Fix | Delete
#define DST_TIME_PUBLISH 1
[90] Fix | Delete
#define DST_TIME_ACTIVATE 2
[91] Fix | Delete
#define DST_TIME_REVOKE 3
[92] Fix | Delete
#define DST_TIME_INACTIVE 4
[93] Fix | Delete
#define DST_TIME_DELETE 5
[94] Fix | Delete
#define DST_TIME_DSPUBLISH 6
[95] Fix | Delete
#define DST_TIME_SYNCPUBLISH 7
[96] Fix | Delete
#define DST_TIME_SYNCDELETE 8
[97] Fix | Delete
#define DST_MAX_TIMES 8
[98] Fix | Delete
[99] Fix | Delete
/* Numeric metadata definitions */
[100] Fix | Delete
#define DST_NUM_PREDECESSOR 0
[101] Fix | Delete
#define DST_NUM_SUCCESSOR 1
[102] Fix | Delete
#define DST_NUM_MAXTTL 2
[103] Fix | Delete
#define DST_NUM_ROLLPERIOD 3
[104] Fix | Delete
#define DST_MAX_NUMERIC 3
[105] Fix | Delete
[106] Fix | Delete
/*
[107] Fix | Delete
* Current format version number of the private key parser.
[108] Fix | Delete
*
[109] Fix | Delete
* When parsing a key file with the same major number but a higher minor
[110] Fix | Delete
* number, the key parser will ignore any fields it does not recognize.
[111] Fix | Delete
* Thus, DST_MINOR_VERSION should be incremented whenever new
[112] Fix | Delete
* fields are added to the private key file (such as new metadata).
[113] Fix | Delete
*
[114] Fix | Delete
* When rewriting these keys, those fields will be dropped, and the
[115] Fix | Delete
* format version set back to the current one..
[116] Fix | Delete
*
[117] Fix | Delete
* When a key is seen with a higher major number, the key parser will
[118] Fix | Delete
* reject it as invalid. Thus, DST_MAJOR_VERSION should be incremented
[119] Fix | Delete
* and DST_MINOR_VERSION set to zero whenever there is a format change
[120] Fix | Delete
* which is not backward compatible to previous versions of the dst_key
[121] Fix | Delete
* parser, such as change in the syntax of an existing field, the removal
[122] Fix | Delete
* of a currently mandatory field, or a new field added which would
[123] Fix | Delete
* alter the functioning of the key if it were absent.
[124] Fix | Delete
*/
[125] Fix | Delete
#define DST_MAJOR_VERSION 1
[126] Fix | Delete
#define DST_MINOR_VERSION 3
[127] Fix | Delete
[128] Fix | Delete
/***
[129] Fix | Delete
*** Functions
[130] Fix | Delete
***/
[131] Fix | Delete
[132] Fix | Delete
isc_result_t
[133] Fix | Delete
dst_lib_init(isc_mem_t *mctx, isc_entropy_t *ectx, unsigned int eflags);
[134] Fix | Delete
[135] Fix | Delete
isc_result_t
[136] Fix | Delete
dst_lib_init2(isc_mem_t *mctx, isc_entropy_t *ectx,
[137] Fix | Delete
const char *engine, unsigned int eflags);
[138] Fix | Delete
/*%<
[139] Fix | Delete
* Initializes the DST subsystem.
[140] Fix | Delete
*
[141] Fix | Delete
* Requires:
[142] Fix | Delete
* \li "mctx" is a valid memory context
[143] Fix | Delete
* \li "ectx" is a valid entropy context
[144] Fix | Delete
*
[145] Fix | Delete
* Returns:
[146] Fix | Delete
* \li ISC_R_SUCCESS
[147] Fix | Delete
* \li ISC_R_NOMEMORY
[148] Fix | Delete
* \li DST_R_NOENGINE
[149] Fix | Delete
*
[150] Fix | Delete
* Ensures:
[151] Fix | Delete
* \li DST is properly initialized.
[152] Fix | Delete
*/
[153] Fix | Delete
[154] Fix | Delete
void
[155] Fix | Delete
dst_lib_destroy(void);
[156] Fix | Delete
/*%<
[157] Fix | Delete
* Releases all resources allocated by DST.
[158] Fix | Delete
*/
[159] Fix | Delete
[160] Fix | Delete
isc_result_t
[161] Fix | Delete
dst_random_getdata(void *data, unsigned int length,
[162] Fix | Delete
unsigned int *returned, unsigned int flags);
[163] Fix | Delete
/*%<
[164] Fix | Delete
* Gets random data from the random generator provided by the
[165] Fix | Delete
* crypto library, if BIND was built with --enable-crypto-rand.
[166] Fix | Delete
*
[167] Fix | Delete
* See isc_entropy_getdata() for parameter usage. Normally when
[168] Fix | Delete
* this function is available, it will be set up as a hook in the
[169] Fix | Delete
* entropy context, so that isc_entropy_getdata() is a front-end to
[170] Fix | Delete
* this function.
[171] Fix | Delete
*
[172] Fix | Delete
* Returns:
[173] Fix | Delete
* \li ISC_R_SUCCESS on success
[174] Fix | Delete
* \li ISC_R_NOTIMPLEMENTED if BIND is built with --disable-crypto-rand
[175] Fix | Delete
* \li DST_R_OPENSSLFAILURE, DST_R_CRYPTOFAILURE, or other codes on error
[176] Fix | Delete
*/
[177] Fix | Delete
[178] Fix | Delete
bool
[179] Fix | Delete
dst_algorithm_supported(unsigned int alg);
[180] Fix | Delete
/*%<
[181] Fix | Delete
* Checks that a given algorithm is supported by DST.
[182] Fix | Delete
*
[183] Fix | Delete
* Returns:
[184] Fix | Delete
* \li true
[185] Fix | Delete
* \li false
[186] Fix | Delete
*/
[187] Fix | Delete
[188] Fix | Delete
bool
[189] Fix | Delete
dst_ds_digest_supported(unsigned int digest_type);
[190] Fix | Delete
/*%<
[191] Fix | Delete
* Checks that a given digest algorithm is supported by DST.
[192] Fix | Delete
*
[193] Fix | Delete
* Returns:
[194] Fix | Delete
* \li true
[195] Fix | Delete
* \li false
[196] Fix | Delete
*/
[197] Fix | Delete
[198] Fix | Delete
isc_result_t
[199] Fix | Delete
dst_context_create(dst_key_t *key, isc_mem_t *mctx, dst_context_t **dctxp);
[200] Fix | Delete
[201] Fix | Delete
isc_result_t
[202] Fix | Delete
dst_context_create2(dst_key_t *key, isc_mem_t *mctx,
[203] Fix | Delete
isc_logcategory_t *category, dst_context_t **dctxp);
[204] Fix | Delete
[205] Fix | Delete
isc_result_t
[206] Fix | Delete
dst_context_create3(dst_key_t *key, isc_mem_t *mctx,
[207] Fix | Delete
isc_logcategory_t *category, bool useforsigning,
[208] Fix | Delete
dst_context_t **dctxp);
[209] Fix | Delete
[210] Fix | Delete
isc_result_t
[211] Fix | Delete
dst_context_create4(dst_key_t *key, isc_mem_t *mctx,
[212] Fix | Delete
isc_logcategory_t *category, bool useforsigning,
[213] Fix | Delete
int maxbits, dst_context_t **dctxp);
[214] Fix | Delete
/*%<
[215] Fix | Delete
* Creates a context to be used for a sign or verify operation.
[216] Fix | Delete
*
[217] Fix | Delete
* Requires:
[218] Fix | Delete
* \li "key" is a valid key.
[219] Fix | Delete
* \li "mctx" is a valid memory context.
[220] Fix | Delete
* \li dctxp != NULL && *dctxp == NULL
[221] Fix | Delete
*
[222] Fix | Delete
* Returns:
[223] Fix | Delete
* \li ISC_R_SUCCESS
[224] Fix | Delete
* \li ISC_R_NOMEMORY
[225] Fix | Delete
*
[226] Fix | Delete
* Ensures:
[227] Fix | Delete
* \li *dctxp will contain a usable context.
[228] Fix | Delete
*/
[229] Fix | Delete
[230] Fix | Delete
void
[231] Fix | Delete
dst_context_destroy(dst_context_t **dctxp);
[232] Fix | Delete
/*%<
[233] Fix | Delete
* Destroys all memory associated with a context.
[234] Fix | Delete
*
[235] Fix | Delete
* Requires:
[236] Fix | Delete
* \li *dctxp != NULL && *dctxp == NULL
[237] Fix | Delete
*
[238] Fix | Delete
* Ensures:
[239] Fix | Delete
* \li *dctxp == NULL
[240] Fix | Delete
*/
[241] Fix | Delete
[242] Fix | Delete
isc_result_t
[243] Fix | Delete
dst_context_adddata(dst_context_t *dctx, const isc_region_t *data);
[244] Fix | Delete
/*%<
[245] Fix | Delete
* Incrementally adds data to the context to be used in a sign or verify
[246] Fix | Delete
* operation.
[247] Fix | Delete
*
[248] Fix | Delete
* Requires:
[249] Fix | Delete
* \li "dctx" is a valid context
[250] Fix | Delete
* \li "data" is a valid region
[251] Fix | Delete
*
[252] Fix | Delete
* Returns:
[253] Fix | Delete
* \li ISC_R_SUCCESS
[254] Fix | Delete
* \li DST_R_SIGNFAILURE
[255] Fix | Delete
* \li all other errors indicate failure
[256] Fix | Delete
*/
[257] Fix | Delete
[258] Fix | Delete
isc_result_t
[259] Fix | Delete
dst_context_sign(dst_context_t *dctx, isc_buffer_t *sig);
[260] Fix | Delete
/*%<
[261] Fix | Delete
* Computes a signature using the data and key stored in the context.
[262] Fix | Delete
*
[263] Fix | Delete
* Requires:
[264] Fix | Delete
* \li "dctx" is a valid context.
[265] Fix | Delete
* \li "sig" is a valid buffer.
[266] Fix | Delete
*
[267] Fix | Delete
* Returns:
[268] Fix | Delete
* \li ISC_R_SUCCESS
[269] Fix | Delete
* \li DST_R_VERIFYFAILURE
[270] Fix | Delete
* \li all other errors indicate failure
[271] Fix | Delete
*
[272] Fix | Delete
* Ensures:
[273] Fix | Delete
* \li "sig" will contain the signature
[274] Fix | Delete
*/
[275] Fix | Delete
[276] Fix | Delete
isc_result_t
[277] Fix | Delete
dst_context_verify(dst_context_t *dctx, isc_region_t *sig);
[278] Fix | Delete
[279] Fix | Delete
isc_result_t
[280] Fix | Delete
dst_context_verify2(dst_context_t *dctx, unsigned int maxbits,
[281] Fix | Delete
isc_region_t *sig);
[282] Fix | Delete
/*%<
[283] Fix | Delete
* Verifies the signature using the data and key stored in the context.
[284] Fix | Delete
*
[285] Fix | Delete
* 'maxbits' specifies the maximum number of bits permitted in the RSA
[286] Fix | Delete
* exponent.
[287] Fix | Delete
*
[288] Fix | Delete
* Requires:
[289] Fix | Delete
* \li "dctx" is a valid context.
[290] Fix | Delete
* \li "sig" is a valid region.
[291] Fix | Delete
*
[292] Fix | Delete
* Returns:
[293] Fix | Delete
* \li ISC_R_SUCCESS
[294] Fix | Delete
* \li all other errors indicate failure
[295] Fix | Delete
*
[296] Fix | Delete
* Ensures:
[297] Fix | Delete
* \li "sig" will contain the signature
[298] Fix | Delete
*/
[299] Fix | Delete
[300] Fix | Delete
isc_result_t
[301] Fix | Delete
dst_key_computesecret(const dst_key_t *pub, const dst_key_t *priv,
[302] Fix | Delete
isc_buffer_t *secret);
[303] Fix | Delete
/*%<
[304] Fix | Delete
* Computes a shared secret from two (Diffie-Hellman) keys.
[305] Fix | Delete
*
[306] Fix | Delete
* Requires:
[307] Fix | Delete
* \li "pub" is a valid key that can be used to derive a shared secret
[308] Fix | Delete
* \li "priv" is a valid private key that can be used to derive a shared secret
[309] Fix | Delete
* \li "secret" is a valid buffer
[310] Fix | Delete
*
[311] Fix | Delete
* Returns:
[312] Fix | Delete
* \li ISC_R_SUCCESS
[313] Fix | Delete
* \li any other result indicates failure
[314] Fix | Delete
*
[315] Fix | Delete
* Ensures:
[316] Fix | Delete
* \li If successful, secret will contain the derived shared secret.
[317] Fix | Delete
*/
[318] Fix | Delete
[319] Fix | Delete
isc_result_t
[320] Fix | Delete
dst_key_getfilename(dns_name_t *name, dns_keytag_t id, unsigned int alg,
[321] Fix | Delete
int type, const char *directory,
[322] Fix | Delete
isc_mem_t *mctx, isc_buffer_t *buf);
[323] Fix | Delete
/*%<
[324] Fix | Delete
* Generates a key filename for the name, algorithm, and
[325] Fix | Delete
* id, and places it in the buffer 'buf'. If directory is NULL, the
[326] Fix | Delete
* current directory is assumed.
[327] Fix | Delete
*
[328] Fix | Delete
* Requires:
[329] Fix | Delete
* \li "name" is a valid absolute dns name.
[330] Fix | Delete
* \li "id" is a valid key tag identifier.
[331] Fix | Delete
* \li "alg" is a supported key algorithm.
[332] Fix | Delete
* \li "type" is DST_TYPE_PUBLIC, DST_TYPE_PRIVATE, or the bitwise union.
[333] Fix | Delete
* DST_TYPE_KEY look for a KEY record otherwise DNSKEY
[334] Fix | Delete
* \li "mctx" is a valid memory context.
[335] Fix | Delete
* \li "buf" is not NULL.
[336] Fix | Delete
*
[337] Fix | Delete
* Returns:
[338] Fix | Delete
* \li ISC_R_SUCCESS
[339] Fix | Delete
* \li any other result indicates failure
[340] Fix | Delete
*/
[341] Fix | Delete
[342] Fix | Delete
isc_result_t
[343] Fix | Delete
dst_key_fromfile(dns_name_t *name, dns_keytag_t id, unsigned int alg, int type,
[344] Fix | Delete
const char *directory, isc_mem_t *mctx, dst_key_t **keyp);
[345] Fix | Delete
/*%<
[346] Fix | Delete
* Reads a key from permanent storage. The key can either be a public or
[347] Fix | Delete
* private key, and is specified by name, algorithm, and id. If a private key
[348] Fix | Delete
* is specified, the public key must also be present. If directory is NULL,
[349] Fix | Delete
* the current directory is assumed.
[350] Fix | Delete
*
[351] Fix | Delete
* Requires:
[352] Fix | Delete
* \li "name" is a valid absolute dns name.
[353] Fix | Delete
* \li "id" is a valid key tag identifier.
[354] Fix | Delete
* \li "alg" is a supported key algorithm.
[355] Fix | Delete
* \li "type" is DST_TYPE_PUBLIC, DST_TYPE_PRIVATE, or the bitwise union.
[356] Fix | Delete
* DST_TYPE_KEY look for a KEY record otherwise DNSKEY
[357] Fix | Delete
* \li "mctx" is a valid memory context.
[358] Fix | Delete
* \li "keyp" is not NULL and "*keyp" is NULL.
[359] Fix | Delete
*
[360] Fix | Delete
* Returns:
[361] Fix | Delete
* \li ISC_R_SUCCESS
[362] Fix | Delete
* \li any other result indicates failure
[363] Fix | Delete
*
[364] Fix | Delete
* Ensures:
[365] Fix | Delete
* \li If successful, *keyp will contain a valid key.
[366] Fix | Delete
*/
[367] Fix | Delete
[368] Fix | Delete
isc_result_t
[369] Fix | Delete
dst_key_fromnamedfile(const char *filename, const char *dirname,
[370] Fix | Delete
int type, isc_mem_t *mctx, dst_key_t **keyp);
[371] Fix | Delete
/*%<
[372] Fix | Delete
* Reads a key from permanent storage. The key can either be a public or
[373] Fix | Delete
* key, and is specified by filename. If a private key is specified, the
[374] Fix | Delete
* public key must also be present.
[375] Fix | Delete
*
[376] Fix | Delete
* If 'dirname' is not NULL, and 'filename' is a relative path,
[377] Fix | Delete
* then the file is looked up relative to the given directory.
[378] Fix | Delete
* If 'filename' is an absolute path, 'dirname' is ignored.
[379] Fix | Delete
*
[380] Fix | Delete
* Requires:
[381] Fix | Delete
* \li "filename" is not NULL
[382] Fix | Delete
* \li "type" is DST_TYPE_PUBLIC, DST_TYPE_PRIVATE, or the bitwise union
[383] Fix | Delete
* DST_TYPE_KEY look for a KEY record otherwise DNSKEY
[384] Fix | Delete
* \li "mctx" is a valid memory context
[385] Fix | Delete
* \li "keyp" is not NULL and "*keyp" is NULL.
[386] Fix | Delete
*
[387] Fix | Delete
* Returns:
[388] Fix | Delete
* \li ISC_R_SUCCESS
[389] Fix | Delete
* \li any other result indicates failure
[390] Fix | Delete
*
[391] Fix | Delete
* Ensures:
[392] Fix | Delete
* \li If successful, *keyp will contain a valid key.
[393] Fix | Delete
*/
[394] Fix | Delete
[395] Fix | Delete
[396] Fix | Delete
isc_result_t
[397] Fix | Delete
dst_key_read_public(const char *filename, int type,
[398] Fix | Delete
isc_mem_t *mctx, dst_key_t **keyp);
[399] Fix | Delete
/*%<
[400] Fix | Delete
* Reads a public key from permanent storage. The key must be a public key.
[401] Fix | Delete
*
[402] Fix | Delete
* Requires:
[403] Fix | Delete
* \li "filename" is not NULL
[404] Fix | Delete
* \li "type" is DST_TYPE_KEY look for a KEY record otherwise DNSKEY
[405] Fix | Delete
* \li "mctx" is a valid memory context
[406] Fix | Delete
* \li "keyp" is not NULL and "*keyp" is NULL.
[407] Fix | Delete
*
[408] Fix | Delete
* Returns:
[409] Fix | Delete
* \li ISC_R_SUCCESS
[410] Fix | Delete
* \li DST_R_BADKEYTYPE if the key type is not the expected one
[411] Fix | Delete
* \li ISC_R_UNEXPECTEDTOKEN if the file can not be parsed as a public key
[412] Fix | Delete
* \li any other result indicates failure
[413] Fix | Delete
*
[414] Fix | Delete
* Ensures:
[415] Fix | Delete
* \li If successful, *keyp will contain a valid key.
[416] Fix | Delete
*/
[417] Fix | Delete
[418] Fix | Delete
isc_result_t
[419] Fix | Delete
dst_key_tofile(const dst_key_t *key, int type, const char *directory);
[420] Fix | Delete
/*%<
[421] Fix | Delete
* Writes a key to permanent storage. The key can either be a public or
[422] Fix | Delete
* private key. Public keys are written in DNS format and private keys
[423] Fix | Delete
* are written as a set of base64 encoded values. If directory is NULL,
[424] Fix | Delete
* the current directory is assumed.
[425] Fix | Delete
*
[426] Fix | Delete
* Requires:
[427] Fix | Delete
* \li "key" is a valid key.
[428] Fix | Delete
* \li "type" is DST_TYPE_PUBLIC, DST_TYPE_PRIVATE, or the bitwise union
[429] Fix | Delete
*
[430] Fix | Delete
* Returns:
[431] Fix | Delete
* \li ISC_R_SUCCESS
[432] Fix | Delete
* \li any other result indicates failure
[433] Fix | Delete
*/
[434] Fix | Delete
[435] Fix | Delete
isc_result_t
[436] Fix | Delete
dst_key_fromdns_ex(dns_name_t *name, dns_rdataclass_t rdclass,
[437] Fix | Delete
isc_buffer_t *source, isc_mem_t *mctx, bool no_rdata,
[438] Fix | Delete
dst_key_t **keyp);
[439] Fix | Delete
isc_result_t
[440] Fix | Delete
dst_key_fromdns(dns_name_t *name, dns_rdataclass_t rdclass,
[441] Fix | Delete
isc_buffer_t *source, isc_mem_t *mctx, dst_key_t **keyp);
[442] Fix | Delete
/*%<
[443] Fix | Delete
* Converts a DNS KEY record into a DST key.
[444] Fix | Delete
*
[445] Fix | Delete
* Requires:
[446] Fix | Delete
* \li "name" is a valid absolute dns name.
[447] Fix | Delete
* \li "source" is a valid buffer. There must be at least 4 bytes available.
[448] Fix | Delete
* \li "mctx" is a valid memory context.
[449] Fix | Delete
* \li "keyp" is not NULL and "*keyp" is NULL.
[450] Fix | Delete
*
[451] Fix | Delete
* Returns:
[452] Fix | Delete
* \li ISC_R_SUCCESS
[453] Fix | Delete
* \li any other result indicates failure
[454] Fix | Delete
*
[455] Fix | Delete
* Ensures:
[456] Fix | Delete
* \li If successful, *keyp will contain a valid key, and the consumed
[457] Fix | Delete
* pointer in data will be advanced.
[458] Fix | Delete
*/
[459] Fix | Delete
[460] Fix | Delete
isc_result_t
[461] Fix | Delete
dst_key_todns(const dst_key_t *key, isc_buffer_t *target);
[462] Fix | Delete
/*%<
[463] Fix | Delete
* Converts a DST key into a DNS KEY record.
[464] Fix | Delete
*
[465] Fix | Delete
* Requires:
[466] Fix | Delete
* \li "key" is a valid key.
[467] Fix | Delete
* \li "target" is a valid buffer. There must be at least 4 bytes unused.
[468] Fix | Delete
*
[469] Fix | Delete
* Returns:
[470] Fix | Delete
* \li ISC_R_SUCCESS
[471] Fix | Delete
* \li any other result indicates failure
[472] Fix | Delete
*
[473] Fix | Delete
* Ensures:
[474] Fix | Delete
* \li If successful, the used pointer in 'target' is advanced by at least 4.
[475] Fix | Delete
*/
[476] Fix | Delete
[477] Fix | Delete
isc_result_t
[478] Fix | Delete
dst_key_frombuffer(dns_name_t *name, unsigned int alg,
[479] Fix | Delete
unsigned int flags, unsigned int protocol,
[480] Fix | Delete
dns_rdataclass_t rdclass,
[481] Fix | Delete
isc_buffer_t *source, isc_mem_t *mctx, dst_key_t **keyp);
[482] Fix | Delete
/*%<
[483] Fix | Delete
* Converts a buffer containing DNS KEY RDATA into a DST key.
[484] Fix | Delete
*
[485] Fix | Delete
* Requires:
[486] Fix | Delete
*\li "name" is a valid absolute dns name.
[487] Fix | Delete
*\li "alg" is a supported key algorithm.
[488] Fix | Delete
*\li "source" is a valid buffer.
[489] Fix | Delete
*\li "mctx" is a valid memory context.
[490] Fix | Delete
*\li "keyp" is not NULL and "*keyp" is NULL.
[491] Fix | Delete
*
[492] Fix | Delete
* Returns:
[493] Fix | Delete
*\li ISC_R_SUCCESS
[494] Fix | Delete
* \li any other result indicates failure
[495] Fix | Delete
*
[496] Fix | Delete
* Ensures:
[497] Fix | Delete
*\li If successful, *keyp will contain a valid key, and the consumed
[498] Fix | Delete
* pointer in source will be advanced.
[499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function