ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
esp_idf_mdl_compat_internal.h File Reference

ESP-IDF media-service declarations for target builds and AST audits. More...

#include <stddef.h>
#include <stdint.h>
#include "esp_err.h"
#include "ra8_attributes.h"
Include dependency graph for esp_idf_mdl_compat_internal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  esp_http_client_event_t
 Parser mirror of the ESP-IDF HTTP event record. More...
struct  esp_http_client_config_t
 Exact consumed subset of ESP-IDF's HTTP client configuration. More...
struct  mbedtls_sha256_context
 Parser-only storage standing in for ESP-IDF's SHA-256 context. More...

Macros

#define esp_crt_bundle_attach   priv_esp_crt_bundle_attach
 Map the parser bundle callback to its module-private stand-in.
#define esp_http_client_init   priv_esp_http_client_init
 Map the parser HTTP constructor to its module-private stand-in.
#define esp_http_client_close   priv_esp_http_client_close
 Map the parser HTTP close operation to its private stand-in.
#define esp_http_client_set_url   priv_esp_http_client_set_url
 Map the parser URL setter to its module-private stand-in.
#define esp_http_client_set_header   priv_esp_http_client_set_header
 Map the parser request-header setter to its private stand-in.
#define esp_http_client_delete_header   priv_esp_http_client_delete_header
 Map the parser request-header remover to its private stand-in.
#define esp_http_client_set_timeout_ms   priv_esp_http_client_set_timeout_ms
 Map the parser timeout setter to its private stand-in.
#define esp_http_client_open   priv_esp_http_client_open
 Map the parser HTTP open operation to its private stand-in.
#define esp_http_client_fetch_headers   priv_esp_http_client_fetch_headers
 Map the parser header fetch to its module-private stand-in.
#define esp_http_client_get_status_code   priv_esp_http_client_get_status_code
 Map the parser status accessor to its module-private stand-in.
#define esp_http_client_read   priv_esp_http_client_read
 Map the parser body reader to its module-private stand-in.
#define esp_http_client_is_complete_data_received   priv_esp_http_client_is_complete_data_received
 Map the parser completion query to its module-private stand-in.
#define mbedtls_sha256_init   priv_mbedtls_sha256_init
 Map the parser SHA-256 initializer to its private stand-in.
#define mbedtls_sha256_starts   priv_mbedtls_sha256_starts
 Map the parser SHA-256 start operation to its private stand-in.
#define mbedtls_sha256_update   priv_mbedtls_sha256_update
 Map the parser SHA-256 update operation to its private stand-in.
#define mbedtls_sha256_finish   priv_mbedtls_sha256_finish
 Map the parser SHA-256 finalizer to its private stand-in.

Typedefs

typedef struct esp_http_client * esp_http_client_handle_t
 Opaque host-parser stand-in for an ESP-IDF HTTP client.
typedef esp_err_t(* esp_crt_bundle_attach_fn_t) (void *conf)
 HTTPS certificate-bundle attach callback used by ESP-IDF.
typedef enum esp_http_client_event_id_t esp_http_client_event_id_t
 Consumed ESP-IDF HTTP event identifiers.
typedef struct esp_http_client_event_t esp_http_client_event_t
 Parser mirror of the ESP-IDF HTTP event record.
typedef esp_err_t(* esp_http_client_event_cb_t) (esp_http_client_event_t *event)
 HTTP event callback signature consumed by the adapter.
typedef struct esp_http_client_config_t esp_http_client_config_t
typedef struct mbedtls_sha256_context mbedtls_sha256_context
 Parser-only storage standing in for ESP-IDF's SHA-256 context.

Enumerations

enum  esp_http_client_event_id_t : int32_t {
  HTTP_EVENT_ERROR = 0 ,
  HTTP_EVENT_ON_CONNECTED ,
  HTTP_EVENT_HEADERS_SENT ,
  HTTP_EVENT_ON_HEADER ,
  HTTP_EVENT_ON_DATA ,
  HTTP_EVENT_ON_FINISH ,
  HTTP_EVENT_DISCONNECTED ,
  HTTP_EVENT_REDIRECT
}
 Consumed ESP-IDF HTTP event identifiers. More...

Functions

esp_err_t priv_esp_crt_bundle_attach (void *conf)
 Attach ESP-IDF's certificate bundle to one TLS configuration.
