1

(3 replies, posted in wolfSSL)

Hello Eric,
Thank for your response,
- Yes, it seem the broker disconnected.
- This broker is use for my company project.
- I tried adding SNI extension but it's still no change.
I have used client example in Windows computer but it look like have a same problem.
This is client example log:

wolfSSL Entering wolfSSL_Init
wolfSSL Entering wolfCrypt_Init
wolfSSL Entering TLSv1_2_client_method_ex
wolfSSL Entering wolfSSL_CTX_new_ex
wolfSSL Entering wolfSSL_CertManagerNew
heap param is null
DYNAMIC_TYPE_CERT_MANAGER Allocating = 280 bytes
wolfSSL Leaving wolfSSL_CTX_new_ex, return 0
wolfSSL Entering wolfSSL_CTX_use_certificate_chain_file_format
wolfSSL Entering ProcessBuffer
wolfSSL Entering PemToDer
wolfSSL Entering ProcessUserChain
Already consumed data
wolfSSL Leaving ProcessUserChain, return 0
Checking cert signature type
Getting Cert Name
Getting Cert Name
wolfSSL Entering GetAlgoId
Cert signature not supported
wolfSSL Leaving ProcessBuffer, return 1
wolfSSL Entering wolfSSL_CTX_use_PrivateKey_file
wolfSSL Entering ProcessBuffer
wolfSSL Entering PemToDer
wolfSSL Leaving ProcessBuffer, return 1
wolfSSL_CTX_load_verify_locations_ex
Processing CA PEM file
wolfSSL Entering ProcessBuffer
wolfSSL Entering PemToDer
Adding a CA
Getting Cert Name
Getting Cert Name
wolfSSL Entering GetAlgoId
wolfSSL Entering DecodeCertExtensions
wolfSSL Entering DecodeSubjKeyId
wolfSSL Entering DecodeAuthKeyId
wolfSSL Entering DecodeBasicCaConstraint
        Parsed new CA
        Freeing Parsed CA
        Freeing der CA
                OK Freeing der CA
wolfSSL Leaving AddCA, return 0
wolfSSL Leaving ProcessBuffer, return 1
   Processed a CA
Processed at least one valid CA. Other stuff OK
wolfSSL_CTX_load_verify_locations_ex
Processing CA PEM file
wolfSSL Entering ProcessBuffer
wolfSSL Entering PemToDer
Adding a CA
Getting Cert Name
Getting Cert Name
wolfSSL Entering GetAlgoId
wolfSSL Entering DecodeCertExtensions
wolfSSL Entering DecodeSubjKeyId
wolfSSL Entering DecodeAuthKeyId
wolfSSL Entering DecodeBasicCaConstraint
wolfSSL Entering DecodeKeyUsage
wolfSSL Entering DecodeExtKeyUsage
wolfSSL Entering DecodeNsCertType
        Parsed new CA
        Freeing Parsed CA
        Freeing der CA
                OK Freeing der CA
wolfSSL Leaving AddCA, return 0
wolfSSL Leaving ProcessBuffer, return 1
   Processed a CA
Processed at least one valid CA. Other stuff OK
wolfSSL Entering wolfSSL_new
wolfSSL Entering ReinitSSL
RNG_HEALTH_TEST_CHECK_SIZE = 128
sizeof(seedB_data)         = 128
wolfSSL Entering SetSSL_CTX
wolfSSL Entering wolfSSL_NewSession
InitSSL done. return 0 (success)
wolfSSL_new InitSSL success
wolfSSL Leaving wolfSSL_new InitSSL =, return 0
wolfSSL Entering wolfSSL_set_fd
wolfSSL Entering wolfSSL_set_read_fd
wolfSSL Leaving wolfSSL_set_read_fd, return 1
wolfSSL Entering wolfSSL_set_write_fd
wolfSSL Leaving wolfSSL_set_write_fd, return 1
TLS 1.2 or lower
wolfSSL Entering wolfSSL_connect
wolfSSL Entering ReinitSSL
wolfSSL Entering RetrySendAlert
wolfSSL Entering SendClientHello
Adding signature algorithms extension
growing output buffer
Signature Algorithms extension to write
Point Formats extension to write
Supported Groups extension to write
Encrypt-Then-Mac extension to write
SNI extension to write
EMS extension to write
Shrinking output buffer
wolfSSL Leaving SendClientHello, return 0
connect state: CLIENT_HELLO_SENT
Server state up to needed state.
Progressing server state...
ProcessReply...
wolfSSL Entering RetrySendAlert
growing input buffer
received record layer msg
got HANDSHAKE
wolfSSL Entering DoHandShakeMsg
wolfSSL Entering EarlySanityCheckMsgReceived
wolfSSL Leaving EarlySanityCheckMsgReceived, return 0
wolfSSL Entering DoHandShakeMsgType
processing server hello
wolfSSL Entering DoServerHello
Point Formats extension received
wolfSSL Entering wolfSSL_get_options
wolfSSL Entering wolfSSL_get_options
wolfSSL Entering VerifyClientSuite
wolfSSL Leaving DoServerHello, return 0
wolfSSL Leaving DoHandShakeMsgType(), return 0
wolfSSL Leaving DoHandShakeMsg(), return 0
Shrinking input buffer
ProcessReply done.
Progressing server state...
ProcessReply...
wolfSSL Entering RetrySendAlert
growing input buffer
received record layer msg
got HANDSHAKE
wolfSSL Entering DoHandShakeMsg
wolfSSL Entering EarlySanityCheckMsgReceived
wolfSSL Leaving EarlySanityCheckMsgReceived, return 0
wolfSSL Entering DoHandShakeMsgType
processing certificate
wolfSSL Entering DoCertificate
wolfSSL Entering ProcessPeerCerts
Loading peer's cert chain
        Put another cert into chain
        Put another cert into chain
