a134177ed9f82189504191d90f3ed9e97c2b47cbTinderbox User * Copyright (C) 2003, 2004, 2006, 2007, 2009, 2011-2013, 2015-2017 Internet Systems Consortium, Inc. ("ISC")
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * This Source Code Form is subject to the terms of the Mozilla Public
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * License, v. 2.0. If a copy of the MPL was not distributed with this
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * file, You can obtain one at http://mozilla.org/MPL/2.0/.
00b872e4f76587584a2359e9001e9cf08b195ccfMark Andrews/* RFC 4255 */
89639a5e13cace9166bf14931b9e1ce9dc8c47a3Mark Andrews * Algorithm.
89639a5e13cace9166bf14931b9e1ce9dc8c47a3Mark Andrews RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
89639a5e13cace9166bf14931b9e1ce9dc8c47a3Mark Andrews RETERR(uint8_tobuffer(token.value.as_ulong, target));
89639a5e13cace9166bf14931b9e1ce9dc8c47a3Mark Andrews * Digest type.
89639a5e13cace9166bf14931b9e1ce9dc8c47a3Mark Andrews RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
89639a5e13cace9166bf14931b9e1ce9dc8c47a3Mark Andrews RETERR(uint8_tobuffer(token.value.as_ulong, target));
89639a5e13cace9166bf14931b9e1ce9dc8c47a3Mark Andrews unsigned int n;
b0ba1a6059b6d6c4b3aa77d8bc84cc443b981e01Mukund Sivaraman REQUIRE(rdata->type == dns_rdatatype_sshfp);
89639a5e13cace9166bf14931b9e1ce9dc8c47a3Mark Andrews * Algorithm.
89639a5e13cace9166bf14931b9e1ce9dc8c47a3Mark Andrews * Digest type.
89639a5e13cace9166bf14931b9e1ce9dc8c47a3Mark Andrews if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0)
89639a5e13cace9166bf14931b9e1ce9dc8c47a3Mark Andrews if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0)
89639a5e13cace9166bf14931b9e1ce9dc8c47a3Mark Andrews return (mem_tobuffer(target, sr.base, sr.length));
b0ba1a6059b6d6c4b3aa77d8bc84cc443b981e01Mukund Sivaraman REQUIRE(rdata->type == dns_rdatatype_sshfp);
89639a5e13cace9166bf14931b9e1ce9dc8c47a3Mark Andrews return (mem_tobuffer(target, sr.base, sr.length));
89639a5e13cace9166bf14931b9e1ce9dc8c47a3Mark Andrewsstatic inline int
b0ba1a6059b6d6c4b3aa77d8bc84cc443b981e01Mukund Sivaraman REQUIRE(rdata1->type == dns_rdatatype_sshfp);
89639a5e13cace9166bf14931b9e1ce9dc8c47a3Mark Andrews RETERR(uint8_tobuffer(sshfp->algorithm, target));
89639a5e13cace9166bf14931b9e1ce9dc8c47a3Mark Andrews RETERR(uint8_tobuffer(sshfp->digest_type, target));
89639a5e13cace9166bf14931b9e1ce9dc8c47a3Mark Andrews return (mem_tobuffer(target, sshfp->digest, sshfp->length));
b0ba1a6059b6d6c4b3aa77d8bc84cc443b981e01Mukund Sivaraman REQUIRE(rdata->type == dns_rdatatype_sshfp);
89639a5e13cace9166bf14931b9e1ce9dc8c47a3Mark Andrews sshfp->digest_type = uint8_fromregion(®ion);
89639a5e13cace9166bf14931b9e1ce9dc8c47a3Mark Andrews sshfp->digest = mem_maybedup(mctx, region.base, region.length);
89639a5e13cace9166bf14931b9e1ce9dc8c47a3Mark Andrewsstatic inline void
b0ba1a6059b6d6c4b3aa77d8bc84cc443b981e01Mukund Sivaraman REQUIRE(sshfp->common.rdtype == dns_rdatatype_sshfp);
b0ba1a6059b6d6c4b3aa77d8bc84cc443b981e01Mukund Sivaraman REQUIRE(rdata->type == dns_rdatatype_sshfp);
b0ba1a6059b6d6c4b3aa77d8bc84cc443b981e01Mukund Sivaraman REQUIRE(rdata->type == dns_rdatatype_sshfp);
b0ba1a6059b6d6c4b3aa77d8bc84cc443b981e01Mukund Sivaraman REQUIRE(rdata->type == dns_rdatatype_sshfp);
3d17a3ba61a303d5c4d9867068d0fbe9f24d2988Mark Andrewsstatic inline int
89639a5e13cace9166bf14931b9e1ce9dc8c47a3Mark Andrews#endif /* RDATA_GENERIC_SSHFP_44_C */