• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/ap/gpl/openssl/ssl/

Lines Matching refs:rr

233 	SSL3_RECORD *rr;
244 rr= &(s->s3->rrec);
271 rr->type= *(p++);
275 n2s(p,rr->length);
301 if (rr->length > SSL3_RT_MAX_ENCRYPTED_LENGTH+extra)
313 if (rr->length > s->packet_length-SSL3_RT_HEADER_LENGTH)
316 i=rr->length;
319 /* now n == rr->length,
320 * and s->packet_length == SSL3_RT_HEADER_LENGTH + rr->length */
325 /* At this point, s->packet_length == SSL3_RT_HEADER_LNGTH + rr->length,
328 rr->input= &(s->packet[SSL3_RT_HEADER_LENGTH]);
330 /* ok, we can now read from 's->packet' data into 'rr'
331 * rr->input points at rr->length bytes, which
332 * need to be copied into rr->data by either
334 * When the data is 'copied' into the rr->data buffer,
335 * rr->input will be pointed at the new buffer */
338 * rr->length bytes of encrypted compressed stuff. */
341 if (rr->length > SSL3_RT_MAX_ENCRYPTED_LENGTH+extra)
348 /* decrypt in place in 'rr->input' */
349 rr->data=rr->input;
366 printf("dec %d\n",rr->length);
367 { unsigned int z; for (z=0; z<rr->length; z++) printf("%02X%c",rr->data[z],((z+1)%16)?' ':'\n'); }
381 if (rr->length > SSL3_RT_MAX_COMPRESSED_LENGTH+extra+mac_size)
383 #if 0 /* OK only for stream ciphers (then rr->length is visible from ciphertext anyway) */
391 /* check the MAC for rr->input (it's in mac_size bytes at the tail) */
392 if (rr->length >= mac_size)
394 rr->length -= mac_size;
395 mac = &rr->data[rr->length];
406 rr->length = 0;
431 if (rr->length > SSL3_RT_MAX_COMPRESSED_LENGTH+extra)
445 if (rr->length > SSL3_RT_MAX_PLAIN_LENGTH+extra)
452 rr->off=0;
465 if (rr->length == 0) goto again;
478 SSL3_RECORD *rr;
480 rr= &(ssl->s3->rrec);
481 i=COMP_expand_block(ssl->expand,rr->comp,
482 SSL3_RT_MAX_PLAIN_LENGTH,rr->data,(int)rr->length);
486 rr->length=i;
487 rr->data=rr->comp;
793 SSL3_RECORD *rr;
848 rr = &(s->s3->rrec);
851 if ((rr->length == 0) || (s->rstate == SSL_ST_READ_BODY))
861 && (rr->type != SSL3_RT_HANDSHAKE))
872 rr->length=0;
878 if (type == rr->type) /* SSL3_RT_APPLICATION_DATA or SSL3_RT_HANDSHAKE */
892 if ((unsigned int)len > rr->length)
893 n = rr->length;
897 memcpy(buf,&(rr->data[rr->off]),n);
900 rr->length-=n;
901 rr->off+=n;
902 if (rr->length == 0)
905 rr->off=0;
912 /* If we get here, then type != rr->type; if we have a handshake
923 if (rr->type == SSL3_RT_HANDSHAKE)
929 else if (rr->type == SSL3_RT_ALERT)
939 if (rr->length < n)
940 n = rr->length; /* available bytes */
945 dest[(*dest_len)++] = rr->data[rr->off++];
946 rr->length--;
954 /* s->s3->handshake_fragment_len == 4 iff rr->type == SSL3_RT_HANDSHAKE;
955 * s->s3->alert_fragment_len == 2 iff rr->type == SSL3_RT_ALERT.
956 * (Possibly rr is 'empty' now, i.e. rr->length may be 0.) */
1072 rr->length=0;
1076 if (rr->type == SSL3_RT_CHANGE_CIPHER_SPEC)
1080 if ( (rr->length != 1) || (rr->off != 0) ||
1081 (rr->data[0] != SSL3_MT_CCS))
1096 rr->length=0;
1099 s->msg_callback(0, s->version, SSL3_RT_CHANGE_CIPHER_SPEC, rr->data, 1, s, s->msg_callback_arg);
1152 switch (rr->type)
1159 rr->length = 0;
1171 * should not happen when type != rr->type */