docs: Update OpenSSL API documents

Closes IDF-2541
pull/6828/head
suren.gabrielyan 2021-02-25 16:22:40 +04:00
rodzic 3323e2e0a8
commit cc78923d23
4 zmienionych plików z 60 dodań i 55 usunięć

Wyświetl plik

@ -8,6 +8,7 @@ Application Protocols
ASIO <asio>
ESP-MQTT <mqtt>
ESP-TLS <esp_tls>
OpenSSL APIs <openssl_apis>
HTTP Client <esp_http_client>
HTTP Server <esp_http_server>
HTTPS Server <esp_https_server>

Wyświetl plik

@ -1,7 +1,7 @@
OpenSSL-APIs
------------
This directory does not contain OpenSSL itself, but the code here can be used as a wrapper for applications using the OpenSSL API.
The code of this API (located in :component:`openssl` directory), does not contain OpenSSL itself but is intended as a wrapper for applications using the OpenSSL API.
It uses mbedTLS to do the actual work, so anyone compiling openssl code needs the mbedtls library and header file.
OpenSSL APIs not mentioned in this article are not open to public for the time,
@ -20,6 +20,8 @@ Chapter Introduction
Chapter 1. SSL Context Method Create
====================================
.. highlight:: none
1.1 const SSL_METHOD* ``SSLv3_client_method`` (void)
Arguments::
@ -195,7 +197,7 @@ Chapter 1. SSL Context Method Create
create the target SSL context method
Example :
Example::
void example(void)
{
@ -252,11 +254,11 @@ Chapter 1. SSL Context Method Create
}
Chapter 2. SSL Context Fucntion
Chapter 2. SSL Context Function
===============================
2.1 SSL_CTX* ``SSL_CTX_new`` (const SSL_METHOD *method)
2.1 SSL_CTX* ``SSL_CTX_new`` (const SSL_METHOD * method)
Arguments::
@ -280,7 +282,7 @@ Chapter 2. SSL Context Fucntion
}
2.2 ``void SSL_CTX_free`` (SSL_CTX *ctx)
2.2 ``void SSL_CTX_free`` (SSL_CTX * ctx)
Arguments::
@ -306,7 +308,7 @@ Chapter 2. SSL Context Fucntion
}
2.3 ``int SSL_CTX_set_ssl_version`` (SSL_CTX *ctx, const SSL_METHOD *meth)
2.3 ``int SSL_CTX_set_ssl_version`` (SSL_CTX * ctx, const SSL_METHOD * meth)
Arguments::
@ -335,7 +337,7 @@ Chapter 2. SSL Context Fucntion
}
2.4 const SSL_METHOD* ``SSL_CTX_get_ssl_method`` (SSL_CTX *ctx)
2.4 const SSL_METHOD* ``SSL_CTX_get_ssl_method`` (SSL_CTX * ctx)
Arguments::
@ -363,11 +365,11 @@ Chapter 2. SSL Context Fucntion
Chapter 3. SSL Fucntion
Chapter 3. SSL Function
=======================
3.1 SSL* ``SSL_new`` (SSL_CTX *ctx)
3.1 SSL* ``SSL_new`` (SSL_CTX * ctx)
Arguments::
@ -394,7 +396,7 @@ Chapter 3. SSL Fucntion
}
3.2 void ``SSL_free`` (SSL *ssl)
3.2 void ``SSL_free`` (SSL * ssl)
Arguments::
@ -420,7 +422,7 @@ Chapter 3. SSL Fucntion
}
3.3 int ``SSL_do_handshake`` (SSL *ssl)
3.3 int ``SSL_do_handshake`` (SSL * ssl)
Arguments::
@ -449,7 +451,7 @@ Chapter 3. SSL Fucntion
}
3.4 int ``SSL_connect`` (SSL *ssl)
3.4 int ``SSL_connect`` (SSL * ssl)
Arguments::
@ -478,7 +480,7 @@ Chapter 3. SSL Fucntion
}
3.5 int ``SSL_accept`` (SSL *ssl)
3.5 int ``SSL_accept`` (SSL * ssl)
Arguments::
@ -507,7 +509,7 @@ Chapter 3. SSL Fucntion
}
3.6 int ``SSL_shutdown`` (SSL *ssl)
3.6 int ``SSL_shutdown`` (SSL * ssl)
Arguments::
@ -536,7 +538,7 @@ Chapter 3. SSL Fucntion
}
3.7 int ``SSL_clear`` (SSL *ssl)
3.7 int ``SSL_clear`` (SSL * ssl)
Arguments::
@ -564,7 +566,7 @@ Chapter 3. SSL Fucntion
}
3.8 int ``SSL_read`` (SSL *ssl, void *buffer, int len)
3.8 int ``SSL_read`` (SSL * ssl, void * buffer, int len)
Arguments::
@ -596,7 +598,7 @@ Chapter 3. SSL Fucntion
ret = SSL_read(ssl, buf, len);
}
3.9 int ``SSL_write`` (SSL *ssl, const void *buffer, int len)
3.9 int ``SSL_write`` (SSL * ssl, const void * buffer, int len)
Arguments::
@ -629,7 +631,7 @@ Chapter 3. SSL Fucntion
}
3.10 ``SSL_CTX *SSL_get_SSL_CTX`` (const SSL *ssl)
3.10 ``SSL_CTX *SSL_get_SSL_CTX`` (const SSL * ssl)
Arguments::
@ -656,7 +658,7 @@ Chapter 3. SSL Fucntion
}
3.11 int ``SSL_get_shutdown`` (const SSL *ssl)
3.11 int ``SSL_get_shutdown`` (const SSL * ssl)
Arguments::
@ -683,7 +685,7 @@ Chapter 3. SSL Fucntion
}
3.12 void ``SSL_set_shutdown`` (SSL *ssl, int mode)
3.12 void ``SSL_set_shutdown`` (SSL * ssl, int mode)
Arguments::
@ -710,7 +712,7 @@ Chapter 3. SSL Fucntion
}
3.13 const SSL_METHOD* ``SSL_get_ssl_method`` (SSL *ssl)
3.13 const SSL_METHOD* ``SSL_get_ssl_method`` (SSL * ssl)
Arguments::
@ -737,7 +739,7 @@ Chapter 3. SSL Fucntion
}
3.14 int ``SSL_set_ssl_method`` (SSL *ssl, const SSL_METHOD *method)
3.14 int ``SSL_set_ssl_method`` (SSL * ssl, const SSL_METHOD * method)
Arguments::
@ -767,7 +769,7 @@ Chapter 3. SSL Fucntion
}
3.15 int ``SSL_pending`` (const SSL *ssl)
3.15 int ``SSL_pending`` (const SSL * ssl)
Arguments::
@ -794,7 +796,7 @@ Chapter 3. SSL Fucntion
}
3.16 int ``SSL_has_pending`` (const SSL *ssl)
3.16 int ``SSL_has_pending`` (const SSL * ssl)
Arguments::
@ -822,7 +824,7 @@ Chapter 3. SSL Fucntion
}
3.17 int ``SSL_get_fd`` (const SSL *ssl)
3.17 int ``SSL_get_fd`` (const SSL * ssl)
Arguments::
@ -850,7 +852,7 @@ Chapter 3. SSL Fucntion
}
3.18 int ``SSL_get_rfd`` (const SSL *ssl)
3.18 int ``SSL_get_rfd`` (const SSL * ssl)
Arguments::
@ -878,7 +880,7 @@ Chapter 3. SSL Fucntion
}
3.19 int ``SSL_get_wfd`` (const SSL *ssl)
3.19 int ``SSL_get_wfd`` (const SSL * ssl)
Arguments::
@ -906,7 +908,7 @@ Chapter 3. SSL Fucntion
}
3.20 int ``SSL_set_fd`` (SSL *ssl, int fd)
3.20 int ``SSL_set_fd`` (SSL * ssl, int fd)
Arguments::
@ -936,7 +938,7 @@ Chapter 3. SSL Fucntion
}
3.21 int ``SSL_set_rfd`` (SSL *ssl, int fd)
3.21 int ``SSL_set_rfd`` (SSL * ssl, int fd)
Arguments::
@ -966,7 +968,7 @@ Chapter 3. SSL Fucntion
}
3.22 int ``SSL_set_wfd`` (SSL *ssl, int fd)
3.22 int ``SSL_set_wfd`` (SSL * ssl, int fd)
Arguments::
@ -996,7 +998,7 @@ Chapter 3. SSL Fucntion
}
3.23 int ``SSL_version`` (const SSL *ssl)
3.23 int ``SSL_version`` (const SSL * ssl)
Arguments::
@ -1023,7 +1025,7 @@ Chapter 3. SSL Fucntion
}
3.24 const char* ``SSL_get_version`` (const SSL *ssl)
3.24 const char* ``SSL_get_version`` (const SSL * ssl)
Arguments::
@ -1050,7 +1052,7 @@ Chapter 3. SSL Fucntion
}
3.25 OSSL_HANDSHAKE_STATE ``SSL_get_state`` (const SSL *ssl)
3.25 OSSL_HANDSHAKE_STATE ``SSL_get_state`` (const SSL * ssl)
Arguments::
@ -1184,7 +1186,7 @@ Chapter 3. SSL Fucntion
str = SSL_alert_type_string_long(val);
}
3.30 const char* ``SSL_rstate_string`` (SSL *ssl)
3.30 const char* ``SSL_rstate_string`` (SSL * ssl)
Arguments::
@ -1211,7 +1213,7 @@ Chapter 3. SSL Fucntion
}
3.31 const char* ``SSL_rstate_string_long`` (SSL *ssl)
3.31 const char* ``SSL_rstate_string_long`` (SSL * ssl)
Arguments::
@ -1238,7 +1240,7 @@ Chapter 3. SSL Fucntion
}
3.32 const char* ``SSL_state_string`` (const SSL *ssl)
3.32 const char* ``SSL_state_string`` (const SSL * ssl)
Arguments::
@ -1265,7 +1267,7 @@ Chapter 3. SSL Fucntion
}
3.33 char* ``SSL_state_string_long`` (const SSL *ssl)
3.33 char* ``SSL_state_string_long`` (const SSL * ssl)
Arguments::
@ -1292,7 +1294,7 @@ Chapter 3. SSL Fucntion
}
3.34 int ``SSL_get_error`` (const SSL *ssl, int ret_code)
3.34 int ``SSL_get_error`` (const SSL * ssl, int ret_code)
Arguments::
@ -1320,7 +1322,7 @@ Chapter 3. SSL Fucntion
err = SSL_get_error(ssl, ret);
}
3.35 int ``SSL_want`` (const SSL *ssl)
3.35 int ``SSL_want`` (const SSL * ssl)
Arguments::
@ -1347,7 +1349,7 @@ Chapter 3. SSL Fucntion
}
3.36 int ``SSL_want_nothing`` (const SSL *ssl)
3.36 int ``SSL_want_nothing`` (const SSL * ssl)
Arguments::
@ -1375,7 +1377,7 @@ Chapter 3. SSL Fucntion
}
3.37 int ``SSL_want_read`` (const SSL *ssl)
3.37 int ``SSL_want_read`` (const SSL * ssl)
Arguments::
@ -1403,7 +1405,7 @@ Chapter 3. SSL Fucntion
}
3.38 int ``SSL_want_write`` (const SSL *ssl)
3.38 int ``SSL_want_write`` (const SSL * ssl)
Arguments::
@ -1435,7 +1437,7 @@ Chapter 4. SSL X509 Certification and Private Key Function
==========================================================
4.1 X509* ``d2i_X509`` (X509 **cert, const unsigned char *buffer, long len)
4.1 X509 * ``d2i_X509`` (X509 ** cert, const unsigned char * buffer, long len)
Arguments::
@ -1466,7 +1468,7 @@ Chapter 4. SSL X509 Certification and Private Key Function
}
4.2 int ``SSL_add_client_CA`` (SSL *ssl, X509 *x)
4.2 int ``SSL_add_client_CA`` (SSL * ssl, X509 * x)
Arguments::
@ -1496,7 +1498,7 @@ Chapter 4. SSL X509 Certification and Private Key Function
}
4.3 int ``SSL_CTX_add_client_CA`` (SSL_CTX *ctx, X509 *x)
4.3 int ``SSL_CTX_add_client_CA`` (SSL_CTX * ctx, X509 * x)
Arguments::
@ -1526,7 +1528,7 @@ Chapter 4. SSL X509 Certification and Private Key Function
}
4.4 X509* ``SSL_get_certificate`` (const SSL *ssl)
4.4 X509* ``SSL_get_certificate`` (const SSL * ssl)
Arguments::
@ -1553,7 +1555,7 @@ Chapter 4. SSL X509 Certification and Private Key Function
}
4.5 long ``SSL_get_verify_result`` (const SSL *ssl)
4.5 long ``SSL_get_verify_result`` (const SSL * ssl)
Arguments::
@ -1580,7 +1582,7 @@ Chapter 4. SSL X509 Certification and Private Key Function
}
4.6 int ``SSL_CTX_use_certificate`` (SSL_CTX *ctx, X509 *x)
4.6 int ``SSL_CTX_use_certificate`` (SSL_CTX * ctx, X509 * x)
Arguments::
@ -1595,7 +1597,7 @@ Chapter 4. SSL X509 Certification and Private Key Function
Description::
load the certification into the SSL_CTX or SSL object
Example::
void example(void)
@ -1610,7 +1612,7 @@ Chapter 4. SSL X509 Certification and Private Key Function
}
4.7 int ``SSL_CTX_use_certificate_ASN1`` (SSL_CTX *ctx, int len, const unsigned char *d)
4.7 int ``SSL_CTX_use_certificate_ASN1`` (SSL_CTX * ctx, int len, const unsigned char * d)
Arguments::
@ -1642,7 +1644,7 @@ Chapter 4. SSL X509 Certification and Private Key Function
}
4.8 int ``SSL_CTX_use_PrivateKey`` (SSL_CTX *ctx, EVP_PKEY *pkey)
4.8 int ``SSL_CTX_use_PrivateKey`` (SSL_CTX * ctx, EVP_PKEY * pkey)
Arguments::
@ -1672,7 +1674,7 @@ Chapter 4. SSL X509 Certification and Private Key Function
}
4.9 int ``SSL_CTX_use_PrivateKey_ASN1`` (int pk, SSL_CTX *ctx, const unsigned char *d, long len)
4.9 int ``SSL_CTX_use_PrivateKey_ASN1`` (int pk, SSL_CTX * ctx, const unsigned char * d, long len)
Arguments::
@ -1705,7 +1707,7 @@ Chapter 4. SSL X509 Certification and Private Key Function
}
4.10 int ``SSL_CTX_use_RSAPrivateKey_ASN1`` (SSL_CTX *ctx, const unsigned char *d, long len)
4.10 int ``SSL_CTX_use_RSAPrivateKey_ASN1`` (SSL_CTX * ctx, const unsigned char * d, long len)
Arguments::
@ -1737,7 +1739,7 @@ Chapter 4. SSL X509 Certification and Private Key Function
}
4.11 int ``SSL_use_certificate_ASN1`` (SSL *ssl, int len, const unsigned char *d)
4.11 int ``SSL_use_certificate_ASN1`` (SSL * ssl, int len, const unsigned char * d)
Arguments::
@ -1769,7 +1771,7 @@ Chapter 4. SSL X509 Certification and Private Key Function
}
4.12 X509* ``SSL_get_peer_certificate`` (const SSL *ssl)
4.12 X509* ``SSL_get_peer_certificate`` (const SSL * ssl)
Arguments::

Wyświetl plik

@ -7,6 +7,7 @@
mDNS <mdns>
ESP-TLS <esp_tls>
OpenSSL APIs <openssl_apis>
HTTP Client <esp_http_client>
Websocket Client <esp_websocket_client>
HTTP 服务器 <esp_http_server>

Wyświetl plik

@ -0,0 +1 @@
.. include:: ../../../en/api-reference/protocols/openssl_apis.rst