EasyManua.ls Logo

Espressif ESP32-S2 - Page 566

Espressif ESP32-S2
1695 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 2. API Reference
(continued from previous page)
const unsigned char *buf;
int len;
... ...
ret = SSL_CTX_use_certificate_ASN1(ctx, len, buf);
}
4.8 int SSL_CTX_use_PrivateKey (SSL_CTX * ctx, EVP_PKEY * pkey)
Arguments:
ctx - SSL context point
pkey - private key object point
Return:
1 : OK
0 : failed
Description:
load the private key into the context object
Example:
void example(void)
{
int ret;
SSL_CTX *ctx;
EVP_PKEY *pkey;
... ...
ret = SSL_CTX_use_PrivateKey(ctx, pkey);
}
4.9 int SSL_CTX_use_PrivateKey_ASN1 (int pk, SSL_CTX * ctx, const unsigned char * d, long len)
Arguments:
ctx - SSL context point
d - data point
len - private key length
Return:
1 : OK
0 : failed
Description:
load the ASN1 private key into SSL context
Example:
void example(void)
{
int ret;
int pk;
SSL_CTX *ctx;
(continues on next page)
Espressif Systems 555
Submit Document Feedback
Release v4.4

Table of Contents