summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/conf
diff options
context:
space:
mode:
authormarkus <>2003-05-12 02:18:40 +0000
committermarkus <>2003-05-12 02:18:40 +0000
commitd4fcd82bb7f6d603bd61e19a81ba97337b89dfca (patch)
treed52e3a0f1f08f65ad283027e560e17ed0d720462 /src/lib/libcrypto/conf
parent582bbd139cd2afd58d10dc051c5b0b989b441074 (diff)
downloadopenbsd-d4fcd82bb7f6d603bd61e19a81ba97337b89dfca.tar.gz
openbsd-d4fcd82bb7f6d603bd61e19a81ba97337b89dfca.tar.bz2
openbsd-d4fcd82bb7f6d603bd61e19a81ba97337b89dfca.zip
merge 0.9.7b with local changes; crank majors for libssl/libcrypto
Diffstat (limited to 'src/lib/libcrypto/conf')
-rw-r--r--src/lib/libcrypto/conf/Makefile.ssl2
-rw-r--r--src/lib/libcrypto/conf/conf_def.c18
-rw-r--r--src/lib/libcrypto/conf/conf_mall.c4
-rw-r--r--src/lib/libcrypto/conf/conf_sap.c4
4 files changed, 19 insertions, 9 deletions
diff --git a/src/lib/libcrypto/conf/Makefile.ssl b/src/lib/libcrypto/conf/Makefile.ssl
index 133c2329e6..c5873bc6e7 100644
--- a/src/lib/libcrypto/conf/Makefile.ssl
+++ b/src/lib/libcrypto/conf/Makefile.ssl
@@ -71,7 +71,7 @@ lint:
71 lint -DLINT $(INCLUDES) $(SRC)>fluff 71 lint -DLINT $(INCLUDES) $(SRC)>fluff
72 72
73depend: 73depend:
74 $(MAKEDEPEND) $(CFLAG) $(INCLUDES) $(DEPFLAG) $(LIBSRC) 74 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(LIBSRC)
75 75
76dclean: 76dclean:
77 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new 77 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
diff --git a/src/lib/libcrypto/conf/conf_def.c b/src/lib/libcrypto/conf/conf_def.c
index 48ff6f1120..b52ee01a3c 100644
--- a/src/lib/libcrypto/conf/conf_def.c
+++ b/src/lib/libcrypto/conf/conf_def.c
@@ -208,7 +208,8 @@ static int def_load(CONF *conf, const char *name, long *line)
208 208
209static int def_load_bio(CONF *conf, BIO *in, long *line) 209static int def_load_bio(CONF *conf, BIO *in, long *line)
210 { 210 {
211#define BUFSIZE 512 211/* The macro BUFSIZE conflicts with a system macro in VxWorks */
212#define CONFBUFSIZE 512
212 int bufnum=0,i,ii; 213 int bufnum=0,i,ii;
213 BUF_MEM *buff=NULL; 214 BUF_MEM *buff=NULL;
214 char *s,*p,*end; 215 char *s,*p,*end;
@@ -252,20 +253,21 @@ static int def_load_bio(CONF *conf, BIO *in, long *line)
252 section_sk=(STACK_OF(CONF_VALUE) *)sv->value; 253 section_sk=(STACK_OF(CONF_VALUE) *)sv->value;
253 254
254 bufnum=0; 255 bufnum=0;
256 again=0;
255 for (;;) 257 for (;;)
256 { 258 {
257 again=0; 259 if (!BUF_MEM_grow(buff,bufnum+CONFBUFSIZE))
258 if (!BUF_MEM_grow(buff,bufnum+BUFSIZE))
259 { 260 {
260 CONFerr(CONF_F_CONF_LOAD_BIO,ERR_R_BUF_LIB); 261 CONFerr(CONF_F_CONF_LOAD_BIO,ERR_R_BUF_LIB);
261 goto err; 262 goto err;
262 } 263 }
263 p= &(buff->data[bufnum]); 264 p= &(buff->data[bufnum]);
264 *p='\0'; 265 *p='\0';
265 BIO_gets(in, p, BUFSIZE-1); 266 BIO_gets(in, p, CONFBUFSIZE-1);
266 p[BUFSIZE-1]='\0'; 267 p[CONFBUFSIZE-1]='\0';
267 ii=i=strlen(p); 268 ii=i=strlen(p);
268 if (i == 0) break; 269 if (i == 0 && !again) break;
270 again=0;
269 while (i > 0) 271 while (i > 0)
270 { 272 {
271 if ((p[i-1] != '\r') && (p[i-1] != '\n')) 273 if ((p[i-1] != '\r') && (p[i-1] != '\n'))
@@ -275,7 +277,7 @@ static int def_load_bio(CONF *conf, BIO *in, long *line)
275 } 277 }
276 /* we removed some trailing stuff so there is a new 278 /* we removed some trailing stuff so there is a new
277 * line on the end. */ 279 * line on the end. */
278 if (i == ii) 280 if (ii && i == ii)
279 again=1; /* long line */ 281 again=1; /* long line */
280 else 282 else
281 { 283 {
@@ -627,7 +629,7 @@ static int str_copy(CONF *conf, char *section, char **pto, char *from)
627 CONFerr(CONF_F_STR_COPY,CONF_R_VARIABLE_HAS_NO_VALUE); 629 CONFerr(CONF_F_STR_COPY,CONF_R_VARIABLE_HAS_NO_VALUE);
628 goto err; 630 goto err;
629 } 631 }
630 BUF_MEM_grow(buf,(strlen(p)+len-(e-from))); 632 BUF_MEM_grow_clean(buf,(strlen(p)+len-(e-from)));
631 while (*p) 633 while (*p)
632 buf->data[to++]= *(p++); 634 buf->data[to++]= *(p++);
633 from=e; 635 from=e;
diff --git a/src/lib/libcrypto/conf/conf_mall.c b/src/lib/libcrypto/conf/conf_mall.c
index d702af689b..4ba40cf44c 100644
--- a/src/lib/libcrypto/conf/conf_mall.c
+++ b/src/lib/libcrypto/conf/conf_mall.c
@@ -63,7 +63,9 @@
63#include <openssl/dso.h> 63#include <openssl/dso.h>
64#include <openssl/x509.h> 64#include <openssl/x509.h>
65#include <openssl/asn1.h> 65#include <openssl/asn1.h>
66#ifndef OPENSSL_NO_ENGINE
66#include <openssl/engine.h> 67#include <openssl/engine.h>
68#endif
67 69
68/* Load all OpenSSL builtin modules */ 70/* Load all OpenSSL builtin modules */
69 71
@@ -71,6 +73,8 @@ void OPENSSL_load_builtin_modules(void)
71 { 73 {
72 /* Add builtin modules here */ 74 /* Add builtin modules here */
73 ASN1_add_oid_module(); 75 ASN1_add_oid_module();
76#ifndef OPENSSL_NO_ENGINE
74 ENGINE_add_conf_module(); 77 ENGINE_add_conf_module();
78#endif
75 } 79 }
76 80
diff --git a/src/lib/libcrypto/conf/conf_sap.c b/src/lib/libcrypto/conf/conf_sap.c
index 97fb174303..e15c2e5546 100644
--- a/src/lib/libcrypto/conf/conf_sap.c
+++ b/src/lib/libcrypto/conf/conf_sap.c
@@ -63,7 +63,9 @@
63#include <openssl/dso.h> 63#include <openssl/dso.h>
64#include <openssl/x509.h> 64#include <openssl/x509.h>
65#include <openssl/asn1.h> 65#include <openssl/asn1.h>
66#ifndef OPENSSL_NO_ENGINE
66#include <openssl/engine.h> 67#include <openssl/engine.h>
68#endif
67 69
68/* This is the automatic configuration loader: it is called automatically by 70/* This is the automatic configuration loader: it is called automatically by
69 * OpenSSL when any of a number of standard initialisation functions are called, 71 * OpenSSL when any of a number of standard initialisation functions are called,
@@ -78,8 +80,10 @@ void OPENSSL_config(const char *config_name)
78 return; 80 return;
79 81
80 OPENSSL_load_builtin_modules(); 82 OPENSSL_load_builtin_modules();
83#ifndef OPENSSL_NO_ENGINE
81 /* Need to load ENGINEs */ 84 /* Need to load ENGINEs */
82 ENGINE_load_builtin_engines(); 85 ENGINE_load_builtin_engines();
86#endif
83 /* Add others here? */ 87 /* Add others here? */
84 88
85 89