Getting Cert Name
Getting Cert Name
wolfSSL Entering GetAlgoId
wolfSSL Entering DecodeCertExtensions
wolfSSL Entering DecodeSubjKeyId
wolfSSL Entering DecodeAuthKeyId
wolfSSL Entering DecodeBasicCaConstraint
CA found
wolfSSL Entering ConfirmSignature
mp_to_unsigned_bin_len_ct...
wolfSSL Leaving ConfirmSignature, return 0
Verified CA from chain and already had it
Verifying Peer's cert
Getting Cert Name
Getting Cert Name
wolfSSL Entering GetAlgoId
wolfSSL Entering DecodeCertExtensions
wolfSSL Entering DecodeAltNames
        Unsupported name type, skipping
CA found
wolfSSL Entering ConfirmSignature
mp_to_unsigned_bin_len_ct...
wolfSSL Leaving ConfirmSignature, return 0
Verified Peer's cert
wolfSSL Leaving ProcessPeerCerts, return 0
wolfSSL Leaving DoCertificate, return 0
wolfSSL Leaving DoHandShakeMsgType(), return 0
wolfSSL Leaving DoHandShakeMsg(), return 0
Shrinking input buffer
ProcessReply done.
Progressing server state...
ProcessReply...
wolfSSL Entering RetrySendAlert
growing input buffer
received record layer msg
got HANDSHAKE
wolfSSL Entering DoHandShakeMsg
wolfSSL Entering EarlySanityCheckMsgReceived
wolfSSL Leaving EarlySanityCheckMsgReceived, return 0
wolfSSL Entering DoHandShakeMsgType
processing server key exchange
wolfSSL Entering DoServerKeyExchange
wolfSSL Entering RsaVerify
mp_to_unsigned_bin_len_ct...
wolfSSL Using RSA PSS un-padding
wolfSSL Leaving RsaVerify, return 128
wolfSSL Leaving DoServerKeyExchange, return 0
wolfSSL Leaving DoHandShakeMsgType(), return 0
wolfSSL Leaving DoHandShakeMsg(), return 0
Shrinking input buffer
ProcessReply done.
Progressing server state...
ProcessReply...
wolfSSL Entering RetrySendAlert
growing input buffer
received record layer msg
got HANDSHAKE
wolfSSL Entering DoHandShakeMsg
wolfSSL Entering EarlySanityCheckMsgReceived
wolfSSL Leaving EarlySanityCheckMsgReceived, return 0
wolfSSL Entering DoHandShakeMsgType
processing certificate request
wolfSSL Entering DoCertificateRequest
wolfSSL Leaving DoCertificateRequest, return 0
wolfSSL Leaving DoHandShakeMsgType(), return 0
wolfSSL Leaving DoHandShakeMsg(), return 0
Shrinking input buffer
ProcessReply done.
Progressing server state...
ProcessReply...
wolfSSL Entering RetrySendAlert
received record layer msg
got HANDSHAKE
wolfSSL Entering DoHandShakeMsg
wolfSSL Entering EarlySanityCheckMsgReceived
wolfSSL Leaving EarlySanityCheckMsgReceived, return 0
wolfSSL Entering DoHandShakeMsgType
processing server hello done
wolfSSL Leaving DoHandShakeMsgType(), return 0
wolfSSL Leaving DoHandShakeMsg(), return 0
ProcessReply done.
connect state: HELLO_AGAIN
connect state: HELLO_AGAIN_REPLY
connect state: FIRST_REPLY_DONE
wolfSSL Entering SendCertificate
growing output buffer
Shrinking output buffer
wolfSSL Leaving SendCertificate, return 0
sent: certificate
connect state: FIRST_REPLY_FIRST
wolfSSL Entering SendClientKeyExchange
wolfSSL Entering EccMakeKey
wolfSSL Leaving EccMakeKey, return 0
wolfSSL Entering EccSharedSecret
wolfSSL Leaving EccSharedSecret, return 0
growing output buffer
Shrinking output buffer
wolfSSL Leaving SendClientKeyExchange, return 0
sent: client key exchange
connect state: FIRST_REPLY_SECOND
wolfSSL Entering SendCertificateVerify
Trying RSA private key
Using RSA private key
wolfSSL Entering RsaSign
wolfSSL Using RSA PSS padding
mp_to_unsigned_bin_len_ct...
wolfSSL Leaving RsaSign, return 0
wolfSSL Entering VerifyRsaSign
mp_to_unsigned_bin_len_ct...
wolfSSL Using RSA PSS un-padding
wolfSSL Leaving VerifyRsaSign, return 0
wolfSSL Entering SendHandshakeMsg
growing output buffer
Shrinking output buffer
wolfSSL Leaving SendCertificateVerify, return 0
sent: certificate verify
connect state: FIRST_REPLY_THIRD
growing output buffer
Shrinking output buffer
sent: change cipher spec
connect state: FIRST_REPLY_FOURTH
wolfSSL Entering SendFinished
growing output buffer
wolfSSL Entering BuildMessage
wolfSSL Leaving BuildMessage, return 0
wolfSSL Entering SetupSession
wolfSSL Entering AddSession
wolfSSL Entering AddSessionToCache
wolfSSL Entering ClientSessionToSession
wolfSSL Entering ClientSessionToSession
wolfSSL Entering ClientSessionToSession
Trying to add client cache entry
Adding client cache entry
Shrinking output buffer
wolfSSL Leaving SendFinished, return 0
sent: finished
connect state: FINISHED_DONE
wolfSSL Entering RetrySendAlert
received record layer msg
got CHANGE CIPHER SPEC
wolfSSL Entering RetrySendAlert
growing input buffer
received record layer msg
got HANDSHAKE
wolfSSL Entering DoHandShakeMsg
wolfSSL Entering EarlySanityCheckMsgReceived
wolfSSL Leaving EarlySanityCheckMsgReceived, return 0
wolfSSL Entering DoHandShakeMsgType
processing finished
wolfSSL Entering DoFinished
wolfSSL Leaving DoFinished, return 0
wolfSSL Leaving DoHandShakeMsgType(), return 0
wolfSSL Leaving DoHandShakeMsg(), return 0
Shrinking input buffer
connect state: SECOND_REPLY_DONE
wolfSSL Entering FreeHandshakeResources
Signature Algorithms extension to free
Point Formats extension free
Supported Groups extension free
Key Share extension free
wolfSSL Leaving wolfSSL_connect, return 1
wolfSSL Entering wolfSSL_get_version
SSL version is TLSv1.2
wolfSSL Entering wolfSSL_get_current_cipher
wolfSSL Entering wolfSSL_CIPHER_get_name
SSL cipher suite is TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
wolfSSL Entering wolfSSL_get_curve_name
SSL curve name is SECP521R1
wolfSSL Entering wolfSSL_session_reused
wolfSSL Leaving wolfSSL_session_reused, return 0
wolfSSL Entering wolfSSL_write
wolfSSL Entering RetrySendAlert
growing output buffer
wolfSSL Entering BuildMessage
wolfSSL Leaving BuildMessage, return 0
Shrinking output buffer
wolfSSL Leaving wolfSSL_write, return 14
wolfSSL Entering wolfSSL_read
wolfSSL Entering wolfSSL_read_internal
wolfSSL Entering ReceiveData
wolfSSL Entering RetrySendAlert
growing input buffer
received record layer msg
got ALERT!
Alert type: close_notify
Zero return, no more data coming
wolfSSL Leaving wolfSSL_read_internal, return 0
wolfSSL Entering wolfSSL_get_error
wolfSSL Leaving wolfSSL_get_error, return -343
wolfSSL Entering wolfSSL_ERR_error_string
SSL_read reply error 6, peer sent close notify alert
wolfSSL error: SSL_read failed

