Lines Matching defs:sr
99 isc_region_t sr;
107 dns_rdata_toregion(rdata, &sr);
112 n = uint16_fromregion(&sr);
113 isc_region_consume(&sr, 2);
120 n = uint8_fromregion(&sr);
121 isc_region_consume(&sr, 1);
128 n = uint8_fromregion(&sr);
129 isc_region_consume(&sr, 1);
141 RETERR(isc_hex_totext(&sr, 0, "", target));
143 RETERR(isc_hex_totext(&sr, tctx->width - 2,
162 isc_region_t sr;
169 isc_buffer_activeregion(source, &sr);
174 if (sr.length < 4 ||
175 (sr.base[3] == DNS_DSDIGEST_SHA1 &&
176 sr.length < 4 + ISC_SHA1_DIGESTLENGTH) ||
177 (sr.base[3] == DNS_DSDIGEST_SHA256 &&
178 sr.length < 4 + ISC_SHA256_DIGESTLENGTH) ||
180 (sr.base[3] == DNS_DSDIGEST_GOST &&
181 sr.length < 4 + ISC_GOST_DIGESTLENGTH) ||
183 (sr.base[3] == DNS_DSDIGEST_SHA384 &&
184 sr.length < 4 + ISC_SHA384_DIGESTLENGTH))
192 if (sr.base[3] == DNS_DSDIGEST_SHA1)
193 sr.length = 4 + ISC_SHA1_DIGESTLENGTH;
194 else if (sr.base[3] == DNS_DSDIGEST_SHA256)
195 sr.length = 4 + ISC_SHA256_DIGESTLENGTH;
197 else if (sr.base[3] == DNS_DSDIGEST_GOST)
198 sr.length = 4 + ISC_GOST_DIGESTLENGTH;
200 else if (sr.base[3] == DNS_DSDIGEST_SHA384)
201 sr.length = 4 + ISC_SHA384_DIGESTLENGTH;
203 isc_buffer_forward(source, sr.length);
204 return (mem_tobuffer(target, sr.base, sr.length));
218 isc_region_t sr;
225 dns_rdata_toregion(rdata, &sr);
226 return (mem_tobuffer(target, sr.base, sr.length));