Convert dtls_write_records to use standard record layer functions
[openssl.git] / ssl / record / methods / tls1_meth.c
index 56d015f71fa542669e03e577f83c6ac39ba1968b..166ee548eb910c7e344cf686ab8584bafc734058 100644 (file)
@@ -656,7 +656,11 @@ struct record_functions_st tls_1_funcs = {
     tls1_allocate_write_buffers,
     tls1_initialise_write_packets,
     NULL,
-    tls_prepare_record_header_default
+    tls_prepare_record_header_default,
+    NULL,
+    tls_prepare_for_encryption_default,
+    tls_post_encryption_processing_default,
+    NULL
 };
 
 struct record_functions_st dtls_1_funcs = {
@@ -669,8 +673,19 @@ struct record_functions_st dtls_1_funcs = {
     NULL,
     NULL,
     NULL,
+    dtls_write_records,
+    /*
+     * Don't use tls1_allocate_write_buffers since that handles empty fragment
+     * records which aren't needed in DTLS. We just use the default allocation
+     * instead.
+     */
+    tls_allocate_write_buffers_default,
+    /* Don't use tls1_initialise_write_packets for same reason as above */
+    tls_initialise_write_packets_default,
     NULL,
+    dtls_prepare_record_header,
     NULL,
-    NULL,
+    tls_prepare_for_encryption_default,
+    tls_post_encryption_processing_default,
     NULL
 };