openHiTLS API openHiTLS 0.1.0-Alpha1
|
◆ HITLS_SetShutdownState()
Set the shutdown status of the TLS link. In HITLS_Close, if the peer end is not closed, a closed notification message is sent to the peer end. When the local end sends a closed notify message, the HiTLS sets the HITLS_SENT_SHUTDOWN flag bit. When the local end receives the closed notify message, the HiTLS sets the HITLS_RECEIVED_SHUTDOWN flag bit. By default, the HiTLS needs to send and receive closed notifications. The actual condition for properly closing a session is HITLS_SENT_SHUTDOWN. (According to the TLS RFC, it is acceptable to send only close_notify alerts without waiting for a reply from the peer.) If HITLS_RECEIVED_SHUTDOWN is set, it indicates that the peer end does not need to wait for the closed notification.
|