【发布时间】:2015-08-21 05:07:32
【问题描述】:
我正在尝试在 Linux (Fedora21 x86_64) 上使用 OpenSSL 和 c++ 在 SCTP 上实现 DTLS
有问题的代码:
BIO *sbio=BIO_new_dgram_sctp( m_sctp_socket,BIO_NOCLOSE)
能否请您告诉我为什么 OpenSSL 断言?
崩溃帧:
#0 0x00007f86fbed98d7 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55
#1 0x00007f86fbedb53a in __GI_abort () at abort.c:89
#2 0x00007f86fcf7512f in OpenSSLDie () from /lib64/libcrypto.so.1.0.0
#3 0x00007f86fd028c3a in BIO_new_dgram_sctp () from /lib64/libcrypto.so.1.0.0
在 BIO_new_dgram_sctp() 处获取以下断言消息运行时
bss_dgram.c(1041): OpenSSL internal error, assertion failed: auth_data
检查内核中的 SCTP 支持:
[blackmamba@fedora21]$ checksctp
SCTP supported
在 sysctl 中启用 auth chunk
net.sctp.auth_enable = 1
OpenSSL 版本
OpenSSL 1.0.2a 19 Mar 2015
【问题讨论】:
-
OpenSSL 通常不会验证,所以我的第一个猜测是
m_sctp_socket无效。您可能应该从 Git 中获取 Master(因为您使用的是 1.0.2a)。我知道最近有一些针对 DTLS 的修复程序。另请参阅 OpenSSL 邮件列表中有关 DTLS 和 BIO 的讨论:DTLS and packet loss 和 DTLS fragmentation and mem BIO。