Convert dtls_write_records to use standard record layer functions
[openssl.git] / ssl / record / methods / tls1_meth.c
index b02c53d6494f6e7c07ddb8af8e70994f1dabb857..166ee548eb910c7e344cf686ab8584bafc734058 100644 (file)
@@ -657,6 +657,9 @@ struct record_functions_st tls_1_funcs = {
     tls1_initialise_write_packets,
     NULL,
     tls_prepare_record_header_default,
+    NULL,
+    tls_prepare_for_encryption_default,
+    tls_post_encryption_processing_default,
     NULL
 };
 
@@ -670,9 +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,
-    NULL,
+    tls_prepare_for_encryption_default,
+    tls_post_encryption_processing_default,
     NULL
 };