2

(3 replies, posted in wolfSSL)

Hello all,
I'm new in using WolfSSL for STM32.
My project is using STM32 with W5500 for Ethernet, and using MQTTs.
I'm stuck at the MqttClient_Connect step.
It seem like the socket is closed, but I don't know why.
This is my log:

Current Time: 17:00:00
Current Date: 23-11-2024
INIT DONE

init() called!
Registering W5500 callbacks...
Calling wizchip_init()...
Calling DHCP_init()...
Registering DHCP callbacks...
Calling DHCP_run()...
> Send DHCP_DISCOVER
DHCP message : 192.168.1.1(67) 548 received. 
> Receive DHCP_OFFER
> Send DHCP_REQUEST
DHCP message : 192.168.1.1(67) 548 received. 
> Receive DHCP_ACK

> Check leased IP - OK
Callback: IP assigned! Leased time: 10 sec
IP:  192.168.1.12
GW:  192.168.1.1
Net: 255.255.255.0
DNS: 8.8.8.8
Calling wizchip_setnetinfo()...
Configured IP: 192.168.1.12
Configured GW: 192.168.1.1
Configured SN: 255.255.255.0
Calling DNS_init()...
*********************MQTT INIT*********************
MQTT Init Success
***************************************************



*********************MQTT NET*********************
wolfSSL Entering wolfSSL_Init
wolfSSL Entering wolfCrypt_Init
RNG_HEALTH_TEST_CHECK_SIZE = 128
sizeof(seedB_data)         = 128
wolfSSL Entering TLSv1_3_client_method_ex
wolfSSL Entering wolfSSL_CTX_new_ex
wolfSSL Entering wolfSSL_CertManagerNew
heap param is null
DYNAMIC_TYPE_CERT_MANAGER Allocating = 112 bytes
wolfSSL Leaving wolfSSL_CTX_new_ex, return 0
wolfSSL Entering wolfSSL_CTX_set_verify
wolfSSL Entering wolfSSL_CTX_set_default_passwd_cb
wolfSSL Entering wolfSSL_CTX_load_verify_buffer_ex
Processing CA PEM file
wolfSSL Entering ProcessBuffer
wolfSSL Entering PemToDer
Adding a CA
Getting Cert Name
wolfSSL Entering wolfSSL_X509_NAME_new_ex
wolfSSL Entering wolfSSL_X509_NAME_add_entry_by_NID
Found place for name entry
wolfSSL Entering wolfSSL_X509_NAME_ENTRY_free
wolfSSL Entering wolfSSL_X509_NAME_add_entry_by_NID
Found place for name entry
wolfSSL Entering wolfSSL_X509_NAME_ENTRY_free
wolfSSL Entering wolfSSL_X509_NAME_add_entry_by_NID
Found place for name entry
wolfSSL Entering wolfSSL_X509_NAME_ENTRY_free
Getting Cert Name
wolfSSL Entering wolfSSL_X509_NAME_new_ex
wolfSSL Entering wolfSSL_X509_NAME_add_entry_by_NID
Found place for name entry
wolfSSL Entering wolfSSL_X509_NAME_ENTRY_free
wolfSSL Entering wolfSSL_X509_NAME_add_entry_by_NID
Found place for name entry
wolfSSL Entering wolfSSL_X509_NAME_ENTRY_free
wolfSSL Entering wolfSSL_X509_NAME_add_entry_by_NID
Found place for name entry
wolfSSL Entering wolfSSL_X509_NAME_ENTRY_free
wolfSSL Entering GetAlgoId
wolfSSL Entering DecodeCertExtensions
wolfSSL Entering DecodeSubjKeyId
wolfSSL Entering DecodeAuthKeyId
wolfSSL Entering DecodeBasicCaConstraint
    Parsed new CA
    Freeing Parsed CA