esp_http_client_handle_t priv_esp_http_client_init (const esp_http_client_config_t *config)
 Create one ESP-IDF HTTP client.
esp_err_t priv_esp_http_client_close (esp_http_client_handle_t client)
 Close the active response while retaining the HTTP client object.
esp_err_t priv_esp_http_client_set_url (esp_http_client_handle_t client, const char *url)
 Replace the retained client's request URL.
esp_err_t priv_esp_http_client_set_header (esp_http_client_handle_t client, const char *key, const char *value)
 Set one request header on the retained HTTP client.
esp_err_t priv_esp_http_client_delete_header (esp_http_client_handle_t client, const char *key)
 Remove one retained request header.
esp_err_t priv_esp_http_client_set_timeout_ms (esp_http_client_handle_t client, int timeout_ms)
 Set the retained client's operation timeout.
esp_err_t priv_esp_http_client_open (esp_http_client_handle_t client, int64_t write_len)
 Open the configured HTTP request.
int64_t priv_esp_http_client_fetch_headers (esp_http_client_handle_t client)
 Fetch response headers and the advertised body length.
int priv_esp_http_client_get_status_code (esp_http_client_handle_t client)
 Return the HTTP response status code.
int priv_esp_http_client_read (esp_http_client_handle_t client, char *buffer, int len)
 Read at most one bounded span of response body bytes.
bool priv_esp_http_client_is_complete_data_received (esp_http_client_handle_t client)
 Report whether ESP-IDF received the complete response body.
void priv_mbedtls_sha256_init (mbedtls_sha256_context *ctx)
 Initialize one SHA-256 context.
int priv_mbedtls_sha256_starts (mbedtls_sha256_context *ctx, int is224)
 Start a SHA-224 or SHA-256 operation.
int priv_mbedtls_sha256_update (mbedtls_sha256_context *ctx, const unsigned char *input, size_t ilen)
 Add bytes to the active SHA operation.
int priv_mbedtls_sha256_finish (mbedtls_sha256_context *ctx, unsigned char output[32])
 Finalize the active SHA-256 operation.

Detailed Description

ESP-IDF media-service declarations for target builds and AST audits.

Tag
[Ring 4 / PAL] {World: NS}

ESP-IDF supplies the concrete declarations when the C6 component is built. Repository-hosted annotation analysis deliberately runs without an installed ESP-IDF SDK, so the non-target branch describes only the exact subset of that SDK surface consumed by mdl_service.c. It has no runtime implementation and is never selected by the ESP-IDF build.

Keeping the audit declarations beside the adapter makes the dependency explicit without pretending that ESP-IDF is a portable library or allowing a missing vendor header to truncate the annotation checker call graph.

Definition in file esp_idf_mdl_compat_internal.h.

Macro Definition Documentation

◆ esp_crt_bundle_attach

#define esp_crt_bundle_attach   priv_esp_crt_bundle_attach

Map the parser bundle callback to its module-private stand-in.

Definition at line 107 of file esp_idf_mdl_compat_internal.h.

Referenced by internal_mdl_http_init().

◆ esp_http_client_close

#define esp_http_client_close   priv_esp_http_client_close

Map the parser HTTP close operation to its private stand-in.

Definition at line 111 of file esp_idf_mdl_compat_internal.h.

Referenced by internal_mdl_http_reset_job().

◆ esp_http_client_delete_header

#define esp_http_client_delete_header   priv_esp_http_client_delete_header

Map the parser request-header remover to its private stand-in.

Definition at line 117 of file esp_idf_mdl_compat_internal.h.

Referenced by internal_mdl_http_set_header().

◆ esp_http_client_fetch_headers

#define esp_http_client_fetch_headers   priv_esp_http_client_fetch_headers

Map the parser header fetch to its module-private stand-in.

Definition at line 123 of file esp_idf_mdl_compat_internal.h.

Referenced by internal_mdl_http_open().

◆ esp_http_client_get_status_code

#define esp_http_client_get_status_code   priv_esp_http_client_get_status_code

Map the parser status accessor to its module-private stand-in.

Definition at line 125 of file esp_idf_mdl_compat_internal.h.

Referenced by internal_mdl_http_open().

◆ esp_http_client_init

#define esp_http_client_init   priv_esp_http_client_init

Map the parser HTTP constructor to its module-private stand-in.

