ds_43.c revision b0ba1a6059b6d6c4b3aa77d8bc84cc443b981e01
/*
* Copyright (C) 2004, 2005, 2007, 2009-2014 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2002 Internet Software Consortium.
*
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id$ */
/* RFC3658 */
#ifndef RDATA_GENERIC_DS_43_C
#define RDATA_GENERIC_DS_43_C
#define RRTYPE_DS_ATTRIBUTES \
#include "dst_gost.h"
static inline isc_result_t
unsigned char c;
int length;
/*
* Key tag.
*/
ISC_FALSE));
/*
* Algorithm.
*/
ISC_FALSE));
/*
* Digest type.
*/
ISC_FALSE));
/*
* Digest.
*/
switch (c) {
case DNS_DSDIGEST_SHA1:
break;
case DNS_DSDIGEST_SHA256:
break;
#ifdef ISC_GOST_DIGESTLENGTH
case DNS_DSDIGEST_GOST:
break;
#endif
case DNS_DSDIGEST_SHA384:
break;
default:
length = -1;
break;
}
}
static inline isc_result_t
char buf[sizeof("64000 ")];
unsigned int n;
/*
* Key tag.
*/
n = uint16_fromregion(&sr);
/*
* Algorithm.
*/
n = uint8_fromregion(&sr);
/*
* Digest type.
*/
n = uint8_fromregion(&sr);
/*
* Digest.
*/
else
} else
return (ISC_R_SUCCESS);
}
static inline isc_result_t
/*
* Check digest lengths if we know them.
*/
#ifdef ISC_GOST_DIGESTLENGTH
#endif
return (ISC_R_UNEXPECTEDEND);
/*
* Only copy digest lengths if we know them.
* If there is extra data dns_rdata_fromwire() will
* detect that.
*/
#ifdef ISC_GOST_DIGESTLENGTH
#endif
}
static inline isc_result_t
}
static inline int
}
static inline isc_result_t
switch (ds->digest_type) {
case DNS_DSDIGEST_SHA1:
break;
case DNS_DSDIGEST_SHA256:
break;
#ifdef ISC_GOST_DIGESTLENGTH
case DNS_DSDIGEST_GOST:
break;
#endif
case DNS_DSDIGEST_SHA384:
break;
}
}
static inline isc_result_t
return (ISC_R_NOMEMORY);
return (ISC_R_SUCCESS);
}
static inline void
return;
}
static inline isc_result_t
return (ISC_R_SUCCESS);
}
static inline isc_result_t
isc_region_t r;
dns_rdata_toregion(rdata, &r);
}
static inline isc_boolean_t
return (ISC_TRUE);
}
static inline isc_boolean_t
return (ISC_TRUE);
}
static inline int
}
#endif /* RDATA_GENERIC_DS_43_C */