wolfSSL Entering wolfSSL_X509_NAME_free
wolfSSL Entering wolfSSL_X509_NAME_free
    Freeing der CA
        OK Freeing der CA
wolfSSL Leaving AddCA, return 0
wolfSSL Leaving ProcessBuffer, return 1
   Processed a CA
Processed at least one valid CA. Other stuff OK
wolfSSL Leaving wolfSSL_CTX_load_verify_buffer_ex, return 1
wolfSSL Entering wolfSSL_CTX_use_certificate_buffer
wolfSSL Entering ProcessBuffer
wolfSSL Entering PemToDer
Checking cert signature type
Getting Cert Name
wolfSSL Entering wolfSSL_X509_NAME_new_ex
wolfSSL Ent                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 ering wolfSSL_X509_NAME_add_entry_by_NID
Found place for name entry
wolfSSL Entering wolfSSL_X509_NAME_ENTRY_free
wolfSSL Entering wolfSSL_X509_NAME_add_entry_by_NID
Found place for name entry
wolfSSL Entering wolfSSL_X509_NAME_ENTRY_free
wolfSSL Entering wolfSSL_X509_NAME_add_entry_by_NID
Found place for name entry
wolfSSL Entering wolfSSL_X509_NAME_ENTRY_free
Getting Cert Name
wolfSSL Entering wolfSSL_X509_NAME_new_ex
wolfSSL Entering wolfSSL_X509_NAME_add_entry_by_NID
Found place for name entry
wolfSSL Entering wolfSSL_X509_NAME_ENTRY_free
wolfSSL Entering wolfSSL_X509_NAME_add_entry_by_NID
Found place for name entry
wolfSSL Entering wolfSSL_X509_NAME_ENTRY_free
wolfSSL Entering wolfSSL_X509_NAME_add_entry_by_NID
Found place for name entry
wolfSSL Entering wolfSSL_X509_NAME_ENTRY_free
wolfSSL Entering wolfSSL_X509_NAME_add_entry_by_NID
Found place for name entry
wolfSSL Entering wolfSSL_X509_NAME_ENTRY_free
wolfSSL Entering wolfSSL_X509_NAME_add_entry_by_NID
Found place for name entry
wolfSSL Entering wolfSSL_X509_NAME_ENTRY_free
wolfSSL Entering GetAlgoId
Cert signature not supported
wolfSSL Entering wolfSSL_X509_NAME_free
wolfSSL Entering wolfSSL_X509_NAME_free
wolfSSL Leaving ProcessBuffer, return 1
wolfSSL Leaving wolfSSL_CTX_use_certificate_buffer, return 1
wolfSSL Entering wolfSSL_CTX_use_PrivateKey_buffer
wolfSSL Entering ProcessBuffer
wolfSSL Entering PemToDer
wolfSSL Leaving ProcessBuffer, return 1
wolfSSL Leaving wolfSSL_CTX_use_PrivateKey_buffer, return 1
MQTT TLS Setup (1)
wolfSSL Entering wolfSSL_new
wolfSSL Entering ReinitSSL
RNG_HEALTH_TEST_CHECK_SIZE = 128
sizeof(seedB_data)         = 128
wolfSSL Entering SetSSL_CTX
wolfSSL Entering wolfSSL_NewSession
InitSSL done. return 0 (success)
wolfSSL_new InitSSL success
wolfSSL Leaving wolfSSL_new InitSSL =, return 0
TLS 1.2 or lower
wolfSSL Entering wolfSSL_connect
wolfSSL Entering ReinitSSL
wolfSSL Entering RetrySendAlert
wolfSSL Entering SendTls13ClientHello
Adding signature algorithms extension
Adding supported versions extension
wolfSSL Entering EccMakeKey
wolfSSL Leaving EccMakeKey, return 0
growing output buffer
PSK Key Exchange Modes extension to write
Key Share extension to write
Supported Versions extension to write
Signature Algorithms extension to write
Supported Groups extension to write
Encrypt-Then-Mac extension to write
IOSend: attempting to send 243 bytes
wolfSSL Entering wolfSSL_get_error
wolfSSL Leaving wolfSSL_get_error, return 0
wolfSSL Entering wolfSSL_ERR_error_string
wolfSSL Error: ok
Shrinking output buffer
wolfSSL Leaving SendTls13ClientHello, return 0
connect state: CLIENT_HELLO_SENT
Server state up to needed state.
Progressing server state...
ProcessReply...
wolfSSL Entering RetrySendAlert
IORecv: attempting to read 5 bytes
growing input buffer
IORecv: attempting to read 123 bytes
received record layer msg
got HANDSHAKE
wolfSSL Entering wolfSSL_get_options
wolfSSL Entering DoTls13HandShakeMsg
wolfSSL Entering EarlySanityCheckMsgReceived
wolfSSL Leaving EarlySanityCheckMsgReceived, return 0
wolfSSL Entering DoTls13HandShakeMsgType
processing server hello
wolfSSL Entering DoTls13ServerHello
Supported Versions extension received
Skipping Supported Versions - already processed
Key Share extension received
wolfSSL Entering EccSharedSecret
wolfSSL Leaving EccSharedSecret, return 0
wolfSSL Entering VerifyClientSuite
wolfSSL Leaving DoTls13ServerHello, return 0
Derive Early Secret
Derive Handshake Secret
Derive Client Handshake Secret
Derive Server Handshake Secret
Derive Client Key
Derive Server Key
Derive Client IV
Derive Server IV
wolfSSL Leaving DoTls13HandShakeMsgType(), return 0
wolfSSL Leaving DoTls13HandShakeMsg, return 0
Shrinking input buffer
ProcessReply done.
Progressing server state...
wolfSSL Entering wolfSSL_connect_TLSv13
wolfSSL Entering ReinitSSL
wolfSSL Entering RetrySendAlert
connect state: HELLO_AGAIN
connect state: HELLO_AGAIN_REPLY
wolfSSL Entering RetrySendAlert
IORecv: attempting to read 5 bytes
growing input buffer
IORecv: attempting to read 23 bytes
wolfSSL Entering DecryptTls13
received record layer msg
got HANDSHAKE
wolfSSL Entering wolfSSL_get_options
wolfSSL Entering DoTls13HandShakeMsg
wolfSSL Entering EarlySanityCheckMsgReceived
wolfSSL Leaving EarlySanityCheckMsgReceived, return 0
wolfSSL Entering DoTls13HandShakeMsgType
processing encrypted extensions
wolfSSL Entering DoTls13EncryptedExtensions
wolfSSL Leaving DoTls13EncryptedExtensions, return 0
wolfSSL Leaving DoTls13HandShakeMsgType(), return 0
wolfSSL Leaving DoTls13HandShakeMsg, return 0
Shrinking input buffer
wolfSSL Entering RetrySendAlert
IORecv: attempting to read 5 bytes
growing input buffer
IORecv: attempting to read 141 bytes
wolfSSL Entering DecryptTls13
received record layer msg
got HANDSHAKE
wolfSSL Entering wolfSSL_get_options
wolfSSL Entering DoTls13HandShakeMsg
wolfSSL Entering EarlySanityCheckMsgReceived
wolfSSL Leaving EarlySanityCheckMsgReceived, return 0
wolfSSL Entering DoTls13HandShakeMsgType
processing certificate request
wolfSSL Entering DoTls13CertificateRequest
Signature Algorithms extension received
Certificate Authorities extension received
wolfSSL Entering wolfSSL_sk_X509_NAME_new
wolfSSL Entering wolfSSL_sk_new_node
Getting Name
Getting Cert Name
wolfSSL Entering wolfSSL_X509_NAME_new_ex
wolfSSL Entering wolfSSL_X509_NAME_add_entry_by_NID
Found place for name entry
wolfSSL Entering wolfSSL_X509_NAME_ENTRY_free
wolfSSL Entering wolfSSL_X509_NAME_add_entry_by_NID
Found place for name entry
wolfSSL Entering wolfSSL_X509_NAME_ENTRY_free
wolfSSL Entering wolfSSL_X509_NAME_add_entry_by_NID
Found place for name entry
wolfSSL Entering wolfSSL_X509_NAME_ENTRY_free
wolfSSL Entering wolfSSL_X509_NAME_new_ex
wolfSSL Entering wolfSSL_sk_X509_NAME_push
wolfSSL Entering wolfSSL_sk_push
wolfSSL Entering wolfSSL_sk_insert
wolfSSL Entering wolfSSL_X509_NAME_free
wolfSSL Leaving DoTls13CertificateRequest, return 0
wolfSSL Leaving DoTls13HandShakeMsgType(), return 0
wolfSSL Leaving DoTls13HandShakeMsg, return 0
Shrinking input buffer
wolfSSL Entering RetrySendAlert
IORecv: attempting to read 5 bytes
growing input buffer
IORecv: attempting to read 1757 bytes
wolfSSL Entering DecryptTls13
received record layer msg
got HANDSHAKE
wolfSSL Entering wolfSSL_get_options
wolfSSL Entering DoTls13HandShakeMsg
wolfSSL Entering EarlySanityCheckMsgReceived
wolfSSL Leaving EarlySanityCheckMsgReceived, return 0
wolfSSL Entering DoTls13HandShakeMsgType
processing certificate
wolfSSL Entering DoTls13Certificate
wolfSSL Entering ProcessPeerCerts
Loading peer's cert chain
    Parsing 0 bytes of cert extensions
    Put another cert into chain
    Parsing 0 bytes of cert extensions
    Put another cert into chain
