Created by Dennis / @cdepillabout
int dtls1_process_heartbeat(SSL *s) { unsigned char *p = &s->s3->rrec.data[0], *pl; unsigned short hbtype; unsigned int payload; hbtype = *p++; n2s(p, payload); pl = p; ... buffer = OPENSSL_malloc(1 + 2 + payload); bp = buffer; *bp++ = TLS1_HB_RESPONSE; s2n(payload, bp); memcpy(bp, pl, payload); bp += payload; r = dtls1_write_bytes(s, TLS1_RT_HEARTBEAT, buffer, 1 + 2 + payload); ... }
int dtls1_process_heartbeat(SSL *s) { unsigned char *p = &s->s3->rrec.data[0], *pl; unsigned short hbtype; unsigned int payload; }
リクエストの構成
unsigned int payload; hbtype = *p++; n2s(p, payload); pl = p;
リクエストの構成
buffer = OPENSSL_malloc(1 + 2 + payload); bp = buffer;
リクエストの構成
unsigned char *p = &s->s3->rrec.data[0], *pl; ... hbtype = *p++; n2s(p, payload); pl = p; ... *bp++ = TLS1_HB_RESPONSE; s2n(payload, bp); memcpy(bp, pl, payload); bp += payload;
リクエストの構成
fin.