Definition at line 109 of file esp_idf_mdl_compat_internal.h.

Referenced by internal_mdl_http_init().

◆ esp_http_client_is_complete_data_received

#define esp_http_client_is_complete_data_received   priv_esp_http_client_is_complete_data_received

Map the parser completion query to its module-private stand-in.

Definition at line 129 of file esp_idf_mdl_compat_internal.h.

Referenced by internal_mdl_http_finish().

◆ esp_http_client_open

#define esp_http_client_open   priv_esp_http_client_open

Map the parser HTTP open operation to its private stand-in.

Definition at line 121 of file esp_idf_mdl_compat_internal.h.

Referenced by internal_mdl_http_open().

◆ esp_http_client_read

#define esp_http_client_read   priv_esp_http_client_read

Map the parser body reader to its module-private stand-in.

Definition at line 127 of file esp_idf_mdl_compat_internal.h.

Referenced by internal_mdl_http_read().

◆ esp_http_client_set_header

#define esp_http_client_set_header   priv_esp_http_client_set_header

Map the parser request-header setter to its private stand-in.

Definition at line 115 of file esp_idf_mdl_compat_internal.h.

Referenced by internal_mdl_http_set_header().

◆ esp_http_client_set_timeout_ms

#define esp_http_client_set_timeout_ms   priv_esp_http_client_set_timeout_ms

Map the parser timeout setter to its private stand-in.

Definition at line 119 of file esp_idf_mdl_compat_internal.h.

Referenced by internal_mdl_http_apply_request().

◆ esp_http_client_set_url

#define esp_http_client_set_url   priv_esp_http_client_set_url

Map the parser URL setter to its module-private stand-in.

Definition at line 113 of file esp_idf_mdl_compat_internal.h.

Referenced by internal_mdl_http_begin().

◆ mbedtls_sha256_finish

#define mbedtls_sha256_finish   priv_mbedtls_sha256_finish

Map the parser SHA-256 finalizer to its private stand-in.

Definition at line 137 of file esp_idf_mdl_compat_internal.h.

Referenced by internal_mdl_http_finish().

◆ mbedtls_sha256_init

#define mbedtls_sha256_init   priv_mbedtls_sha256_init

Map the parser SHA-256 initializer to its private stand-in.

Definition at line 131 of file esp_idf_mdl_compat_internal.h.

Referenced by internal_mdl_http_init().

◆ mbedtls_sha256_starts

#define mbedtls_sha256_starts   priv_mbedtls_sha256_starts

Map the parser SHA-256 start operation to its private stand-in.

Definition at line 133 of file esp_idf_mdl_compat_internal.h.

Referenced by internal_mdl_http_begin().

◆ mbedtls_sha256_update

#define mbedtls_sha256_update   priv_mbedtls_sha256_update

Map the parser SHA-256 update operation to its private stand-in.

Definition at line 135 of file esp_idf_mdl_compat_internal.h.

Referenced by internal_mdl_http_account_read().

Typedef Documentation

◆ esp_crt_bundle_attach_fn_t

typedef esp_err_t(* esp_crt_bundle_attach_fn_t) (void *conf)

HTTPS certificate-bundle attach callback used by ESP-IDF.

Definition at line 49 of file esp_idf_mdl_compat_internal.h.

◆ esp_http_client_config_t

typedef struct esp_http_client_config_t esp_http_client_config_t

◆ esp_http_client_event_cb_t

typedef esp_err_t(* esp_http_client_event_cb_t) (esp_http_client_event_t *event)

HTTP event callback signature consumed by the adapter.

Definition at line 80 of file esp_idf_mdl_compat_internal.h.

◆ esp_http_client_event_id_t

Consumed ESP-IDF HTTP event identifiers.

The underlying type is stated explicitly so the audit mirror has the same width as the plain (implicitly int-backed) ESP-IDF enum this declaration stands in for.

◆ esp_http_client_event_t

typedef struct esp_http_client_event_t esp_http_client_event_t

Parser mirror of the ESP-IDF HTTP event record.

◆ esp_http_client_handle_t

typedef struct esp_http_client* esp_http_client_handle_t

Opaque host-parser stand-in for an ESP-IDF HTTP client.

Definition at line 46 of file esp_idf_mdl_compat_internal.h.

◆ mbedtls_sha256_context

typedef struct mbedtls_sha256_context mbedtls_sha256_context