Getting Cert Name
wolfSSL Entering wolfSSL_X509_NAME_new_ex
wolfSSL Entering wolfSSL_X509_NAME_add_entry_by_NID
Found place for name entry
wolfSSL Entering wolfSSL_X509_NAME_ENTRY_free
wolfSSL Entering wolfSSL_X509_NAME_add_entry_by_NID
Found place for name entry
wolfSSL Entering wolfSSL_X509_NAME_ENTRY_free
wolfSSL Entering wolfSSL_X509_NAME_add_entry_by_NID
Found place for name entry
wolfSSL Entering wolfSSL_X509_NAME_ENTRY_free
Getting Cert Name
wolfSSL Entering wolfSSL_X509_NAME_new_ex
wolfSSL Entering wolfSSL_X509_NAME_add_entry_by_NID
Found place for name entry
wolfSSL Entering wolfSSL_X509_NAME_ENTRY_free
wolfSSL Entering wolfSSL_X509_NAME_add_entry_by_NID
Found place for name entry
wolfSSL Entering wolfSSL_X509_NAME_ENTRY_free
wolfSSL Entering wolfSSL_X509_NAME_add_entry_by_NID
Found place for name entry
wolfSSL Entering wolfSSL_X509_NAME_ENTRY_free
wolfSSL Entering wolfSSL_X509_NAME_add_entry_by_NID
Found place for name entry
wolfSSL Entering wolfSSL_X509_NAME_ENTRY_free
wolfSSL Entering wolfSSL_X509_NAME_add_entry_by_NID
Found place for name entry
wolfSSL Entering wolfSSL_X509_NAME_ENTRY_free
wolfSSL Entering GetAlgoId
wolfSSL Entering DecodeCertExtensions
wolfSSL Entering DecodeAltNames
    Unsupported name type, skipping
