linux - bss_dgram.c(1041) : OpenSSL internal error, 断言失败:auth_data

标签 linux openssl sctp dtls

我正在尝试在 Linux (Fedora21 x86_64) 上使用带有 C++ 的 OpenSSL 通过 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 中启用身份验证 block

net.sctp.auth_enable = 1

OpenSSL 版本

OpenSSL 1.0.2a 19 Mar 2015

最佳答案

我遇到了这个问题,然后在接受新连接之前在监听器套接字上调用 API“BIO_new_dgram_sctp”后问题得到解决。

    try
    {
        ivSocket->doListen();
    }
    catch(SocketException& anException)
    {
        //Destroy this thread
        _close();
    }


    /* If security is enabled */
    if ((ivSecurity == eTLS) && (ivTransport == eSCTP))
    {
      /* Create DTLS/SCTP BIO and connect */
      BIO *bio = BIO_new_dgram_sctp(ivSocket->getSocketId(), BIO_CLOSE);        
    }

    /* call select on read and write FD's */
    /* Accept new connection that returns new FD and then call SSL_Accept for new FD */

关于linux - bss_dgram.c(1041) : OpenSSL internal error, 断言失败:auth_data,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30680244/

相关文章:

找不到 Cmake Openssl

linux - iperf3:无法识别的选项'--sctp'

Linux:获取 sctp 连接的套接字选项时出错

Eclipse 中的编译时错误 : "undefined reference to ` sctp_recvmsg'"

c# - 在 Linux 上编写 C# 程序时缺少类型 'Uri'

linux - 如何在 Linux 3.4 内核中禁用 cpu 内核?

c++ - 使用 OpenSSL 库生成 "___report_rangecheckfailure"错误

sockets - 在 OpenSSL 上使用带有 UDP 套接字的 DTLS 时,如何正确处理连接和 SSL session ?

Linux 反向排序给出错误的结果

linux - 在没有网络的Linux Centos上安装开发工具