PR: 2535
Submitted by: Robin Seggelmann <seggelmann@fh-muenster.de> Reviewed by: steve Add SCTP support for DTLS (RFC 6083).
This commit is contained in:
@@ -1417,3 +1417,24 @@ dtls1_get_ccs_header(unsigned char *data, struct ccs_header_st *ccs_hdr)
|
||||
|
||||
ccs_hdr->type = *(data++);
|
||||
}
|
||||
|
||||
int dtls1_shutdown(SSL *s)
|
||||
{
|
||||
int ret;
|
||||
#ifndef OPENSSL_NO_SCTP
|
||||
if (BIO_dgram_is_sctp(SSL_get_wbio(s)) &&
|
||||
!(s->shutdown & SSL_SENT_SHUTDOWN))
|
||||
{
|
||||
ret = BIO_dgram_sctp_wait_for_dry(SSL_get_wbio(s));
|
||||
if (ret < 0) return -1;
|
||||
|
||||
if (ret == 0)
|
||||
BIO_ctrl(SSL_get_wbio(s), BIO_CTRL_DGRAM_SCTP_SAVE_SHUTDOWN, 1, NULL);
|
||||
}
|
||||
#endif
|
||||
ret = ssl3_shutdown(s);
|
||||
#ifndef OPENSSL_NO_SCTP
|
||||
BIO_ctrl(SSL_get_wbio(s), BIO_CTRL_DGRAM_SCTP_SAVE_SHUTDOWN, 0, NULL);
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
Reference in New Issue
Block a user