ThreadX docsThreadX docs
ThreadX
ThreadX Modules
NetX Duo
FileX
GUIX
USBX
TraceX
LevelX
ThreadX
ThreadX Modules
NetX Duo
FileX
GUIX
USBX
TraceX
LevelX
  • NetX Duo Documentation

    • Understand NetX Duo
    • NetX Duo documentation
    • Chapter 1 - Introduction to NetX Duo
    • Chapter 2 - Installation and Use of NetX Duo
    • Chapter 3 - Functional Components of NetX Duo
    • Chapter 4 - Description of NetX Duo Services
    • Chapter 5 - NetX Duo Network Drivers
    • Appendix A - NetX Duo Services
    • Appendix B - NetX Duo Constants
    • Appendix C - NetX Duo Data Types
    • Appendix D - NetX Duo BSD-Compatible Socket API
    • Appendix E - NetX Duo ASCII Character Codes
    • Auto-IP

      • Chapter 1 - Introduction to NetX Duo AutoIP
      • Chapter 2 - Installation and use of NetX Duo AutoIP
      • Chapter 3 - Description of NetX Duo AutoIP services
    • BSD

      • Chapter 1 - Introduction to NetX Duo BSD
      • Chapter 2 - Installation and use of NetX Duo BSD
      • Chapter 3 - NetX Duo BSD Services
    • Crypto

      • Chapter 1 - Introduction to NetX Duo Crypto
      • Chapter 2 - Installation and use of NetX Duo Crypto
      • Chapter 3 - Functional description of NetX Duo Crypto
      • Chapter 4 - NetX Duo Crypto API description
      • Appendix - NetX Duo Crypto CAVS test
    • DHCP Client

      • Chapter 1 - Introduction to the NetX Duo DHCP Client
      • Chapter 2 - Installation and use of NetX Duo DHCP Client
      • Chapter 3 - Description of NetX Duo DHCP Client services
      • Appendix A - Description of the Restore state feature for NetX Duo DHCP Client services
    • DHCP Server

      • Chapter 1 - Introduction to NetX Duo DHCP Server
      • Chapter 2 - Installation and Use of the NetX Duo DHCP Server
      • Chapter 3 - Description of NetX Duo DHCP server services
    • DHCPv6 Client

      • Chapter 1 - Introduction to NetX Duo DHCPv6 Client
      • Chapter 2 - Installation and use of NetX Duo DHCPv6 Client
      • Chapter 3 - NetX Duo DHCPv6 configuration options
      • Chapter 4 - NetX Duo DHCPv6 Client services
      • Appendix A - Description of the Restore State Feature for NetX Duo DHCPv6 Client
    • DHCPv6 Server

      • Chapter 1 - Introduction to NetX Duo DHCPv6 server
      • Chapter 2 - Installation and use of NetX Duo DHCPv6 server
      • Chapter 3 - NetX Duo DHCPv6 server configuration options
      • Chapter 4 - NetX Duo DHCPv6 server services
      • Appendix A – NetX Duo DHCPv6 option codes
      • Appendix B - NetX Duo DHCPv6 server status codes
      • Appendix C - NetX Duo DHCPv6 unique identifiers (DUIDs)
      • Appendix D - NetX Duo Advanced DHCPv6 server example
    • DNS

      • Chapter 1 - Introduction to the NetX Duo DNS Client
      • Chapter 2 - Installation and Use of NetX Duo DNS Client
      • Chapter 3 - Description of NetX Duo DNS Client Services
    • FTP

      • Chapter 1 - Introduction to NetX Duo FTP
      • Chapter 2 - Installation and use of FTP
      • Chapter 3 - Description of FTP services
    • HTTP

      • Chapter 1 - Introduction to NetX Duo HTTP
      • Chapter 2 - Installation and Use of NetX Duo HTTP
      • Chapter 3 - Description of NetX Duo HTTP Services
    • iperf

      • Chapter 1 - Introduction to NetX Duo Iperf
      • Chapter 2 - Installing and using NetX Duo Iperf
      • Chapter 3 - Running the UDP Transmit Test
    • mDNS

      • Chapter 1 - Introduction to NetX Duo mDNS/DNS-SD
      • Chapter 2 - Installation and use of mDNS
      • Chapter 3 - Description of internal service cache
      • Chapter 4 - Description of mDNS services
    • mqtt

      • Chapter 1 - Introduction to NetX Duo MQTT
      • Chapter 2 - Installation and use of NetX Duo MQTT client
      • Chapter 3 - Description of NetX Duo MQTT Client Services
    • NAT

      • Chapter 1 - An introduction to Network Address Translation
      • Chapter 2 - Installation and use of NAT
      • Chapter 3 - NAT configuration options
      • Chapter 4 - Description of NAT services
    • POP3 Client

      • Chapter 1 - Introduction to NetX Duo POP3
      • Chapter 2 - Installation and use of NetX Duo POP3 Client
      • Chapter 3 - Description of POP3 Client services
    • PPP

      • Chapter 1 - Introduction to the NetX Duo Point-to-Point Protocol (PPP)
      • Chapter 2 - Installation and use of NetX Duo Point-to-Point Protocol (PPP)
      • Chapter 3 - Description of NetX Duo Point-to-Point Protocol (PPP) services
    • PTP Client

      • Chapter 1 - Introduction to NetX Duo PTP Client
      • Chapter 2 - Installation and Use of NetX Duo PTP Client
      • Chapter 3 - Description of NetX Duo PTP Client Services
    • rtp

      • Chapter 1 - Introduction to the NetX Duo RTP Sender
      • Chapter 2 - Installation and use of NetX Duo RTP Sender
      • Chapter 3 - Description of NetX Duo RTP Sender Services
    • rtsp

      • Chapter 1 - Introduction to the NetX Duo RTSP Server
      • Chapter 2 - Installation and use of NetX Duo RTSP Server
      • Chapter 3 - Description of NetX Duo RTSP Server Services
    • Secure DTLS

      • Chapter 1 - Introduction to NetX Duo Secure DTLS
      • Chapter 2 - Installation and use of NetX Duo Secure DTLS
      • Chapter 3 - Functional description of NetX Duo Secure DTLS
      • Chapter 4 - Description of NetX Duo Secure DTLS services
      • Appendix A - NetX Duo Secure DTLS return/error codes
    • Secure TLS

      • Chapter 1 - Introduction to NetX Duo Secure
      • Chapter 2 - Installation and use of NetX Duo Secure
      • Chapter 3 - Functional description of NetX Duo Secure
      • Chapter 4 - Description of NetX Duo Secure services
      • Appendix A - NetX Duo Secure return/error codes
    • SMTP Client

      • Chapter 1 - Introduction to NetX Duo SMTP client
      • Chapter 2 - Installation and use of NetX Duo SMTP client
      • Chapter 3 - Client description of SMTP Client services
    • snmp

      • Chapter 1 - Introduction to NetX Duo SNMP
      • Chapter 2 - Installation and use of the NetX Duo SNMP agent
      • Chapter 3 - Description of NetX Duo SNMP agent services
    • sntp client

      • Chapter 1 - Introduction to NetX Duo SNTP
      • Chapter 2 - Installation and Use of NetX Duo SNTP Client
      • Chapter 3 - Description of NetX Duo SNTP Client Services
      • Appendix A - NetX Duo SNTP Fatal Error Codes
    • telnet

      • Chapter 1 - Introduction to NetX Duo Telnet
      • Chapter 2 - Installation and use of NetX Duo Telnet
      • Chapter 3 - Description of NetX Duo Telnet services
    • TFTP

      • Chapter 1 - Introduction to NetX Duo TFTP
      • Chapter 2 - Installation and use of NetX Duo TFTP
      • Chapter 3 - Description of NetX Duo TFTP services
    • Web HTTP

      • Chapter 1 - Introduction to HTTP and HTTPS
      • Chapter 2 - Installation and use of HTTP and HTTPS
      • Chapter 3 - Description of HTTP services
    • About the NetX Duo User Guide

