首页 > 解决方案 > wolfssl SendClientKeyExchange 失败

问题描述

我将 wolfssl 移植到 Liteos,运行时出现错误:

wolfSSL error occurred, error = 111 line:11221 file:src/ssl.c

error = -111,mp_read 错误状态

我跟踪底层代码以找到错误的位置:

        case FIRST_REPLY_FIRST :
    #ifdef WOLFSSL_TLS13
    printf("into WOLFSSL_TLS13 ..\n");
        if (ssl->options.tls1_3)
            return wolfSSL_connect_TLSv13(ssl);
    #endif
        if (!ssl->options.resuming) {
            if ( (ssl->error = SendClientKeyExchange(ssl)) != 0) {
                WOLFSSL_ERROR(ssl->error);  //Error occurred !!
                return WOLFSSL_FATAL_ERROR;
            }
            WOLFSSL_MSG("sent: client key exchange");
        }

        ssl->options.connectState = FIRST_REPLY_SECOND;
        WOLFSSL_MSG("connect state: FIRST_REPLY_SECOND");
        FALL_THROUGH;

wolfssl 版本是 4.2.0-stable

我不知道为什么

标签: sslwolfssl

解决方案


公钥操作失败的最常见原因是堆栈和/或堆设置得不够高。wolfSSL 移植指南有一个关于内存要求的部分。您可以仔细检查项目中的可用内存吗?


推荐阅读