Parser-only storage standing in for ESP-IDF's SHA-256 context.

Enumeration Type Documentation

◆ esp_http_client_event_id_t

Consumed ESP-IDF HTTP event identifiers.

The underlying type is stated explicitly so the audit mirror has the same width as the plain (implicitly int-backed) ESP-IDF enum this declaration stands in for.

Enumerator
HTTP_EVENT_ERROR 

Transport error.

HTTP_EVENT_ON_CONNECTED 

Connection established.

HTTP_EVENT_HEADERS_SENT 

Request headers sent.

HTTP_EVENT_ON_HEADER 

One response header is available.

HTTP_EVENT_ON_DATA 

Response body data is available.

HTTP_EVENT_ON_FINISH 

Response completed.

HTTP_EVENT_DISCONNECTED 

Connection closed.

HTTP_EVENT_REDIRECT 

Redirect response observed.

Definition at line 57 of file esp_idf_mdl_compat_internal.h.

Function Documentation

◆ priv_esp_crt_bundle_attach()

esp_err_t priv_esp_crt_bundle_attach ( void * conf)

Attach ESP-IDF's certificate bundle to one TLS configuration.

Parser-only mirror of the ESP-IDF callback consumed by the media adapter.

Parameters
[in,out]confESP-IDF TLS configuration owned by the HTTP client.
Returns
ESP-IDF bundle-attachment status.
Return values
ESP_OKThe certificate bundle was attached.
ESP_FAILThe bundle could not be attached.
Precondition
conf is a valid ESP-IDF TLS configuration.
ESP-IDF certificate-bundle support is enabled.
Postcondition
Success leaves the configuration ready for certificate verification.
Failure does not claim a usable certificate bundle.
Note
Implemented by ESP-IDF; this header supplies no host implementation.
Since
0.1.0

References RA8_PRIV.

◆ priv_esp_http_client_close()

esp_err_t priv_esp_http_client_close ( esp_http_client_handle_t client)

Close the active response while retaining the HTTP client object.

Parser-only mirror of ESP-IDF's per-connection close operation.

Parameters
[in,out]clientValid retained client handle.
Returns
ESP-IDF close status.
Return values
ESP_OKThe active connection was closed.
ESP_FAILClosing the connection failed.
Precondition
client was returned by esp_http_client_init.
No other task concurrently uses client.
Postcondition
Success leaves the handle available for a later open.
Failure does not report a cleanly closed connection.
Note
Implemented by ESP-IDF and may release internal resources.
Since
0.1.0

References RA8_PRIV.

◆ priv_esp_http_client_delete_header()

esp_err_t priv_esp_http_client_delete_header ( esp_http_client_handle_t client,
const char * key )

Remove one retained request header.

Mirrors the ESP-IDF operation used to clear state that must not leak from a prior request on the reused client handle.

Parameters
[in,out]clientValid retained client handle.
[in]keyNUL-terminated header name.
Returns
ESP-IDF header-removal status.
Return values
ESP_OKThe header is absent.
ESP_FAILThe operation could not be completed.
Precondition
All pointers are non-null and key is NUL-terminated.
No request is open on client.
Postcondition
Success leaves the named header absent.
Failure makes no header-state claim.
Note
The adapter tolerates an already-absent header.
Since
0.1.0

References RA8_PRIV.

◆ priv_esp_http_client_fetch_headers()

int64_t priv_esp_http_client_fetch_headers ( esp_http_client_handle_t client)

Fetch response headers and the advertised body length.

Parser-only mirror of ESP-IDF's synchronous header fetch.

Parameters
[in,out]clientOpen client handle.
Returns
Non-negative content length or a negative unknown/error sentinel.
Return values
-1Content length is unknown or header fetch failed.
Precondition
esp_http_client_open succeeded for client.
No other task concurrently reads client.
Postcondition
A non-negative result is the advertised Content-Length.
A negative result is never treated as a verified body length.
Note
Implemented by ESP-IDF; status must be checked independently.
Since
0.1.0

References RA8_PRIV.

◆ priv_esp_http_client_get_status_code()

int priv_esp_http_client_get_status_code ( esp_http_client_handle_t client)

Return the HTTP response status code.

Parser-only mirror of ESP-IDF's response-status accessor.