Appendix A: NetX Duo Secure DTLS return/error codes

NetX Duo Secure TLS/DTLS return codes

Table 1 below lists the possible error codes that may be returned by NetX Duo Secure DTLS services. Note that the services may also return UDP or IP error codes – TLS values begin at 0x101 and TCP/IP/UDP values are below 0x100. X.509 return values start at 0x181. Refer to the NetX Duo TCP/IP/UDP documentation for information on IP and UDP return values and see below for X.509 values.

Error NameValueDescription
NX_SECURE_TLS_SUCCESS0x00Function returned successfully. (Same as NX_SUCCESS).
NX_SECURE_TLS_SESSION_UNINITIALIZED0x101TLS main loop called with uninitialized socket.
NX_SECURE_TLS_UNRECOGNIZED_MESSAGE_TYPE0x102TLS record layer received an unrecognized message type.
NX_SECURE_TLS_INVALID_STATE0x103Internal error - state not recognized.
NX_SECURE_TLS_INVALID_PACKET0x104Internal error - received packet did not contain TLS data.
NX_SECURE_TLS_UNKNOWN_CIPHERSUITE0x105The chosen ciphersuite is not supported - internal error for server, for client it means the remote host sent a bad ciphersuite (error or attack).
NX_SECURE_TLS_UNSUPPORTED_CIPHER0x106In doing an encryption or decryption, the chosen cipher is disabled or unavailable.
NX_SECURE_TLS_HANDSHAKE_FAILURE0x107Something in message processing during the handshake has failed.
NX_SECURE_TLS_HASH_MAC_VERIFY_FAILURE0x108An incoming record had a MAC that did not match the one we generated.
NX_SECURE_TLS_TCP_SEND_FAILED0x109The outgoing TCP send of a record failed for some reason.
NX_SECURE_TLS_INCORRECT_MESSAGE_LENGTH0x10AAn incoming message had a length that was incorrect (usually a length other than one in the header, as in certificate messages)
NX_SECURE_TLS_BAD_CIPHERSPEC0x10BAn incoming ChangeCipherSpec message was incorrect.
NX_SECURE_TLS_INVALID_SERVER_CERT0x10CAn incoming server certificate did not parse correctly.
NX_SECURE_TLS_UNSUPPORTED_PUBLIC_CIPHER0x10DA certificate provided by a server specified a public-key operation we do not support.
NX_SECURE_TLS_NO_SUPPORTED_CIPHERS0x10EReceived a ClientHello with no supported ciphersuites.
NX_SECURE_TLS_UNKNOWN_TLS_VERSION0x10FAn incoming record had a TLS version that isn't recognized.
NX_SECURE_TLS_UNSUPPORTED_TLS_VERSION0x110An incoming record had a valid TLS version, but one that isn't supported.
NX_SECURE_TLS_ALLOCATE_PACKET_FAILED0x111An internal packet allocation for a TLS message failed.
NX_SECURE_TLS_INVALID_CERTIFICATE0x112An X509 certificate did not parse correctly.
NX_SECURE_TLS_NO_CLOSE_RESPONSE0x113During a TLS session close, did not receive a CloseNotify from the remote host.
NX_SECURE_TLS_ALERT_RECEIVED0x114The remote host sent an alert, indicating an error and closing the connection.
NX_SECURE_TLS_FINISHED_HASH_FAILURE0x115The Finish message hash received does not match the local generated hash - handshake corruption.
NX_SECURE_TLS_UNKNOWN_CERT_SIG_ALGORITHM0x116A certificate during verification had an unsupported signature algorithm.
NX_SECURE_TLS_CERTIFICATE_SIG_CHECK_FAILED0x117A certificate signature verification check failed - certificate data did not match signature.
NX_SECURE_TLS_BAD_COMPRESSION_METHOD0x118Received a Hello message with an unsupported compression method.
NX_SECURE_TLS_CERTIFICATE_NOT_FOUND0x119In an operation on a certificate list, no matching certificate was found.
NX_SECURE_TLS_INVALID_SELF_SIGNED_CERT0x11AThe remote host sent a self-signed certificate and NX_SECURE_ALLOW_SELF_SIGNED_CERTIFICATES is not defined.
NX_SECURE_TLS_ISSUER_CERTIFICATE_NOT_FOUND0x11BA remote certificate was received with an issuer not in the local trusted store.
NX_SECURE_TLS_OUT_OF_ORDER_MESSAGE0x11CA DTLS message was received in the wrong order - a dropped datagram is the likely culprit.
NX_SECURE_TLS_INVALID_REMOTE_HOST0x11DA packet was received from a remote host that we do not recognize.
NX_SECURE_TLS_INVALID_EPOCH0x11EA DTLS message was received and matched to a DTLS session but it had the wrong epoch and should be ignored.
NX_SECURE_TLS_REPEAT_MESSAGE_RECEIVED0x11FA DTLS message was received with a sequence number we have already seen, ignore it.
NX_SECURE_TLS_NEED_DTLS_SESSION0x120A TLS session was used in a DTLS API that was not initialized for DTLS.
NX_SECURE_TLS_NEED_TLS_SESSION0x121A TLS session was used in a TLS API that was initialized for DTLS and not TLS.
NX_SECURE_TLS_SEND_ADDRESS_MISMATCH0x122Caller attempted to send data over a DTLS session with an IP address or port that did not match the session.
NX_SECURE_TLS_NO_FREE_DTLS_SESSIONS0x123A new connection tried to get a DTLS session from the cache, but there were none free.
NX_SECURE_DTLS_SESSION_NOT_FOUND0x124The caller searched for a DTLS session, but the given IP address and port did not match any entries in the cache.
NX_SECURE_TLS_NO_MORE_PSK_SPACE0x125The caller attempted to add a PSK to a TLS session but there was no more space in the given session.
NX_SECURE_TLS_NO_MATCHING_PSK0x126A remote host provided a PSK identity hint that did not match any in our local store.
NX_SECURE_TLS_CLOSE_NOTIFY_RECEIVED0x127A TLS session received a CloseNotify alert from the remote host indicating the session is complete.
NX_SECURE_TLS_NO_AVAILABLE_SESSIONS0x128No TLS sessions in a TLS object are available to handle a connection.
NX_SECURE_TLS_NO_CERT_SPACE_ALLOCATED0x129No certificate space was allocated for incoming remote certificates.
NX_SECURE_TLS_PADDING_CHECK_FAILED0x12AEncryption padding in an incoming message was not correct.
NX_SECURE_TLS_UNSUPPORTED_CERT_SIGN_TYPE0x12BIn processing a CertificateVerifyRequest, no supported certificate type was provided by the remote server.
NX_SECURE_TLS_UNSUPPORTED_CERT_SIGN_ALG0x12CIn processing a CertificateVerifyRequest, no supported signature algorithm was provided by the remote server.
NX_SECURE_TLS_INSUFFICIENT_CERT_SPACE0x12DNot enough certificate buffer space allocated for a certificate.
NX_SECURE_TLS_PROTOCOL_VERSION_CHANGED0x12EThe protocol version in an incoming TLS record did not match the version of the established session.
NX_SECURE_TLS_NO_RENEGOTIATION_ERROR0x12FA HelloRequest message was received, but we are not re-negotiating.
NX_SECURE_TLS_UNSUPPORTED_FEATURE0x130A feature that was disabled was encountered during a TLS session or handshake.
NX_SECURE_TLS_CERTIFICATE_VERIFY_FAILURE0x131A CertificateVerify message from a remote Client failed to verify the Client certificate.
NX_SECURE_TLS_EMPTY_REMOTE_CERTIFICATE_RECEIVED0x132The remote host sent an empty certificate message.
NX_SECURE_TLS_RENEGOTIATION_EXTENSION_ERROR0x133An error occurred in processing an or sending a Secure Renegotiation Indication extension.
NX_SECURE_TLS_RENEGOTIATION_SESSION_INACTIVE0x134A session renegotiation was attempting with a TLS session that was not active.
NX_SECURE_TLS_PACKET_BUFFER_TOO_SMALL0x135TLS received a record that was too large for the assigned packet buffer. The record could not be processed.
NX_SECURE_TLS_EXTENSION_NOT_FOUND0x136A specified extension was not received from the remote host during the TLS handshake.
NX_SECURE_TLS_SNI_EXTENSION_INVALID0x137TLS received an invalid Server Name Indication extension.
NX_SECURE_TLS_CERT_ID_INVALID0x138Application tried to add a server certificate with an invalid certificate ID value (likely 0).
NX_SECURE_TLS_CERT_ID_DUPLICATE0x139Application tried to add a server certificate with a certificate ID already present in the local store.
NX_SECURE_TLS_RENEGOTIATION_FAILURE0x13AThe remote host did not provide the Secure Renegotiation Indication Extension or the SCSV pseudo-ciphersuite so secure renegotiation cannot be performed.
NX_SECURE_TLS_MISSING_CRYPTO_ROUTINE0x13BIn attempting to perform a cryptographic operation, one of the entries in the ciphersuite table (or one of its function pointers) was improperly set to NULL.

