dtls: Handle errors/close_notify at all steps and propagate through the layers properly
authorSebastian Dröge <sebastian@centricular.com>
Sun, 12 Jan 2020 11:56:00 +0000 (13:56 +0200)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Sun, 19 Jan 2020 11:16:34 +0000 (11:16 +0000)
commitd66aa872ca141fb6ae6948e972959a736d6e8fde
tree8538fa72d39e0aa1f6bf6b0d3112f19a08e8c03f
parenta132138f1c094097e69bbe0dc25fd0d8dd0549c2
dtls: Handle errors/close_notify at all steps and propagate through the layers properly

Previously we simply logged errors but never reported them to elements
or even to the user. Fatal errors are now properly reported.

Additionally proper connection closing is implemented based on EOS:
- dtlsenc: EOS will cause close_notify to be sent to the peer and only
           if the peer also sent back close_notify we will forward the
           EOS event.
- dtlsdec: EOS will be forwarded normally, this only means that the
           unterlying transport was closed. On receiving a DTLS packet
           containing close_notify, return EOS and send EOS downstream.
ext/dtls/gstdtlsconnection.c
ext/dtls/gstdtlsconnection.h
ext/dtls/gstdtlsdec.c
ext/dtls/gstdtlsenc.c