diff --git a/src/ssl.c b/src/ssl.c index 4306e9a26..452e875ec 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -25804,6 +25804,8 @@ void* wolfSSL_sk_value(WOLFSSL_STACK* sk, int i) case STACK_TYPE_X509_EXT: return (void*)sk->data.ext; #endif + case STACK_TYPE_CONF_VALUE: + return (void*)sk->data.conf->value; default: return (void*)sk->data.obj; } diff --git a/wolfssl/internal.h b/wolfssl/internal.h index 93c7b8ad5..c270523f3 100644 --- a/wolfssl/internal.h +++ b/wolfssl/internal.h @@ -3503,6 +3503,7 @@ typedef struct Arrays { #define STACK_TYPE_X509_EXT 7 #define STACK_TYPE_NULL 8 #define STACK_TYPE_X509_NAME 9 +#define STACK_TYPE_CONF_VALUE 10 struct WOLFSSL_STACK { unsigned long num; /* number of nodes in stack @@ -3519,6 +3520,7 @@ struct WOLFSSL_STACK { WOLFSSL_CIPHER cipher; WOLFSSL_ACCESS_DESCRIPTION* access; WOLFSSL_X509_EXTENSION* ext; + WOLFSSL_CONF_VALUE* conf; void* generic; char* string; WOLFSSL_GENERAL_NAME* gn; diff --git a/wolfssl/openssl/conf.h b/wolfssl/openssl/conf.h index 1e328cf47..12a20c8cf 100644 --- a/wolfssl/openssl/conf.h +++ b/wolfssl/openssl/conf.h @@ -1,2 +1,48 @@ -/* conf.h for openssl */ +/* conf.h + * + * Copyright (C) 2006-2019 wolfSSL Inc. + * + * This file is part of wolfSSL. + * + * wolfSSL is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * wolfSSL is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA + */ +/* conf.h for openSSL */ + +#ifndef WOLFSSL_conf_H_ +#define WOLFSSL_conf_H_ + +#ifdef __cplusplus + extern "C" { +#endif + +struct WOLFSSL_CONF_VALUE { + char *section; + char *name; + char *value; +}; + +struct WOLFSSL_INIT_SETTINGS { + char* appname; +}; + +typedef struct WOLFSSL_CONF_VALUE CONF_VALUE; +typedef struct WOLFSSL_INIT_SETTINGS OPENSSL_INIT_SETTINGS; + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* WOLFSSL_conf_H_ */ diff --git a/wolfssl/ssl.h b/wolfssl/ssl.h index a26e60c31..661f804f0 100644 --- a/wolfssl/ssl.h +++ b/wolfssl/ssl.h @@ -172,6 +172,7 @@ typedef struct WOLFSSL_X509_VERIFY_PARAM WOLFSSL_X509_VERIFY_PARAM; typedef struct WOLFSSL_BIO WOLFSSL_BIO; typedef struct WOLFSSL_BIO_METHOD WOLFSSL_BIO_METHOD; typedef struct WOLFSSL_X509_EXTENSION WOLFSSL_X509_EXTENSION; +typedef struct WOLFSSL_CONF_VALUE WOLFSSL_CONF_VALUE; typedef struct WOLFSSL_ASN1_TIME WOLFSSL_ASN1_TIME; typedef struct WOLFSSL_ASN1_OBJECT WOLFSSL_ASN1_OBJECT; typedef struct WOLFSSL_ASN1_OTHERNAME WOLFSSL_ASN1_OTHERNAME;