Table 1 – NetX Duo Secure TLS error return codes

NetX Duo Secure X.509 Return Codes

Table 2 below lists the possible error codes that may be returned by NetX Duo Secure X.509 services. Note that the services may also return other error codes. X.509 return values start at 0x181, TLS values begin at 0x101, and TCP/IP values are below 0x100. Refer to the NetX Duo TCP/IP documentation for information on TCP/IP return values and above for TLS return values.

Error NameValueDescription
NX_SECURE_X509_SUCCESS0x00Successful return status. (Same as NX_SUCCESS)
NX_SECURE_X509_MULTIBYTE_TAG_UNSUPPORTED0x181We encountered a multi-byte ASN.1 tag - not currently supported.
NX_SECURE_X509_ASN1_LENGTH_TOO_LONG0x182Encountered a length value longer than we can handle.
NX_SECURE_X509_FOUND_NON_ZERO_PADDING0x183Expected a padding value of 0 - got something different.
NX_SECURE_X509_MISSING_PUBLIC_KEY0x184X509 expected a public key but didn't find one.
NX_SECURE_X509_INVALID_PUBLIC_KEY0x185Found a public key, but it is invalid or has an incorrect format.
NX_SECURE_X509_INVALID_CERTIFICATE_SEQUENCE0x186The top-level ASN.1 block is not a sequence - invalid X509 certificate.
NX_SECURE_X509_MISSING_SIGNATURE_ALGORITHM0x187Expecting a signature algorithm identifier, did not find it.
NX_SECURE_X509_INVALID_CERTIFICATE_DATA0x188Certificate identity data is in an invalid format.
NX_SECURE_X509_UNEXPECTED_ASN1_TAG0x189We were expecting a specific ASN.1 tag for X509 format but we got something else.
NX_SECURE_PKCS1_INVALID_PRIVATE_KEY0x18AA PKCS#1 private key file was passed in, but the formatting was incorrect.
NX_SECURE_X509_CHAIN_TOO_SHORT0x18BAn X509 certificate chain was too short to hold the entire chain during chain building.
NX_SECURE_X509_CHAIN_VERIFY_FAILURE0x18CAn X509 certificate chain was unable to be verified (catch-all error).
NX_SECURE_X509_PKCS7_PARSING_FAILED0x18DParsing an X.509 PKCS#7-encoded signature failed.
NX_SECURE_X509_CERTIFICATE_NOT_FOUND0x18EIn looking up a certificate, no matching entry was found.
NX_SECURE_X509_INVALID_VERSION0x18FA certificate included a field that isn't compatible with the given version.
NX_SECURE_X509_INVALID_TAG_CLASS0x190A certificate included an ASN.1 tag with an invalid tag class value.
NX_SECURE_X509_INVALID_EXTENSIONS0x191A certificate included an extensions TLV but that did not contain a sequence.
NX_SECURE_X509_INVALID_EXTENSION_SEQUENCE0x192A certificate included an extension sequence that was invalid X.509.
NX_SECURE_X509_CERTIFICATE_EXPIRED0x193A certificate had a "not after" field that was less than the current time.
NX_SECURE_X509_CERTIFICATE_NOT_YET_VALID0x194A certificate had a "not before" field that was greater than the current time.
NX_SECURE_X509_CERTIFICATE_DNS_MISMATCH0x195A certificate Common Name or Subject Alt Name did not match a given DNS TLD.
NX_SECURE_X509_INVALID_DATE_FORMAT0x196A certificate contained a date field that is not in a recognized format.
NX_SECURE_X509_CRL_ISSUER_MISMATCH0x197A provided CRL and certificate were not issued by the same Certificate Authority.
NX_SECURE_X509_CRL_SIGNATURE_CHECK_FAILED0x198A CRL signature check failed against its issuer.
NX_SECURE_X509_CRL_CERTIFICATE_REVOKED0x199A certificate was found in a valid CRL and has therefore been revoked.
NX_SECURE_X509_WRONG_SIGNATURE_METHOD0x19AIn attempting to validate a signature the signature method did not match the expected method.
NX_SECURE_X509_EXTENSION_NOT_FOUND0x19BIn looking for an extension, no extension with a matching ID was found.
NX_SECURE_X509_ALT_NAME_NOT_FOUND0x19CA name was searched for in a subjectAltName extension but was not found.
NX_SECURE_X509_INVALID_PRIVATE_KEY_TYPE0x19DPrivate key type given was unknown or invalid.
NX_SECURE_X509_NAME_STRING_TOO_LONG0x19EPassed a name string that was too long for an internal buffer (DNS name, etc…).
NX_SECURE_X509_EXT_KEY_USAGE_NOT_FOUND0x19FIn searching an Extended Key Usage extension, the specified key usage OID was not found.
NX_SECURE_X509_KEY_USAGE_ERROR0x1A0To be returned by the application callback if there is a failure in key usage during a certificate verification check.

Table 2 – NetX Duo Secure X.509 error return codes

Prev
Chapter 4 - Description of NetX Duo Secure DTLS services