aboutsummaryrefslogtreecommitdiff
path: root/crypto/conf
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/conf')
-rw-r--r--crypto/conf/conf_def.c17
-rw-r--r--crypto/conf/conf_def.h2
-rw-r--r--crypto/conf/conf_lib.c2
-rw-r--r--crypto/conf/conf_local.h (renamed from crypto/conf/conf_lcl.h)0
-rw-r--r--crypto/conf/conf_mall.c2
-rw-r--r--crypto/conf/conf_ssl.c2
6 files changed, 12 insertions, 13 deletions
diff --git a/crypto/conf/conf_def.c b/crypto/conf/conf_def.c
index 8e3f42a0caca..ca76fa3679b8 100644
--- a/crypto/conf/conf_def.c
+++ b/crypto/conf/conf_def.c
@@ -703,7 +703,9 @@ static BIO *process_include(char *include, OPENSSL_DIR_CTX **dirctx,
static BIO *get_next_file(const char *path, OPENSSL_DIR_CTX **dirctx)
{
const char *filename;
+ size_t pathlen;
+ pathlen = strlen(path);
while ((filename = OPENSSL_DIR_read(dirctx, path)) != NULL) {
size_t namelen;
@@ -716,7 +718,7 @@ static BIO *get_next_file(const char *path, OPENSSL_DIR_CTX **dirctx)
char *newpath;
BIO *bio;
- newlen = strlen(path) + namelen + 2;
+ newlen = pathlen + namelen + 2;
newpath = OPENSSL_zalloc(newlen);
if (newpath == NULL) {
CONFerr(CONF_F_GET_NEXT_FILE, ERR_R_MALLOC_FAILURE);
@@ -727,14 +729,11 @@ static BIO *get_next_file(const char *path, OPENSSL_DIR_CTX **dirctx)
* If the given path isn't clear VMS syntax,
* we treat it as on Unix.
*/
- {
- size_t pathlen = strlen(path);
-
- if (path[pathlen - 1] == ']' || path[pathlen - 1] == '>'
- || path[pathlen - 1] == ':') {
- /* Clear VMS directory syntax, just copy as is */
- OPENSSL_strlcpy(newpath, path, newlen);
- }
+ if (path[pathlen - 1] == ']'
+ || path[pathlen - 1] == '>'
+ || path[pathlen - 1] == ':') {
+ /* Clear VMS directory syntax, just copy as is */
+ OPENSSL_strlcpy(newpath, path, newlen);
}
#endif
if (newpath[0] == '\0') {
diff --git a/crypto/conf/conf_def.h b/crypto/conf/conf_def.h
index 2016d31b8929..2ced300e40d6 100644
--- a/crypto/conf/conf_def.h
+++ b/crypto/conf/conf_def.h
@@ -2,7 +2,7 @@
* WARNING: do not edit!
* Generated by crypto/conf/keysets.pl
*
- * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
diff --git a/crypto/conf/conf_lib.c b/crypto/conf/conf_lib.c
index 2d40ac97ec27..0b7dd26d63b0 100644
--- a/crypto/conf/conf_lib.c
+++ b/crypto/conf/conf_lib.c
@@ -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>
diff --git a/crypto/conf/conf_lcl.h b/crypto/conf/conf_local.h
index 6e1f7fe00d70..6e1f7fe00d70 100644
--- a/crypto/conf/conf_lcl.h
+++ b/crypto/conf/conf_local.h
diff --git a/crypto/conf/conf_mall.c b/crypto/conf/conf_mall.c
index 7e86948e89e9..d7eaa8509b2f 100644
--- a/crypto/conf/conf_mall.c
+++ b/crypto/conf/conf_mall.c
@@ -14,7 +14,7 @@
#include <openssl/x509.h>
#include <openssl/asn1.h>
#include <openssl/engine.h>
-#include "conf_lcl.h"
+#include "conf_local.h"
/* Load all OpenSSL builtin modules */
diff --git a/crypto/conf/conf_ssl.c b/crypto/conf/conf_ssl.c
index 387f2cf46c31..4bd8117d365c 100644
--- a/crypto/conf/conf_ssl.c
+++ b/crypto/conf/conf_ssl.c
@@ -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