CA found
wolfSSL Entering wolfSSL_X509_NAME_free
wolfSSL Entering wolfSSL_X509_NAME_free
Getting Cert Name
wolfSSL Entering wolfSSL_X509_NAME_new_ex
wolfSSL Entering wolfSSL_X509_NAME_add_entry_by_NID
Found place for name entry
wolfSSL Entering wolfSSL_X509_NAME_ENTRY_free
wolfSSL Entering wolfSSL_X509_NAME_add_entry_by_NID
Found place for name entry
wolfSSL Entering wolfSSL_X509_NAME_ENTRY_free
wolfSSL Entering wolfSSL_X509_NAME_add_entry_by_NID
Found place for name entry
wolfSSL Entering wolfSSL_X509_NAME_ENTRY_free
Getting Cert Name
wolfSSL Entering wolfSSL_X509_NAME_new_ex
wolfSSL Entering wolfSSL_X509_NAME_add_entry_by_NID
Found place for name entry
wolfSSL Entering wolfSSL_X509_NAME_ENTRY_free
wolfSSL Entering wolfSSL_X509_NAME_add_entry_by_NID
Found place for name entry
wolfSSL Entering wolfSSL_X509_NAME_ENTRY_free
wolfSSL Entering wolfSSL_X509_NAME_add_entry_by_NID
Found place for name entry
wolfSSL Entering wolfSSL_X509_NAME_ENTRY_free
wolfSSL Entering GetAlgoId
wolfSSL Entering DecodeCertExtensions
wolfSSL Entering DecodeSubjKeyId
wolfSSL Entering DecodeAuthKeyId
wolfSSL Entering DecodeBasicCaConstraint
CA found
wolfSSL Entering ConfirmSignature
mp_to_unsigned_bin_len_ct...
wolfSSL Leaving ConfirmSignature, return 0
Verified CA from chain and already had it
wolfSSL Entering wolfSSL_X509_STORE_CTX_new_ex
wolfSSL Entering wolfSSL_X509_STORE_CTX_init
wolfSSL Entering wolfSSL_X509_set_issuer_name
wolfSSL Entering wolfSSL_X509_NAME_copy
wolfSSL Entering wolfSSL_X509_set_subject_name
wolfSSL Entering wolfSSL_X509_NAME_copy
MQTT TLS Verify Callback: PreVerify 1, Error 0 (none)
  Subject's domain name is 
