Adding support for STACKOF(CONF_VALUE)

This commit is contained in:
Eric Blankenhorn
2019-09-20 14:14:20 -05:00
parent 082d0e459d
commit f01e943448
4 changed files with 52 additions and 1 deletions

View File

@ -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;
}

View File

@ -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;

View File

@ -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_ */

View File

@ -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;