Commit graph

3569 commits

Author SHA1 Message Date
Richard Levitte
48bf4aae24 Define the right macro for Linux and other GNU-based systems to get a correct declaration of strdup() 2001-02-22 18:03:30 +00:00
Richard Levitte
6231576088 e_os.h defines Getenv() 2001-02-22 17:59:55 +00:00
Richard Levitte
4270144b39 CONF_METHOD is one of the few places where you find MS_FAR. I can't
really see why we need to define these function pointers with MS_FAR
if it's not done cosistently everywhere.

If we decide to support MS_FAR modifiers, it's better to have the
named something more unique for OpenSSL and to define them in e_os2.h.
2001-02-22 17:41:15 +00:00
Richard Levitte
5031a89dc3 Define the OPENSSL_NO_* macros as NO_* macros for the sake of applications thathaven't yet been changed 2001-02-22 17:36:41 +00:00
Bodo Möller
bbd1c84e6e e_os.h problems have been solved in the main branch. 2001-02-22 15:10:11 +00:00
Bodo Möller
a2cf08cc23 undo previous change: "e_os.h" is now the official name for the file
to include (but the OpenSSL_0_9_6-stable branche still has
inconsistencies)
2001-02-22 15:08:30 +00:00
Bodo Möller
32828e6ffd include e_os.h as "openssl/e_os.h" (as elsewhere) 2001-02-22 14:59:11 +00:00
Bodo Möller
d3a73875e2 include e_os.h as "openssl/e_os.h" (as elsewhere) 2001-02-22 14:58:38 +00:00
Richard Levitte
41d2a336ee e_os.h does not belong with the exported headers. Do not put it there
and make all files the depend on it include it without prefixing it
with openssl/.

This means that all Makefiles will have $(TOP) as one of the include
directories.
2001-02-22 14:45:02 +00:00
Richard Levitte
627774fd87 Since RAND_file_name() uses strlen, make sure the number that's
compared to it has the type size_t.  Included the needed headers to
make that happen.
2001-02-22 14:40:15 +00:00
Richard Levitte
a5bc1e8568 Use e_os2.h rather than opensslconf.h, since some needed macros are
defined there.
2001-02-22 14:37:50 +00:00
Richard Levitte
c38171ba1f Exported header files should not include e_os.h. 2001-02-22 14:27:22 +00:00
Richard Levitte
bb3ee8e75d Since opensslconf.h might be included over and over, undefine
OPENSSL_UNISTD before redefining it, to avoid compiler warnings.
2001-02-22 14:24:50 +00:00
Richard Levitte
32654e792b One indirection level too little compared to the
pre-CRYPTO_MEM_LEAK_CB time.
2001-02-22 14:23:44 +00:00
Richard Levitte
19f2192136 Windows does not know of strigs.h or strcasecmp, so when in Windows,
make strcasecmp a macro to _stricmp.
2001-02-22 14:21:06 +00:00
Richard Levitte
1961b327eb Always include opensslconf.h, even if it's already been done before.
The reason is that some parts are only included when certain other
include files have been included.

Also, it seems that the rest of the OpenSSL code assumes that all
kinds of M$ Windows are MSDOS as well...
2001-02-22 13:59:36 +00:00
Richard Levitte
2ae87d465e When inside a #if 0..#endif, do not define anything. 2001-02-22 13:24:17 +00:00
Richard Levitte
e3ef8d2e6b Since SSL_add_dir_cert_subjects_to_stack isn't impemented on VMS,
there's no point creating an alias for it.
2001-02-22 13:22:20 +00:00
Richard Levitte
65a87c7d01 Include e_os2.h instead of opensslconf.h.
SSL_add_dir_cert_subjects_to_stack is not implemented on WIN32 and
VMS, so declare it the same way.
2001-02-22 13:19:50 +00:00
Dr. Stephen Henson
72e3c20c14 Rebuild ASN1 error codes to remove unused function and reason codes. 2001-02-22 00:39:06 +00:00
Geoff Thorpe
ec0f19597e If a callback is generating a new session ID for SSLv2, then upon exiting,
the ID will be padded out to 16 bytes if the callback attempted to generate
a shorter one. The problem is that the uniqueness checking function used in
callbacks may mistakenly think a 9-byte ID is unique when in fact its
padded 16-byte version is not. This makes the checking function detect
SSLv2 cases, and ensures the padded form is checked rather than the shorter
one passed by the callback.
2001-02-21 21:38:32 +00:00
Geoff Thorpe
fa2b8db499 Note changes re: session ID generation callbacks, etc. 2001-02-21 18:48:33 +00:00
Geoff Thorpe
1aa0d94781 This adds command-line support to s_server for controlling the generation
of session IDs. Namely, passing "-id_prefix <text>" will set a
generate_session_id() callback that generates session IDs as random data
with <text> block-copied over the top of the start of the ID. This can be
viewed by watching the session ID s_client's output when it connects.

This is mostly useful for testing any SSL/TLS code (eg. proxies) that wish
to deal with multiple servers, when each of which might be generating a
unique range of session IDs (eg. with a certain prefix).
2001-02-21 18:38:48 +00:00
Geoff Thorpe
dc644fe229 This change allows a callback to be used to override the generation of
SSL/TLS session IDs in a server. According to RFC2246, the session ID is an
arbitrary value chosen by the server. It can be useful to have some control
over this "arbitrary value" so as to choose it in ways that can aid in
things like external session caching and balancing (eg. clustering). The
default session ID generation is to fill the ID with random data.