wolfSSL Entering wolfSSL_FreeX509
wolfSSL Entering ExternalFreeX509
wolfSSL Entering wolfSSL_X509_STORE_CTX_free
wolfSSL Entering wolfSSL_sk_X509_pop_free
wolfSSL Entering wolfSSL_sk_pop_free
wolfSSL Entering wolfSSL_FreeX509
wolfSSL Entering ExternalFreeX509
wolfSSL Entering wolfSSL_X509_NAME_free
wolfSSL Entering wolfSSL_X509_NAME_free
Verifying Peer's cert
Getting Cert Name
wolfSSL Entering wolfSSL_X509_NAME_new_ex
wolfSSL Entering wolfSSL_X509_NAME_add_entry_by_NID
Found place for name entry
wolfSSL Entering wolfSSL_X509_NAME_ENTRY_free
wolfSSL Entering wolfSSL_X509_NAME_add_entry_by_NID
Found place for name entry
wolfSSL Entering wolfSSL_X509_NAME_ENTRY_free
wolfSSL Entering wolfSSL_X509_NAME_add_entry_by_NID
Found place for name entry
wolfSSL Entering wolfSSL_X509_NAME_ENTRY_free
Getting Cert Name
wolfSSL Entering wolfSSL_X509_NAME_new_ex
wolfSSL Entering wolfSSL_X509_NAME_add_entry_by_NID
Found place for name entry
wolfSSL Entering wolfSSL_X509_NAME_ENTRY_free
wolfSSL Entering wolfSSL_X509_NAME_add_entry_by_NID
Found place for name entry
wolfSSL Entering wolfSSL_X509_NAME_ENTRY_free
wolfSSL Entering wolfSSL_X509_NAME_add_entry_by_NID
Found place for name entry
wolfSSL Entering wolfSSL_X509_NAME_ENTRY_free
wolfSSL Entering wolfSSL_X509_NAME_add_entry_by_NID
Found place for name entry
wolfSSL Entering wolfSSL_X509_NAME_ENTRY_free
wolfSSL Entering wolfSSL_X509_NAME_add_entry_by_NID
Found place for name entry
wolfSSL Entering wolfSSL_X509_NAME_ENTRY_free
wolfSSL Entering GetAlgoId
wolfSSL Entering DecodeCertExtensions
wolfSSL Entering DecodeAltNames
    Unsupported name type, skipping
CA found
wolfSSL Entering ConfirmSignature
mp_to_unsigned_bin_len_ct...
wolfSSL Leaving ConfirmSignature, return 0
Verified Peer's cert
wolfSSL Entering wolfSSL_X509_set_issuer_name
wolfSSL Entering wolfSSL_X509_NAME_copy
wolfSSL Entering wolfSSL_X509_set_subject_name
wolfSSL Entering wolfSSL_X509_NAME_copy
wolfSSL Entering wolfSSL_X509_STORE_CTX_new_ex
wolfSSL Entering wolfSSL_X509_STORE_CTX_init
wolfSSL Entering wolfSSL_X509_set_issuer_name
wolfSSL Entering wolfSSL_X509_NAME_copy
wolfSSL Entering wolfSSL_X509_set_subject_name
wolfSSL Entering wolfSSL_X509_NAME_copy
Unable to copy to ssl->peerCert
MQTT TLS Verify Callback: PreVerify 1, Error 0 (none)
  Subject's domain name is Combros
