DeviceAuth_CurlSslFunc Function
Header: #include <tlsutils/deviceauth_curl.h>
Performs mutual authentication using the application's device authentication credentials. Note that although the curl function names include SSL, Azure Sphere uses TLS for authentication.
When invoked by libcurl, DeviceAuth_CurlSslFunc sets the CURL object to perform mutual authentication with the endpoint using the application's device authentication credentials. This function's signature matches that of a libcurl callback for the CURLOPT_SSL_CTX_FUNCTION option.
CURLcode DeviceAuth_CurlSslFunc (CURL *curl, void *sslctx, void *userCtx);
Parameters
curl
The curl handlesslctx
A pointer to the context that is passed by the application's callbackuserCtx
The user context set with the CURLOPT_SSL_CTX_DATA option
Return value
Returns CURLE_SSL_CERTPROBLEM
on error or CURLE_OK
on success
Examples
Connect to web services contains additional information.
Application manifest requirements
To access individual hosts or domains, your application must identify them in the AllowedConnections field of the application manifest. If the application uses mutual authentication, the DeviceAuthentication field of the manifest must include the Azure Sphere tenant ID.