ds_43.c revision 0c27b3fe77ac1d5094ba3521e8142d9e7973133f
/*
* Copyright (C) 2002, 2004, 2005, 2007, 2009-2016 Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/* $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
}
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
}
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
target));
}
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
}
static inline isc_result_t
return (ISC_R_NOMEMORY);
return (ISC_R_SUCCESS);
}
static inline isc_result_t
}
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 */