Latest update.
This commit is contained in:
+11
-5
@@ -54,7 +54,9 @@ static BIO *get_next_file(const char *path, OPENSSL_DIR_CTX **dirctx);
|
||||
|
||||
static CONF *def_create(CONF_METHOD *meth);
|
||||
static int def_init_default(CONF *conf);
|
||||
#if !OPENSSL_API_3
|
||||
static int def_init_WIN32(CONF *conf);
|
||||
#endif
|
||||
static int def_destroy(CONF *conf);
|
||||
static int def_destroy_data(CONF *conf);
|
||||
static int def_load(CONF *conf, const char *name, long *eline);
|
||||
@@ -76,6 +78,12 @@ static CONF_METHOD default_method = {
|
||||
def_load
|
||||
};
|
||||
|
||||
CONF_METHOD *NCONF_default(void)
|
||||
{
|
||||
return &default_method;
|
||||
}
|
||||
|
||||
#if ! OPENSSL_API_3
|
||||
static CONF_METHOD WIN32_method = {
|
||||
"WIN32",
|
||||
def_create,
|
||||
@@ -89,15 +97,11 @@ static CONF_METHOD WIN32_method = {
|
||||
def_load
|
||||
};
|
||||
|
||||
CONF_METHOD *NCONF_default(void)
|
||||
{
|
||||
return &default_method;
|
||||
}
|
||||
|
||||
CONF_METHOD *NCONF_WIN32(void)
|
||||
{
|
||||
return &WIN32_method;
|
||||
}
|
||||
#endif
|
||||
|
||||
static CONF *def_create(CONF_METHOD *meth)
|
||||
{
|
||||
@@ -124,6 +128,7 @@ static int def_init_default(CONF *conf)
|
||||
return 1;
|
||||
}
|
||||
|
||||
#if ! OPENSSL_API_3
|
||||
static int def_init_WIN32(CONF *conf)
|
||||
{
|
||||
if (conf == NULL)
|
||||
@@ -135,6 +140,7 @@ static int def_init_WIN32(CONF *conf)
|
||||
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int def_destroy(CONF *conf)
|
||||
{
|
||||
|
||||
@@ -56,6 +56,7 @@ static const unsigned short CONF_type_default[128] = {
|
||||
0x0004, 0x0004, 0x0004, 0x0000, 0x0200, 0x0000, 0x0200, 0x0000,
|
||||
};
|
||||
|
||||
#if ! OPENSSL_API_3
|
||||
static const unsigned short CONF_type_win32[128] = {
|
||||
0x0008, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0010, 0x0010, 0x0000, 0x0000, 0x0010, 0x0000, 0x0000,
|
||||
@@ -74,3 +75,4 @@ static const unsigned short CONF_type_win32[128] = {
|
||||
0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004,
|
||||
0x0004, 0x0004, 0x0004, 0x0000, 0x0200, 0x0000, 0x0200, 0x0000,
|
||||
};
|
||||
#endif
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "internal/conf.h"
|
||||
#include "internal/ctype.h"
|
||||
#include "crypto/ctype.h"
|
||||
#include <openssl/crypto.h>
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/conf.h>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include <openssl/asn1.h>
|
||||
#include <openssl/engine.h>
|
||||
#include "internal/provider.h"
|
||||
#include "conf_lcl.h"
|
||||
#include "conf_local.h"
|
||||
|
||||
/* Load all OpenSSL builtin modules */
|
||||
|
||||
|
||||
@@ -198,19 +198,20 @@ static CONF_MODULE *module_load_dso(const CONF *cnf,
|
||||
const char *path = NULL;
|
||||
int errcode = 0;
|
||||
CONF_MODULE *md;
|
||||
|
||||
/* Look for alternative path in module section */
|
||||
path = NCONF_get_string(cnf, value, "path");
|
||||
if (!path) {
|
||||
if (path == NULL) {
|
||||
ERR_clear_error();
|
||||
path = name;
|
||||
}
|
||||
dso = DSO_load(NULL, path, NULL, 0);
|
||||
if (!dso) {
|
||||
if (dso == NULL) {
|
||||
errcode = CONF_R_ERROR_LOADING_DSO;
|
||||
goto err;
|
||||
}
|
||||
ifunc = (conf_init_func *)DSO_bind_func(dso, DSO_mod_init_name);
|
||||
if (!ifunc) {
|
||||
if (ifunc == NULL) {
|
||||
errcode = CONF_R_MISSING_INIT_FUNCTION;
|
||||
goto err;
|
||||
}
|
||||
@@ -218,7 +219,7 @@ static CONF_MODULE *module_load_dso(const CONF *cnf,
|
||||
/* All OK, add module */
|
||||
md = module_add(dso, name, ifunc, ffunc);
|
||||
|
||||
if (!md)
|
||||
if (md == NULL)
|
||||
goto err;
|
||||
|
||||
return md;
|
||||
@@ -533,7 +534,7 @@ int CONF_parse_list(const char *list_, int sep, int nospc,
|
||||
lstart++;
|
||||
}
|
||||
p = strchr(lstart, sep);
|
||||
if (p == lstart || !*lstart)
|
||||
if (p == lstart || *lstart == '\0')
|
||||
ret = list_cb(NULL, 0, arg);
|
||||
else {
|
||||
if (p)
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include <openssl/conf.h>
|
||||
#include <openssl/err.h>
|
||||
#include "internal/sslconf.h"
|
||||
#include "conf_lcl.h"
|
||||
#include "conf_local.h"
|
||||
|
||||
/*
|
||||
* SSL library configuration module placeholder. We load it here but defer
|
||||
|
||||
@@ -108,9 +108,11 @@ for ($i = 0; $i < 128; $i++) {
|
||||
}
|
||||
print "\n};\n\n";
|
||||
|
||||
print "#if ! OPENSSL_API_3\n";
|
||||
print "static const unsigned short CONF_type_win32[128] = {";
|
||||
for ($i = 0; $i < 128; $i++) {
|
||||
print "\n " if ($i % 8) == 0;
|
||||
printf " 0x%04X,", $V_w32[$i];
|
||||
}
|
||||
print "\n};\n";
|
||||
print "#endif\n";
|
||||
Reference in New Issue
Block a user