Parameters
[in]clientClient whose response headers were fetched.
Returns
HTTP status code, or zero when no valid response status exists.
Return values
0No valid HTTP status is available.
Precondition
Response-header processing has completed for client.
client is a valid retained handle.
Postcondition
The call does not consume response body bytes.
The client remains available for body reads.
Note
Implemented by ESP-IDF.
Since
0.1.0

References RA8_PRIV.

◆ priv_esp_http_client_init()

esp_http_client_handle_t priv_esp_http_client_init ( const esp_http_client_config_t * config)

Create one ESP-IDF HTTP client.

Parser-only mirror of the ESP-IDF constructor used by the C6 adapter.

Parameters
[in]configComplete client configuration retained by ESP-IDF as required.
Returns
Opaque client handle or nullptr on failure.
Return values
nullptrClient creation failed.
Precondition
config is non-null and its callback fields remain callable.
The ESP-IDF networking subsystem is available.
Postcondition
Success returns a handle accepted by the remaining HTTP operations.
Failure creates no usable client handle.
Note
Implemented by ESP-IDF and may allocate internally.
Since
0.1.0

References RA8_PRIV.

◆ priv_esp_http_client_is_complete_data_received()

bool priv_esp_http_client_is_complete_data_received ( esp_http_client_handle_t client)

Report whether ESP-IDF received the complete response body.

Parser-only mirror used to distinguish verified EOF from truncation.

Parameters
[in]clientResponse handle after a zero-length body read.
Returns
Completeness verdict.
Return values
trueESP-IDF observed a complete response body.
falseThe body is incomplete or response state is invalid.
Precondition
client is a valid retained handle.
Body reading reached an apparent EOF.
Postcondition
The response body position is unchanged.
False never authorizes a completed download.
Note
Implemented by ESP-IDF.
Since
0.1.0

References RA8_PRIV.

◆ priv_esp_http_client_open()

esp_err_t priv_esp_http_client_open ( esp_http_client_handle_t client,
int64_t write_len )

Open the configured HTTP request.

Parser-only mirror of ESP-IDF's connection and request-header operation.

Parameters
[in,out]clientConfigured retained client handle.
[in]write_lenRequest-body length; zero for this GET-only adapter.
Returns
ESP-IDF open status.
Return values
ESP_OKThe request was opened.
ESP_FAILConnection, TLS, or request setup failed.
Precondition
client has a valid HTTPS URL.
No response is already open on client.
Postcondition
Success permits response-header and body reads.
Failure does not publish response bytes.
Note
Implemented by ESP-IDF and may allocate during TLS setup.
Since
0.1.0

References RA8_PRIV.

◆ priv_esp_http_client_read()

int priv_esp_http_client_read ( esp_http_client_handle_t client,
char * buffer,
int len )

Read at most one bounded span of response body bytes.

Parser-only mirror of ESP-IDF's synchronous body reader.

Parameters
[in,out]clientOpen response handle.
[out]bufferCaller-owned destination with capacity len.
[in]lenMaximum bytes writable to buffer.
Returns
Positive byte count, zero at EOF, or a negative error.
Return values
0No further body bytes were returned.
-1A body read failed.
Precondition
buffer is writable for len bytes.
esp_http_client_fetch_headers completed for client.
Postcondition
A positive result initializes exactly that many bytes in buffer.
A non-positive result initializes no bytes claimed by the caller.
Note
Implemented by ESP-IDF.
Since
0.1.0

References RA8_PRIV.

◆ priv_esp_http_client_set_header()

esp_err_t priv_esp_http_client_set_header ( esp_http_client_handle_t client,
const char * key,
const char * value )

Set one request header on the retained HTTP client.

Mirrors the exact ESP-IDF operation used to apply one bounded portable request-policy field before opening a GET.

Parameters
[in,out]clientValid retained client handle.
[in]keyNUL-terminated header name.
[in]valueNUL-terminated header value.
Returns
ESP-IDF header status.
Return values
ESP_OKThe header was retained.
ESP_FAILThe header could not be retained.
Precondition
All pointers are non-null and strings are NUL-terminated.
No request is open on client.
Postcondition
Success applies the header to the next request.
Failure makes no header-retention claim.
Note
Implemented by ESP-IDF and may allocate internally.
Since
0.1.0

References RA8_PRIV.

◆ priv_esp_http_client_set_timeout_ms()

esp_err_t priv_esp_http_client_set_timeout_ms ( esp_http_client_handle_t client,
int timeout_ms )

