Remove ccs_header_st.

It doesn't do anything.

Change-Id: I0bba4e22a0b2053aae491d0ad695c892803cafca
Reviewed-on: https://boringssl-review.googlesource.com/3767
Reviewed-by: Adam Langley <agl@google.com>
diff --git a/include/openssl/dtls1.h b/include/openssl/dtls1.h
index 5ee652f..ad49aed 100644
--- a/include/openssl/dtls1.h
+++ b/include/openssl/dtls1.h
@@ -105,11 +105,6 @@
   uint16_t epoch;
 };
 
-struct ccs_header_st {
-  uint8_t type;
-  uint16_t seq;
-};
-
 typedef struct record_pqueue_st {
   uint16_t epoch;
   pqueue q;
diff --git a/ssl/d1_both.c b/ssl/d1_both.c
index a19ee3d..0dcab40 100644
--- a/ssl/d1_both.c
+++ b/ssl/d1_both.c
@@ -924,12 +924,6 @@
   n2l3(data, msg_hdr->frag_len);
 }
 
-void dtls1_get_ccs_header(uint8_t *data, struct ccs_header_st *ccs_hdr) {
-  memset(ccs_hdr, 0x00, sizeof(struct ccs_header_st));
-
-  ccs_hdr->type = *(data++);
-}
-
 int dtls1_shutdown(SSL *s) {
   int ret;
   ret = ssl3_shutdown(s);
diff --git a/ssl/d1_pkt.c b/ssl/d1_pkt.c
index a5631f7..69d0f04 100644
--- a/ssl/d1_pkt.c
+++ b/ssl/d1_pkt.c
@@ -786,16 +786,9 @@
   }
 
   if (rr->type == SSL3_RT_CHANGE_CIPHER_SPEC) {
-    struct ccs_header_st ccs_hdr;
-    unsigned int ccs_hdr_len = DTLS1_CCS_HEADER_LENGTH;
-
-    dtls1_get_ccs_header(rr->data, &ccs_hdr);
-
-    /* 'Change Cipher Spec' is just a single byte, so we know
-     * exactly what the record payload has to look like */
-    /* XDTLS: check that epoch is consistent */
-    if ((rr->length != ccs_hdr_len) || (rr->off != 0) ||
-        (rr->data[0] != SSL3_MT_CCS)) {
+    /* 'Change Cipher Spec' is just a single byte, so we know exactly what the
+     * record payload has to look like */
+    if (rr->length != 1 || rr->off != 0 || rr->data[0] != SSL3_MT_CCS) {
       al = SSL_AD_ILLEGAL_PARAMETER;
       OPENSSL_PUT_ERROR(SSL, dtls1_read_bytes, SSL_R_BAD_CHANGE_CIPHER_SPEC);
       goto f_err;
diff --git a/ssl/ssl_locl.h b/ssl/ssl_locl.h
index 8e6f121..5cc1cfc 100644
--- a/ssl/ssl_locl.h
+++ b/ssl/ssl_locl.h
@@ -815,7 +815,6 @@
 int dtls1_retransmit_buffered_messages(SSL *s);
 void dtls1_clear_record_buffer(SSL *s);
 void dtls1_get_message_header(uint8_t *data, struct hm_header_st *msg_hdr);
-void dtls1_get_ccs_header(uint8_t *data, struct ccs_header_st *ccs_hdr);
 void dtls1_reset_seq_numbers(SSL *s, int rw);
 int dtls1_check_timeout_num(SSL *s);
 int dtls1_handle_timeout(SSL *s);