tlsa_52.c revision f2ea8c2f965be7ff4c59f805712c12d469226b7b
66bd3b3c6b171271c705b897823dcdcf29464698Michael Graff * Copyright (C) 2012 Internet Systems Consortium, Inc. ("ISC")
66bd3b3c6b171271c705b897823dcdcf29464698Michael Graff * Permission to use, copy, modify, and/or distribute this software for any
66bd3b3c6b171271c705b897823dcdcf29464698Michael Graff * purpose with or without fee is hereby granted, provided that the above
66bd3b3c6b171271c705b897823dcdcf29464698Michael Graff * copyright notice and this permission notice appear in all copies.
66bd3b3c6b171271c705b897823dcdcf29464698Michael Graff * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
66bd3b3c6b171271c705b897823dcdcf29464698Michael Graff * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
66bd3b3c6b171271c705b897823dcdcf29464698Michael Graff * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
66bd3b3c6b171271c705b897823dcdcf29464698Michael Graff * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
66bd3b3c6b171271c705b897823dcdcf29464698Michael Graff * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
66bd3b3c6b171271c705b897823dcdcf29464698Michael Graff * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
66bd3b3c6b171271c705b897823dcdcf29464698Michael Graff * PERFORMANCE OF THIS SOFTWARE.
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff * Certificate Usage.
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff RETERR(uint8_tobuffer(token.value.as_ulong, target));
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff RETERR(uint8_tobuffer(token.value.as_ulong, target));
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff * Matching type.
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff RETERR(uint8_tobuffer(token.value.as_ulong, target));
213973a334f92d4aef4ef62b4538fc2e4d0e8082Michael Graff * Certificate Association Data.
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff unsigned int n;
213973a334f92d4aef4ef62b4538fc2e4d0e8082Michael Graff * Certificate Usage.
213973a334f92d4aef4ef62b4538fc2e4d0e8082Michael Graff * Matching type.
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff * Certificate Association Data.
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0)
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0)
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff return (mem_tobuffer(target, sr.base, sr.length));
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff return (mem_tobuffer(target, sr.base, sr.length));
66bd3b3c6b171271c705b897823dcdcf29464698Michael Graffstatic inline int
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff RETERR(uint8_tobuffer(tlsa->selector, target));
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff return (mem_tobuffer(target, tlsa->data, tlsa->length));
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff tlsa->data = mem_maybedup(mctx, region.base, region.length);
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graffstatic inline void
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graffstatic inline int
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff#endif /* RDATA_GENERIC_TLSA_52_C */