wolfSSL Entering wolfSSL_X509_STORE_CTX_free
wolfSSL Entering wolfSSL_sk_X509_pop_free
wolfSSL Entering wolfSSL_sk_pop_free
wolfSSL Entering wolfSSL_FreeX509
wolfSSL Entering ExternalFreeX509
wolfSSL Leaving ProcessPeerCerts, return 0
wolfSSL Entering wolfSSL_X509_NAME_free
wolfSSL Entering wolfSSL_X509_NAME_free
wolfSSL Leaving DoTls13Certificate, return 0
wolfSSL Leaving DoTls13HandShakeMsgType(), return 0
wolfSSL Leaving DoTls13HandShakeMsg, return 0
Shrinking input buffer
wolfSSL Entering RetrySendAlert
IORecv: attempting to read 5 bytes
growing input buffer
IORecv: attempting to read 281 bytes
wolfSSL Entering DecryptTls13
received record layer msg
got HANDSHAKE
wolfSSL Entering wolfSSL_get_options
wolfSSL Entering DoTls13HandShakeMsg
wolfSSL Entering EarlySanityCheckMsgReceived
wolfSSL Leaving EarlySanityCheckMsgReceived, return 0
wolfSSL Entering DoTls13HandShakeMsgType
processing certificate verify
wolfSSL Entering DoTls13CertificateVerify
Peer sent RSA sig
Doing RSA peer cert verify
wolfSSL Entering RsaVerify
mp_to_unsigned_bin_len_ct...
wolfSSL Using RSA PSS un-padding
wolfSSL Leaving RsaVerify, return 128
wolfSSL Leaving DoTls13CertificateVerify, return 0
wolfSSL Leaving DoTls13HandShakeMsgType(), return 0
wolfSSL Leaving DoTls13HandShakeMsg, return 0
Shrinking input buffer
wolfSSL Entering RetrySendAlert
IORecv: attempting to read 5 bytes
growing input buffer
IORecv: attempting to read 69 bytes
wolfSSL Entering DecryptTls13
received record layer msg
got HANDSHAKE
wolfSSL Entering wolfSSL_get_options
wolfSSL Entering DoTls13HandShakeMsg
wolfSSL Entering EarlySanityCheckMsgReceived
wolfSSL Leaving EarlySanityCheckMsgReceived, return 0
wolfSSL Entering DoTls13HandShakeMsgType
processing finished
wolfSSL Entering DoTls13Finished
Derive Finished Secret
Derive Finished Secret
wolfSSL Leaving DoTls13Finished, return 0
Derive Master Secret
Derive Client Traffic Secret
Derive Server Traffic Secret
Derive Client Key
Derive Server Key
Derive Client IV
Derive Server IV
wolfSSL Leaving DoTls13HandShakeMsgType(), return 0
wolfSSL Leaving DoTls13HandShakeMsg, return 0
Shrinking input buffer
connect state: FIRST_REPLY_DONE
connect state: FIRST_REPLY_FIRST
connect state: FIRST_REPLY_SECOND
wolfSSL Entering SendTls13Certificate
growing output buffer
wolfSSL Entering BuildTls13Message
wolfSSL Entering EncryptTls13
wolfSSL Leaving BuildTls13Message, return 0
IOSend: attempting to send 836 bytes
wolfSSL Entering wolfSSL_get_error
wolfSSL Leaving wolfSSL_get_error, return 0
wolfSSL Entering wolfSSL_ERR_error_string
wolfSSL Error: ok
Shrinking output buffer
wolfSSL Leaving SendTls13Certificate, return 0
sent: certificate
connect state: FIRST_REPLY_THIRD
wolfSSL Entering SendTls13CertificateVerify
growing output buffer
Trying RSA private key
Using RSA private key
wolfSSL Entering RsaSign
wolfSSL Using RSA PSS padding
mp_to_unsigned_bin_len_ct...
wolfSSL Leaving RsaSign, return 0
wolfSSL Entering VerifyRsaSign
mp_to_unsigned_bin_len_ct...
wolfSSL Using RSA PSS un-padding
wolfSSL Leaving VerifyRsaSign, return 0
wolfSSL Entering BuildTls13Message
wolfSSL Entering EncryptTls13
wolfSSL Leaving BuildTls13Message, return 0
IOSend: attempting to send 286 bytes
wolfSSL Entering wolfSSL_get_error
wolfSSL Leaving wolfSSL_get_error, return 0
wolfSSL Entering wolfSSL_ERR_error_string
wolfSSL Error: ok
Shrinking output buffer
wolfSSL Leaving SendTls13CertificateVerify, return 0
sent: certificate verify
connect state: FIRST_REPLY_FOURTH
wolfSSL Entering SendTls13Finished
growing output buffer
wolfSSL Entering BuildTls13Message
wolfSSL Entering EncryptTls13
wolfSSL Leaving BuildTls13Message, return 0
Derive Resumption Secret
IOSend: attempting to send 74 bytes
wolfSSL Entering wolfSSL_get_error
wolfSSL Leaving wolfSSL_get_error, return 0
wolfSSL Entering wolfSSL_ERR_error_string
wolfSSL Error: ok
Shrinking output buffer
wolfSSL Leaving SendTls13Finished, return 0
sent: finished
connect state: FINISHED_DONE
wolfSSL Entering FreeHandshakeResources
Signature Algorithms extension to free
Supported Groups extension free
Supported Versions extension free
Key Share extension free
wolfSSL Leaving wolfSSL_connect_TLSv13, return 1
MQTT Network Connect Success: Host 171.244.35.168, Port 10121, UseTLS 1
***************************************************



*********************MQTT CLIENT*********************
wolfSSL Entering wolfSSL_write
wolfSSL Entering RetrySendAlert
growing output buffer
wolfSSL Entering BuildTls13Message
wolfSSL Entering EncryptTls13
wolfSSL Leaving BuildTls13Message, return 0
IOSend: attempting to send 61 bytes
NetWrite: Error -7 (Sock Err 0)
wolfSSL Entering wolfSSL_get_error
wolfSSL Leaving wolfSSL_get_error, return 0
wolfSSL Entering wolfSSL_ERR_error_string
wolfSSL Error: ok
IORecv error: -1
wolfSSL error occurred, error = 308 line:25212 file:../Middlewares/Third_Party/
wolfSSL Leaving wolfSSL_write, return -308
MQTT Error -8: Error (Network)

Thank for reading and any supporting.