Lines Matching defs:rr

313     SSL3_RECORD *rr;
322 rr = &(s->s3->rrec);
353 rr->type = *(p++);
357 n2s(p, rr->length);
359 fprintf(stderr, "Record type=%d, Length=%d\n", rr->type, rr->length);
368 if (rr->type == SSL3_RT_ALERT) {
393 if (rr->length > s->s3->rbuf.len - SSL3_RT_HEADER_LENGTH) {
404 if (rr->length > s->packet_length - SSL3_RT_HEADER_LENGTH) {
406 i = rr->length;
411 * now n == rr->length, and s->packet_length == SSL3_RT_HEADER_LENGTH
412 * + rr->length
419 * At this point, s->packet_length == SSL3_RT_HEADER_LNGTH + rr->length,
422 rr->input = &(s->packet[SSL3_RT_HEADER_LENGTH]);
425 * ok, we can now read from 's->packet' data into 'rr' rr->input points
426 * at rr->length bytes, which need to be copied into rr->data by either
428 * the rr->data buffer, rr->input will be pointed at the new buffer
432 * We now have - encrypted [ MAC [ compressed [ plain ] ] ] rr->length
437 if (rr->length > SSL3_RT_MAX_ENCRYPTED_LENGTH + extra) {
443 /* decrypt in place in 'rr->input' */
444 rr->data = rr->input;
459 printf("dec %d\n", rr->length);
462 for (z = 0; z < rr->length; z++)
463 printf("%02X%c", rr->data[z], ((z + 1) % 16) ? ' ' : '\n');
478 * kludge: *_cbc_remove_padding passes padding length in rr->type
480 orig_len = rr->length + ((unsigned int)rr->type >> 8);
505 ssl3_cbc_copy_mac(mac_tmp, rr, mac_size, orig_len);
506 rr->length -= mac_size;
513 rr->length -= mac_size;
514 mac = &rr->data[rr->length];
521 if (rr->length > SSL3_RT_MAX_COMPRESSED_LENGTH + extra + mac_size)
541 if (rr->length > SSL3_RT_MAX_COMPRESSED_LENGTH + extra) {
553 if (rr->length > SSL3_RT_MAX_PLAIN_LENGTH + extra) {
559 rr->off = 0;
573 if (rr->length == 0) {
583 fprintf(stderr, "Ultimate Record type=%d, Length=%d\n", rr->type,
584 rr->length);
599 SSL3_RECORD *rr;
601 rr = &(ssl->s3->rrec);
602 i = COMP_expand_block(ssl->expand, rr->comp,
603 SSL3_RT_MAX_PLAIN_LENGTH, rr->data,
604 (int)rr->length);
608 rr->length = i;
609 rr->data = rr->comp;
1170 SSL3_RECORD *rr;
1229 rr = &(s->s3->rrec);
1232 if ((rr->length == 0) || (s->rstate == SSL_ST_READ_BODY)) {
1242 if (rr->type != SSL3_RT_ALERT && rr->length != 0)
1249 && (rr->type != SSL3_RT_HANDSHAKE)) {
1260 rr->length = 0;
1265 if (type == rr->type) { /* SSL3_RT_APPLICATION_DATA or
1281 if ((unsigned int)len > rr->length)
1282 n = rr->length;
1286 memcpy(buf, &(rr->data[rr->off]), n);
1288 rr->length -= n;
1289 rr->off += n;
1290 if (rr->length == 0) {
1292 rr->off = 0;
1302 * If we get here, then type != rr->type; if we have a handshake message,
1315 if (rr->type == SSL3_RT_HANDSHAKE) {
1319 } else if (rr->type == SSL3_RT_ALERT) {
1325 else if (rr->type == TLS1_RT_HEARTBEAT) {
1331 rr->length = 0;
1345 if (rr->length < n)
1346 n = rr->length; /* available bytes */
1350 dest[(*dest_len)++] = rr->data[rr->off++];
1351 rr->length--;
1360 * s->s3->handshake_fragment_len == 4 iff rr->type == SSL3_RT_HANDSHAKE;
1361 * s->s3->alert_fragment_len == 2 iff rr->type == SSL3_RT_ALERT.
1362 * (Possibly rr is 'empty' now, i.e. rr->length may be 0.)
1437 rr->length = 0;
1517 rr->length = 0;
1521 if (rr->type == SSL3_RT_CHANGE_CIPHER_SPEC) {
1526 if ((rr->length != 1) || (rr->off != 0) ||
1527 (rr->data[0] != SSL3_MT_CCS)) {
1548 rr->length = 0;
1552 rr->data, 1, s, s->msg_callback_arg);
1606 switch (rr->type) {
1624 * happen when type != rr->type