dst_parse.h revision d3735e0e2588a8d07215e0b76d029c1ac3d40a17
b8e2e5dd861bdc72a5496a745a85f8761bef7dc4Tinderbox User * Portions Copyright (C) 2000 Internet Software Consortium.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * Portions Copyright (C) 1995-2000 by Network Associates, Inc.
ec5347e2c775f027573ce5648b910361aa926c01Automatic Updater * Permission to use, copy, modify, and distribute this software for any
2cde028c51055c9fd4837337116cd4fdfe8ff623James Brister * purpose with or without fee is hereby granted, provided that the above
2cde028c51055c9fd4837337116cd4fdfe8ff623James Brister * copyright notice and this permission notice appear in all copies.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM AND
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * NETWORK ASSOCIATES DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE CONSORTIUM OR NETWORK
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * ASSOCIATES BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
2cde028c51055c9fd4837337116cd4fdfe8ff623James Brister * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
2cde028c51055c9fd4837337116cd4fdfe8ff623James Brister * PERFORMANCE OF THIS SOFTWARE.
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein/* $Id: dst_parse.h,v 1.16 2000/09/02 01:15:23 bwelling Exp $ */
2cde028c51055c9fd4837337116cd4fdfe8ff623James Brister#define TAG_ALG(tag) ((unsigned int)(tag) >> TAG_SHIFT)
2cde028c51055c9fd4837337116cd4fdfe8ff623James Brister#define TAG(alg, off) (((alg) << TAG_SHIFT) + (off))
2cde028c51055c9fd4837337116cd4fdfe8ff623James Brister/* These are used by both RSA-MD5 and RSA-SHA1 */
5475a2d296215b7a93bd89804dc33c36a6de7cb5James Brister#define TAG_RSA_MODULUS ((DST_ALG_RSAMD5 << TAG_SHIFT) + 0)
d25dd5b0567f67ecf40b7ed1cb20e0dce7b41c49Brian Wellington#define TAG_RSA_PUBLICEXPONENT ((DST_ALG_RSAMD5 << TAG_SHIFT) + 1)
1c153afce556ff3c687986fb7c4a0b0a7f5e7cd8Mark Andrews#define TAG_RSA_PRIVATEEXPONENT ((DST_ALG_RSAMD5 << TAG_SHIFT) + 2)
08c90261660649ca7d92065f6f13a61ec5a9a86dMark Andrews#define TAG_RSA_PRIME1 ((DST_ALG_RSAMD5 << TAG_SHIFT) + 3)
db30f4bdcb66afb7eb1ab0c6882cc70be9a53d79Mark Andrews#define TAG_RSA_PRIME2 ((DST_ALG_RSAMD5 << TAG_SHIFT) + 4)
2cde028c51055c9fd4837337116cd4fdfe8ff623James Brister#define TAG_RSA_EXPONENT1 ((DST_ALG_RSAMD5 << TAG_SHIFT) + 5)
1f1d36a87b65186d9f89aac7f456ab1fd2a39ef6Andreas Gustafsson#define TAG_RSA_EXPONENT2 ((DST_ALG_RSAMD5 << TAG_SHIFT) + 6)
1f1d36a87b65186d9f89aac7f456ab1fd2a39ef6Andreas Gustafsson#define TAG_RSA_COEFFICIENT ((DST_ALG_RSAMD5 << TAG_SHIFT) + 7)
1f1d36a87b65186d9f89aac7f456ab1fd2a39ef6Andreas Gustafsson#define TAG_DH_PRIME ((DST_ALG_DH << TAG_SHIFT) + 0)
2cde028c51055c9fd4837337116cd4fdfe8ff623James Brister#define TAG_DH_GENERATOR ((DST_ALG_DH << TAG_SHIFT) + 1)
2cde028c51055c9fd4837337116cd4fdfe8ff623James Brister#define TAG_DH_PRIVATE ((DST_ALG_DH << TAG_SHIFT) + 2)
b3e77535185043f089b346166440402d092030c3David Lawrence#define TAG_DH_PUBLIC ((DST_ALG_DH << TAG_SHIFT) + 3)
2cde028c51055c9fd4837337116cd4fdfe8ff623James Brister#define TAG_DSA_PRIME ((DST_ALG_DSA << TAG_SHIFT) + 0)
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence#define TAG_DSA_SUBPRIME ((DST_ALG_DSA << TAG_SHIFT) + 1)
f3ca27e9fe307b55e35ea8d7b37351650630e5a3Andreas Gustafsson#define TAG_DSA_BASE ((DST_ALG_DSA << TAG_SHIFT) + 2)
1f1d36a87b65186d9f89aac7f456ab1fd2a39ef6Andreas Gustafsson#define TAG_DSA_PRIVATE ((DST_ALG_DSA << TAG_SHIFT) + 3)
2cde028c51055c9fd4837337116cd4fdfe8ff623James Brister#define TAG_DSA_PUBLIC ((DST_ALG_DSA << TAG_SHIFT) + 4)
2cde028c51055c9fd4837337116cd4fdfe8ff623James Brister#define TAG_HMACMD5_KEY ((DST_ALG_HMACMD5 << TAG_SHIFT) + 0)
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence unsigned short tag;
2cde028c51055c9fd4837337116cd4fdfe8ff623James Brister unsigned short length;
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence unsigned char *data;
2cde028c51055c9fd4837337116cd4fdfe8ff623James Bristertypedef struct dst_private_element dst_private_element_t;
2cde028c51055c9fd4837337116cd4fdfe8ff623James Brister unsigned short nelements;
2cde028c51055c9fd4837337116cd4fdfe8ff623James Bristerdst__privstruct_free(dst_private_t *priv, isc_mem_t *mctx);
b3e77535185043f089b346166440402d092030c3David Lawrencedst__privstruct_parsefile(dst_key_t *key, const isc_uint16_t id,
2cde028c51055c9fd4837337116cd4fdfe8ff623James Bristerdst__privstruct_writefile(const dst_key_t *key, const dst_private_t *priv,
2cde028c51055c9fd4837337116cd4fdfe8ff623James Brister#endif /* DST_DST_PARSE_H */