mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-12 01:53:07 +03:00
fixed timeout issue in axhttd, -fPIC enabled, pkcs8 enabled for server
git-svn-id: svn://svn.code.sf.net/p/axtls/code/trunk@211 9a5d90b5-6617-0410-8a86-bb477d3ed2e3
This commit is contained in:
@ -225,7 +225,7 @@ config CONFIG_SSL_USE_PKCS12
|
||||
bool "Use PKCS8/PKCS12"
|
||||
default n if !CONFIG_SSL_FULL_MODE
|
||||
default y if CONFIG_SSL_FULL_MODE
|
||||
depends on !CONFIG_SSL_SERVER_ONLY && !CONFIG_SSL_SKELETON_MODE
|
||||
# depends on !CONFIG_SSL_SERVER_ONLY && !CONFIG_SSL_SKELETON_MODE
|
||||
help
|
||||
PKCS#12 certificates combine private keys and certificates together in
|
||||
one file.
|
||||
|
@ -175,16 +175,18 @@ void ssl_obj_free(SSLObjLoader *ssl_obj)
|
||||
*/
|
||||
#ifdef CONFIG_SSL_HAS_PEM
|
||||
|
||||
#define NUM_PEM_TYPES 3
|
||||
#define NUM_PEM_TYPES 4
|
||||
#define IV_SIZE 16
|
||||
#define IS_RSA_PRIVATE_KEY 0
|
||||
#define IS_ENCRYPTED_PRIVATE_KEY 1
|
||||
#define IS_CERTIFICATE 2
|
||||
#define IS_PRIVATE_KEY 2
|
||||
#define IS_CERTIFICATE 3
|
||||
|
||||
static const char * const begins[NUM_PEM_TYPES] =
|
||||
{
|
||||
"-----BEGIN RSA PRIVATE KEY-----",
|
||||
"-----BEGIN ENCRYPTED PRIVATE KEY-----",
|
||||
"-----BEGIN PRIVATE KEY-----",
|
||||
"-----BEGIN CERTIFICATE-----",
|
||||
};
|
||||
|
||||
@ -192,6 +194,7 @@ static const char * const ends[NUM_PEM_TYPES] =
|
||||
{
|
||||
"-----END RSA PRIVATE KEY-----",
|
||||
"-----END ENCRYPTED PRIVATE KEY-----",
|
||||
"-----END PRIVATE KEY-----",
|
||||
"-----END CERTIFICATE-----",
|
||||
};
|
||||
|
||||
@ -337,6 +340,7 @@ static int new_pem_obj(SSL_CTX *ssl_ctx, int is_cacert, char *where,
|
||||
break;
|
||||
|
||||
case IS_ENCRYPTED_PRIVATE_KEY:
|
||||
case IS_PRIVATE_KEY:
|
||||
obj_type = SSL_OBJ_PKCS8;
|
||||
break;
|
||||
|
||||
|
@ -35,6 +35,8 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "os_port.h"
|
||||
#include "ssl.h"
|
||||
|
||||
/**************************************************************************
|
||||
|
Reference in New Issue
Block a user