epoc32/include/stdapis/openssl/conf.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
     1.1 --- a/epoc32/include/stdapis/openssl/conf.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/stdapis/openssl/conf.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,264 @@
     1.4 -conf.h
     1.5 +/* crypto/conf/conf.h */
     1.6 +/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
     1.7 + * All rights reserved.
     1.8 + *
     1.9 + * This package is an SSL implementation written
    1.10 + * by Eric Young (eay@cryptsoft.com).
    1.11 + * The implementation was written so as to conform with Netscapes SSL.
    1.12 + * 
    1.13 + * This library is free for commercial and non-commercial use as long as
    1.14 + * the following conditions are aheared to.  The following conditions
    1.15 + * apply to all code found in this distribution, be it the RC4, RSA,
    1.16 + * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
    1.17 + * included with this distribution is covered by the same copyright terms
    1.18 + * except that the holder is Tim Hudson (tjh@cryptsoft.com).
    1.19 + * 
    1.20 + * Copyright remains Eric Young's, and as such any Copyright notices in
    1.21 + * the code are not to be removed.
    1.22 + * If this package is used in a product, Eric Young should be given attribution
    1.23 + * as the author of the parts of the library used.
    1.24 + * This can be in the form of a textual message at program startup or
    1.25 + * in documentation (online or textual) provided with the package.
    1.26 + * 
    1.27 + * Redistribution and use in source and binary forms, with or without
    1.28 + * modification, are permitted provided that the following conditions
    1.29 + * are met:
    1.30 + * 1. Redistributions of source code must retain the copyright
    1.31 + *    notice, this list of conditions and the following disclaimer.
    1.32 + * 2. Redistributions in binary form must reproduce the above copyright
    1.33 + *    notice, this list of conditions and the following disclaimer in the
    1.34 + *    documentation and/or other materials provided with the distribution.
    1.35 + * 3. All advertising materials mentioning features or use of this software
    1.36 + *    must display the following acknowledgement:
    1.37 + *    "This product includes cryptographic software written by
    1.38 + *     Eric Young (eay@cryptsoft.com)"
    1.39 + *    The word 'cryptographic' can be left out if the rouines from the library
    1.40 + *    being used are not cryptographic related :-).
    1.41 + * 4. If you include any Windows specific code (or a derivative thereof) from 
    1.42 + *    the apps directory (application code) you must include an acknowledgement:
    1.43 + *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
    1.44 + * 
    1.45 + * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
    1.46 + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    1.47 + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    1.48 + * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
    1.49 + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    1.50 + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
    1.51 + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    1.52 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
    1.53 + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
    1.54 + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    1.55 + * SUCH DAMAGE.
    1.56 + * 
    1.57 + * The licence and distribution terms for any publically available version or
    1.58 + * derivative of this code cannot be changed.  i.e. this code cannot simply be
    1.59 + * copied and put under another distribution licence
    1.60 + * [including the GNU Public Licence.]
    1.61 + */
    1.62 +/*
    1.63 + © Portions copyright (c) 2006 Nokia Corporation.  All rights reserved.
    1.64 + */
    1.65 +
    1.66 +#ifndef  HEADER_CONF_H
    1.67 +#define HEADER_CONF_H
    1.68 +
    1.69 +#if (defined(__SYMBIAN32__) && !defined(SYMBIAN))
    1.70 +#define SYMBIAN
    1.71 +#endif
    1.72 +
    1.73 +#ifdef SYMBIAN
    1.74 +#include <e32def.h>
    1.75 +#endif
    1.76 +#include <openssl/bio.h>
    1.77 +#include <openssl/lhash.h>
    1.78 +#include <openssl/stack.h>
    1.79 +#include <openssl/safestack.h>
    1.80 +#include <openssl/e_os2.h>
    1.81 +
    1.82 +#include <openssl/ossl_typ.h>
    1.83 +
    1.84 +#ifdef  __cplusplus
    1.85 +extern "C" {
    1.86 +#endif
    1.87 +
    1.88 +typedef struct
    1.89 +	{
    1.90 +	char *section;
    1.91 +	char *name;
    1.92 +	char *value;
    1.93 +	} CONF_VALUE;
    1.94 +
    1.95 +DECLARE_STACK_OF(CONF_VALUE)
    1.96 +DECLARE_STACK_OF(CONF_MODULE)
    1.97 +DECLARE_STACK_OF(CONF_IMODULE)
    1.98 +
    1.99 +struct conf_st;
   1.100 +struct conf_method_st;
   1.101 +typedef struct conf_method_st CONF_METHOD;
   1.102 +
   1.103 +struct conf_method_st
   1.104 +	{
   1.105 +	const char *name;
   1.106 +	CONF *(*create)(CONF_METHOD *meth);
   1.107 +	int (*init)(CONF *conf);
   1.108 +	int (*destroy)(CONF *conf);
   1.109 +	int (*destroy_data)(CONF *conf);
   1.110 +	int (*load_bio)(CONF *conf, BIO *bp, long *eline);
   1.111 +	int (*dump)(const CONF *conf, BIO *bp);
   1.112 +	int (*is_number)(const CONF *conf, char c);
   1.113 +	int (*to_int)(const CONF *conf, char c);
   1.114 +	int (*load)(CONF *conf, const char *name, long *eline);
   1.115 +	};
   1.116 +
   1.117 +/* Module definitions */
   1.118 +
   1.119 +typedef struct conf_imodule_st CONF_IMODULE;
   1.120 +typedef struct conf_module_st CONF_MODULE;
   1.121 +
   1.122 +/* DSO module function typedefs */
   1.123 +typedef int conf_init_func(CONF_IMODULE *md, const CONF *cnf);
   1.124 +typedef void conf_finish_func(CONF_IMODULE *md);
   1.125 +
   1.126 +#define	CONF_MFLAGS_IGNORE_ERRORS	0x1
   1.127 +#define CONF_MFLAGS_IGNORE_RETURN_CODES	0x2
   1.128 +#define CONF_MFLAGS_SILENT		0x4
   1.129 +#define CONF_MFLAGS_NO_DSO		0x8
   1.130 +#define CONF_MFLAGS_IGNORE_MISSING_FILE	0x10
   1.131 +#define CONF_MFLAGS_DEFAULT_SECTION	0x20
   1.132 +
   1.133 +IMPORT_C int CONF_set_default_method(CONF_METHOD *meth);
   1.134 +IMPORT_C void CONF_set_nconf(CONF *conf,LHASH *hash);
   1.135 +IMPORT_C LHASH *CONF_load(LHASH *conf,const char *file,long *eline);
   1.136 +#ifndef OPENSSL_NO_FP_API
   1.137 +IMPORT_C LHASH *CONF_load_fp(LHASH *conf, FILE *fp,long *eline);
   1.138 +#endif
   1.139 +IMPORT_C LHASH *CONF_load_bio(LHASH *conf, BIO *bp,long *eline);
   1.140 +IMPORT_C STACK_OF(CONF_VALUE) *CONF_get_section(LHASH *conf,const char *section);
   1.141 +IMPORT_C char *CONF_get_string(LHASH *conf,const char *group,const char *name);
   1.142 +IMPORT_C long CONF_get_number(LHASH *conf,const char *group,const char *name);
   1.143 +IMPORT_C void CONF_free(LHASH *conf);
   1.144 +IMPORT_C int CONF_dump_fp(LHASH *conf, FILE *out);
   1.145 +IMPORT_C int CONF_dump_bio(LHASH *conf, BIO *out);
   1.146 +
   1.147 +IMPORT_C void OPENSSL_config(const char *config_name);
   1.148 +IMPORT_C void OPENSSL_no_config(void);
   1.149 +
   1.150 +/* New conf code.  The semantics are different from the functions above.
   1.151 +   If that wasn't the case, the above functions would have been replaced */
   1.152 +
   1.153 +struct conf_st
   1.154 +	{
   1.155 +	CONF_METHOD *meth;
   1.156 +	void *meth_data;
   1.157 +	LHASH *data;
   1.158 +	};
   1.159 +
   1.160 +IMPORT_C CONF *NCONF_new(CONF_METHOD *meth);
   1.161 +IMPORT_C CONF_METHOD *NCONF_default(void);
   1.162 +
   1.163 +#if 0 /* Just to give you an idea of what I have in mind */
   1.164 +IMPORT_C CONF_METHOD *NCONF_XML(void);
   1.165 +#endif
   1.166 +IMPORT_C void NCONF_free(CONF *conf);
   1.167 +IMPORT_C void NCONF_free_data(CONF *conf);
   1.168 +
   1.169 +IMPORT_C int NCONF_load(CONF *conf,const char *file,long *eline);
   1.170 +#ifndef OPENSSL_NO_FP_API
   1.171 +IMPORT_C int NCONF_load_fp(CONF *conf, FILE *fp,long *eline);
   1.172 +#endif
   1.173 +IMPORT_C int NCONF_load_bio(CONF *conf, BIO *bp,long *eline);
   1.174 +IMPORT_C STACK_OF(CONF_VALUE) *NCONF_get_section(const CONF *conf,const char *section);
   1.175 +IMPORT_C char *NCONF_get_string(const CONF *conf,const char *group,const char *name);
   1.176 +IMPORT_C int NCONF_get_number_e(const CONF *conf,const char *group,const char *name,
   1.177 +		       long *result);
   1.178 +IMPORT_C int NCONF_dump_fp(const CONF *conf, FILE *out);
   1.179 +IMPORT_C int NCONF_dump_bio(const CONF *conf, BIO *out);
   1.180 +
   1.181 +#if 0 /* The following function has no error checking,
   1.182 +	 and should therefore be avoided */
   1.183 +IMPORT_C long NCONF_get_number(CONF *conf,char *group,char *name);
   1.184 +#else
   1.185 +#define NCONF_get_number(c,g,n,r) NCONF_get_number_e(c,g,n,r)
   1.186 +#endif
   1.187 +  
   1.188 +/* Module functions */
   1.189 +
   1.190 +IMPORT_C int CONF_modules_load(const CONF *cnf, const char *appname,
   1.191 +		      unsigned long flags);
   1.192 +IMPORT_C int CONF_modules_load_file(const char *filename, const char *appname,
   1.193 +			   unsigned long flags);
   1.194 +IMPORT_C void CONF_modules_unload(int all);
   1.195 +IMPORT_C void CONF_modules_finish(void);
   1.196 +IMPORT_C void CONF_modules_free(void);
   1.197 +IMPORT_C int CONF_module_add(const char *name, conf_init_func *ifunc,
   1.198 +		    conf_finish_func *ffunc);
   1.199 +
   1.200 +IMPORT_C const char *CONF_imodule_get_name(const CONF_IMODULE *md);
   1.201 +IMPORT_C const char *CONF_imodule_get_value(const CONF_IMODULE *md);
   1.202 +IMPORT_C void *CONF_imodule_get_usr_data(const CONF_IMODULE *md);
   1.203 +IMPORT_C void CONF_imodule_set_usr_data(CONF_IMODULE *md, void *usr_data);
   1.204 +CONF_MODULE *CONF_imodule_get_module(const CONF_IMODULE *md);
   1.205 +unsigned long CONF_imodule_get_flags(const CONF_IMODULE *md);
   1.206 +IMPORT_C void CONF_imodule_set_flags(CONF_IMODULE *md, unsigned long flags);
   1.207 +IMPORT_C void *CONF_module_get_usr_data(CONF_MODULE *pmod);
   1.208 +IMPORT_C void CONF_module_set_usr_data(CONF_MODULE *pmod, void *usr_data);
   1.209 +
   1.210 +IMPORT_C char *CONF_get1_default_config_file(void);
   1.211 +
   1.212 +IMPORT_C int CONF_parse_list(const char *list, int sep, int nospc,
   1.213 +	int (*list_cb)(const char *elem, int len, void *usr), void *arg);
   1.214 +
   1.215 +IMPORT_C void OPENSSL_load_builtin_modules(void);
   1.216 +
   1.217 +/* BEGIN ERROR CODES */
   1.218 +/* The following lines are auto generated by the script mkerr.pl. Any changes
   1.219 + * made after this point may be overwritten when the script is next run.
   1.220 + */
   1.221 +IMPORT_C void ERR_load_CONF_strings(void);
   1.222 +
   1.223 +/* Error codes for the CONF functions. */
   1.224 +
   1.225 +/* Function codes. */
   1.226 +#define CONF_F_CONF_DUMP_FP				 104
   1.227 +#define CONF_F_CONF_LOAD				 100
   1.228 +#define CONF_F_CONF_LOAD_BIO				 102
   1.229 +#define CONF_F_CONF_LOAD_FP				 103
   1.230 +#define CONF_F_CONF_MODULES_LOAD			 116
   1.231 +#define CONF_F_DEF_LOAD					 120
   1.232 +#define CONF_F_DEF_LOAD_BIO				 121
   1.233 +#define CONF_F_MODULE_INIT				 115
   1.234 +#define CONF_F_MODULE_LOAD_DSO				 117
   1.235 +#define CONF_F_MODULE_RUN				 118
   1.236 +#define CONF_F_NCONF_DUMP_BIO				 105
   1.237 +#define CONF_F_NCONF_DUMP_FP				 106
   1.238 +#define CONF_F_NCONF_GET_NUMBER				 107
   1.239 +#define CONF_F_NCONF_GET_NUMBER_E			 112
   1.240 +#define CONF_F_NCONF_GET_SECTION			 108
   1.241 +#define CONF_F_NCONF_GET_STRING				 109
   1.242 +#define CONF_F_NCONF_LOAD				 113
   1.243 +#define CONF_F_NCONF_LOAD_BIO				 110
   1.244 +#define CONF_F_NCONF_LOAD_FP				 114
   1.245 +#define CONF_F_NCONF_NEW				 111
   1.246 +#define CONF_F_STR_COPY					 101
   1.247 +
   1.248 +/* Reason codes. */
   1.249 +#define CONF_R_ERROR_LOADING_DSO			 110
   1.250 +#define CONF_R_MISSING_CLOSE_SQUARE_BRACKET		 100
   1.251 +#define CONF_R_MISSING_EQUAL_SIGN			 101
   1.252 +#define CONF_R_MISSING_FINISH_FUNCTION			 111
   1.253 +#define CONF_R_MISSING_INIT_FUNCTION			 112
   1.254 +#define CONF_R_MODULE_INITIALIZATION_ERROR		 109
   1.255 +#define CONF_R_NO_CLOSE_BRACE				 102
   1.256 +#define CONF_R_NO_CONF					 105
   1.257 +#define CONF_R_NO_CONF_OR_ENVIRONMENT_VARIABLE		 106
   1.258 +#define CONF_R_NO_SECTION				 107
   1.259 +#define CONF_R_NO_SUCH_FILE				 114
   1.260 +#define CONF_R_NO_VALUE					 108
   1.261 +#define CONF_R_UNABLE_TO_CREATE_NEW_SECTION		 103
   1.262 +#define CONF_R_UNKNOWN_MODULE_NAME			 113
   1.263 +#define CONF_R_VARIABLE_HAS_NO_VALUE			 104
   1.264 +
   1.265 +#ifdef  __cplusplus
   1.266 +}
   1.267 +#endif
   1.268 +#endif