Set the retained client's operation timeout.

Mirrors the ESP-IDF operation used to apply the portable request budget to the reused client before opening its connection.

Parameters
[in,out]clientValid retained client handle.
[in]timeout_msPositive timeout in milliseconds.
Returns
ESP-IDF timeout-setting status.
Return values
ESP_OKThe timeout was accepted.
ESP_FAILThe timeout could not be applied.
Precondition
client is valid and timeout_ms is positive.
No request is open on client.
Postcondition
Success applies the timeout to the next request.
Failure makes no timeout-state claim.
Note
Implemented by ESP-IDF.
Since
0.1.0

References RA8_PRIV.

◆ priv_esp_http_client_set_url()

esp_err_t priv_esp_http_client_set_url ( esp_http_client_handle_t client,
const char * url )

Replace the retained client's request URL.

Parser-only mirror of ESP-IDF's URL-setting operation.

Parameters
[in,out]clientValid retained client handle.
[in]urlNUL-terminated absolute HTTPS URL.
Returns
ESP-IDF URL-setting status.
Return values
ESP_OKThe client accepted the URL.
ESP_FAILThe URL could not be retained.
Precondition
client was returned by esp_http_client_init.
url remains readable for the duration of the call.
Postcondition
Success makes url the next request target.
Failure leaves no claim about the retained request URL.
Note
Implemented by ESP-IDF and may allocate internally.
Since
0.1.0

References RA8_PRIV.

◆ priv_mbedtls_sha256_finish()

int priv_mbedtls_sha256_finish ( mbedtls_sha256_context * ctx,
unsigned char output[32] )

Finalize the active SHA-256 operation.

Parser-only mirror of mbedTLS's fixed-size digest output.

Parameters
[in,out]ctxActive hash context.
[out]outputCaller-owned 32-byte digest buffer.
Returns
mbedTLS status.
Return values
0The digest was written successfully.
Precondition
mbedtls_sha256_starts succeeded for ctx.
output is writable for 32 bytes.
Postcondition
Success initializes all 32 bytes at output.
Failure does not authorize use of output.
Note
Implemented by the ESP-IDF-provided mbedTLS library.
Since
0.1.0

References RA8_PRIV.

◆ priv_mbedtls_sha256_init()

void priv_mbedtls_sha256_init ( mbedtls_sha256_context * ctx)

Initialize one SHA-256 context.

Parser-only mirror of mbedTLS context initialization.

Parameters
[out]ctxContext storage to initialize.
Precondition
ctx is writable and suitably aligned.
No active hash operation owns ctx.
Postcondition
ctx may be passed to mbedtls_sha256_starts.
No digest input has been consumed.
Note
Implemented by the ESP-IDF-provided mbedTLS library.
Since
0.1.0

References RA8_PRIV.

◆ priv_mbedtls_sha256_starts()

int priv_mbedtls_sha256_starts ( mbedtls_sha256_context * ctx,
int is224 )

Start a SHA-224 or SHA-256 operation.

Parser-only mirror; the media adapter always requests SHA-256.

Parameters
[in,out]ctxInitialized hash context.
[in]is224Zero for SHA-256, non-zero for SHA-224.
Returns
mbedTLS status.
Return values
0Hash initialization succeeded.
Precondition
mbedtls_sha256_init initialized ctx.
No concurrent operation uses ctx.
Postcondition
Success resets the streaming hash state.
Failure does not authorize digest publication.
Note
Implemented by the ESP-IDF-provided mbedTLS library.
Since
0.1.0

References RA8_PRIV.

◆ priv_mbedtls_sha256_update()

int priv_mbedtls_sha256_update ( mbedtls_sha256_context * ctx,
const unsigned char * input,
size_t ilen )

Add bytes to the active SHA operation.

Parser-only mirror of mbedTLS's streaming hash update.

Parameters
[in,out]ctxActive hash context.
[in]inputReadable input bytes.
[in]ilenNumber of bytes at input.
Returns
mbedTLS status.
Return values
0All input bytes were incorporated.
Precondition
mbedtls_sha256_starts succeeded for ctx.
input is readable for ilen bytes.
Postcondition
Success advances the hash by exactly ilen bytes.
Failure does not authorize digest publication.
Note
Implemented by the ESP-IDF-provided mbedTLS library.
Since
0.1.0