Lines Matching refs:RRC
164 * Rotate "rrc" bytes to the front or back
168 rrc_rotate(void *data, size_t len, uint16_t rrc, krb5_boolean unrotate)
176 rrc %= len;
178 if (rrc == 0)
181 left = len - rrc;
183 if (rrc <= sizeof(buf)) {
186 tmp = malloc(rrc);
192 memcpy(tmp, data, rrc);
193 memmove(data, (u_char *)data + rrc, left);
194 memcpy((u_char *)data + left, tmp, rrc);
196 memcpy(tmp, (u_char *)data + left, rrc);
197 memmove((u_char *)data + rrc, data, left);
198 memcpy(data, tmp, rrc);
201 if (rrc > sizeof(buf))
319 size_t rrc = 0, ec = 0;
422 rrc = gsstsize;
424 rrc -= ec;
494 * In Wrap tokens that provide for confidentiality, the RRC
499 * both the EC and RRC fields in the appended checksum
503 token->RRC[0] = 0;
504 token->RRC[1] = 0;
530 Expanded, this is with with RRC = 0:
534 In DCE-RPC mode == no trailer: RRC = gss "trailer" == length(ec-padding | E"header" | krb5-trailer)
593 if (rrc) {
594 token->RRC[0] = (rrc >> 8) & 0xFF;
595 token->RRC[1] = (rrc >> 0) & 0xFF;
604 don't do RRC != 0
646 if (rrc) {
647 token->RRC[0] = (rrc >> 8) & 0xFF;
648 token->RRC[1] = (rrc >> 0) & 0xFF;
674 unrotate_iov(OM_uint32 *minor_status, size_t rrc, gss_iov_buffer_desc *iov, int iov_count)
707 q = p + rrc;
708 skip = rrc;
726 skip = rrc;
759 uint16_t ec, rrc;
817 rrc = (token->RRC[0] << 8) | token->RRC[1];
862 /* Rotate by RRC; bogus to do this in-place XXX */
863 /* Check RRC */
869 if (rrc != gsstsize) {
889 } else if (rrc != 0) {
891 major_status = unrotate_iov(minor_status, rrc, iov, iov_count);
946 ttoken->RRC[0] = token->RRC[0];
947 ttoken->RRC[1] = token->RRC[1];
959 /* Check RRC */
960 if (rrc != gsstsize) {
970 } else if (rrc != 0) {
971 /* Check RRC */
1016 token->RRC[0] = 0;
1017 token->RRC[1] = 0;
1203 uint16_t padlength, rrc = 0;
1218 rrc = (conf_req_flag ? sizeof(*token) : 0) + (uint16_t)cksumsize;
1260 * In Wrap tokens that provide for confidentiality, the RRC
1265 * both the EC and RRC fields in the appended checksum
1269 token->RRC[0] = 0;
1270 token->RRC[1] = 0;
1324 token->RRC[0] = (rrc >> 8) & 0xFF;
1325 token->RRC[1] = (rrc >> 0) & 0xFF;
1329 * for DCERPC, as windows rotates by EC+RRC.
1332 ret = rrc_rotate(cipher.data, cipher.length, rrc+padlength, FALSE);
1334 ret = rrc_rotate(cipher.data, cipher.length, rrc, FALSE);
1373 token->RRC[0] = (rrc >> 8) & 0xFF;
1374 token->RRC[1] = (rrc >> 0) & 0xFF;
1382 input_message_buffer->length + cksum.checksum.length, rrc, FALSE);
1413 uint16_t ec, rrc;
1458 rrc = (token->RRC[0] << 8) | token->RRC[1];
1498 * for DCERPC, as windows rotates by EC+RRC.
1501 *minor_status = rrc_rotate(p, len, rrc+ec, TRUE);
1503 *minor_status = rrc_rotate(p, len, rrc, TRUE);
1524 /* RRC is unprotected; don't modify input buffer */
1525 ((gss_cfx_wrap_token)p)->RRC[0] = token->RRC[0];
1526 ((gss_cfx_wrap_token)p)->RRC[1] = token->RRC[1];
1539 /* Rotate by RRC; bogus to do this in-place XXX */
1540 *minor_status = rrc_rotate(p, len, rrc, TRUE);
1583 token->RRC[0] = 0;
1584 token->RRC[1] = 0;