mirror of
https://github.com/espressif/esp-idf.git
synced 2026-05-04 03:52:01 +02:00
components/openssl: add debug message and change verifying mode
This commit is contained in:
@@ -19,10 +19,10 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define SSL_DEBUG_ENBALE 0
|
||||
#define SSL_DEBUG_ENBALE 1
|
||||
#define SSL_DEBUG_LEVEL 0
|
||||
#define SSL_ASSERT_ENABLE 0
|
||||
#define SSL_DEBUG_LOCATION_ENABLE 0
|
||||
#define SSL_ASSERT_ENABLE 1
|
||||
#define SSL_DEBUG_LOCATION_ENABLE 1
|
||||
|
||||
#if SSL_DEBUG_ENBALE
|
||||
extern int ets_printf(const char *fmt, ...);
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
#ifndef _SSL_METHODS_H_
|
||||
#define _SSL_METHODS_H_
|
||||
|
||||
#include "ssl_types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -63,6 +63,30 @@ X509* d2i_X509(X509 **cert, const unsigned char *buffer, long len);
|
||||
*/
|
||||
void X509_free(X509 *x);
|
||||
|
||||
/**
|
||||
* @brief set SSL context client CA certification
|
||||
*
|
||||
* @param ctx - SSL context point
|
||||
* @param x - X509 certification point
|
||||
*
|
||||
* @return result
|
||||
* 0 : failed
|
||||
* 1 : OK
|
||||
*/
|
||||
int SSL_CTX_add_client_CA(SSL_CTX *ctx, X509 *x);
|
||||
|
||||
/**
|
||||
* @brief add CA client certification into the SSL
|
||||
*
|
||||
* @param ssl - SSL point
|
||||
* @param x - X509 certification point
|
||||
*
|
||||
* @return result
|
||||
* 0 : failed
|
||||
* 1 : OK
|
||||
*/
|
||||
int SSL_add_client_CA(SSL *ssl, X509 *x);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user