The callback used by default is built in to ssl_sess.c, but registering a
callback in an SSL_CTX or in a particular SSL overrides this. BTW: SSL
callbacks will override SSL_CTX callbacks, and a new SSL structure inherits
any callback set in its 'parent' SSL_CTX. The header comments describe how
this mechanism ticks, and source code comments describe (hopefully) why it
ticks the way it does.

Man pages are on the way ...

[NB: Lutz was also hacking away and helping me to figure out how best to do
this.]
2001-02-21 18:06:26 +00:00
Geoff Thorpe
47ddf355b4 'make update' 2001-02-21 17:43:52 +00:00
Ulf Möller
a39ded513a BN_rand_range() as in main branch. 2001-02-21 15:54:31 +00:00
Richard Levitte
941181ec0f 'make update' 2001-02-21 14:12:50 +00:00
Richard Levitte
d399fdf877 Modify mkdef.pl to recognise and parse prprocessor conditionals of the
form '#if defined(...) || defined(...) || ...' and '#if !defined(...)
&& !defined(...) && ...'.  This also avoids the growing number of
special cases it was previously handling (some of them wrongly).
2001-02-21 14:12:03 +00:00
Richard Levitte
487550b61d I had forgotten to change mkerr.pl to use the new macro system. 2001-02-21 12:03:20 +00:00
Richard Levitte
35618bf6ad strdup() is a X/Open extension. 2001-02-20 20:00:30 +00:00
Richard Levitte
460fe31f0c With later version of DEC C on VMS, some functions (strcmp(), for
example) are declared with some extra linkage information.  This
generates a warning when using the function name as a value to a
regular function pointer with the "correct" definition of the
function.  Therefore, use a macro to cast the appropriate function on
VMS.
2001-02-20 19:13:46 +00:00
Richard Levitte
14565bedaf Some functions, like strdup() and strcasecmp(), are defined in
strings.h according to X/Open.
2001-02-20 19:05:59 +00:00
Richard Levitte
02cc82ff8a I forgot there was a reason why the inclusions and definition of u_int
was made in a certain sequence.  This change restores the earlier
"chain of command".
2001-02-20 17:37:02 +00:00
Richard Levitte
38f3b3e29c OpenVMS catches up. 2001-02-20 17:14:30 +00:00
Geoff Thorpe
4dc719fc37 The callbacks in the NAME_FUNCS structure are not used directly as LHASH
callbacks, and their prototypes were consistent as they were. These casts
need reversing.

Also, I personally find line breaks during parameter lists (ie a line
ending in a comma) easier to read at a glance than line breaks at the end
of a function call and before a dereference on the return value (ie a line
ending in a closed-bracket followed by a line starting with "->").
2001-02-20 16:31:15 +00:00
Ulf Möller
48f2ef8d00 make it a loop as in dsa 2001-02-20 16:17:25 +00:00
Richard Levitte
be1bd9239f Get e_os2.h to get all the system definitions correctly. 2001-02-20 14:07:03 +00:00
Richard Levitte
b8feddae71 Get the right cast for lhash callback functions. 2001-02-20 14:00:29 +00:00
Richard Levitte
a9daa46758 Include string.h so mem*() functions get properly declared. 2001-02-20 13:41:11 +00:00
Dr. Stephen Henson
569afce4b0 Fix typo. 2001-02-20 13:30:28 +00:00
Richard Levitte
a9aa3d580c A new bunch of too long symbols to hack.
OCSP_CRLID_new and OCSP_crlID_new clash on case-insensitive systems.
2001-02-20 13:26:00 +00:00
Richard Levitte
56a6ccc84f DEC C on VMS is pedantic by definition. 2001-02-20 13:24:23 +00:00
Richard Levitte
03c4d82fa1 Include OpenSSL header files earlier so macros like OPENSSL_SYS_VMS
get a chance to be defined.
Make a batter file name translator (uhm, no, that's not the finished
variant :-)).
2001-02-20 13:23:42 +00:00
Richard Levitte
7ab1a39181 Include OpenSSL header files earlier so macros like OPENSSL_SYS_VMS
get a chance to be defined.
2001-02-20 13:22:35 +00:00
Richard Levitte
56dde3ebe6 Include opensslconf.h or the like early to make sure system macros get
correctly defined.
2001-02-20 13:11:54 +00:00
Richard Levitte
6525ced540 Let VMS catch up. 2001-02-20 13:10:14 +00:00
Richard Levitte
32d0ad41a4 DEC C on VMS is pedantic by definition. 2001-02-20 13:06:55 +00:00
Richard Levitte
e28e42a549 Use sk_*_new_null() instead of sk_*_new(NULL). That avoids getting
lots of silly warnings from the compiler.
2001-02-20 13:06:10 +00:00
Bodo Möller
ff055b5c89 honour '-no_tmp_rsa' 2001-02-20 12:59:48 +00:00
Bodo Möller
0069dbc4a5 honour -no_tmp_rsa 2001-02-20 12:58:57 +00:00