Commit graph

3275 commits

Author SHA1 Message Date
Richard Levitte
f3a3106807 Spelling corrected. 2001-03-02 10:57:54 +00:00
Richard Levitte
62dc5aad06 Introduce the possibility to access global variables through
functions on platform were that's the best way to handle exporting
global variables in shared libraries.  To enable this functionality,
one must configure with "EXPORT_VAR_AS_FN" or defined the C macro
"OPENSSL_EXPORT_VAR_AS_FUNCTION" in crypto/opensslconf.h (the latter
is normally done by Configure or something similar).

To implement a global variable, use the macro OPENSSL_IMPLEMENT_GLOBAL
in the source file (foo.c) like this:

	OPENSSL_IMPLEMENT_GLOBAL(int,foo)=1;
	OPENSSL_IMPLEMENT_GLOBAL(double,bar);

To declare a global variable, use the macros OPENSSL_DECLARE_GLOBAL
and OPENSSL_GLOBAL_REF in the header file (foo.h) like this:

	OPENSSL_DECLARE_GLOBAL(int,foo);
	#define foo OPENSSL_GLOBAL_REF(foo)
	OPENSSL_DECLARE_GLOBAL(double,bar);
	#define bar OPENSSL_GLOBAL_REF(bar)

The #defines are very important, and therefore so is including the
header file everywere where the defined globals are used.

The macro OPENSSL_EXPORT_VAR_AS_FUNCTION also affects the definition
of ASN.1 items, but that structure is a bt different.

The largest change is in util/mkdef.pl which has been enhanced with
better and easier to understand logic to choose which symbols should
go into the Windows .def files as well as a number of fixes and code
cleanup (among others, algorithm keywords are now sorted
lexicographically to avoid constant rewrites).
2001-03-02 10:38:19 +00:00
Lutz Jänicke
45ecfb1973 Typo, spotted by "Greg Stark" <gstark@ethentica.com>. 2001-03-01 16:50:11 +00:00
Dr. Stephen Henson
f23478c314 Fix bug in copy_email() which would not
find emailAddress at start of subject name.
2001-03-01 13:32:11 +00:00
Dr. Stephen Henson
3d2e469cfa Fix a bug which caused BN_div to produce the
wrong result if rm==num and num < 0.
2001-02-28 00:51:48 +00:00
Ulf Möller
bf401a2aef %f conversion bug fix
Submitted by: Henrik Eriksson <henrik.eriksson@axis.com>
2001-02-27 23:59:18 +00:00
Ulf Möller
06a2b07bb0 don't read from tty in test mode 2001-02-27 21:10:21 +00:00
Ulf Möller
8700e7b3cf run self-test with no-krb5 2001-02-27 21:05:55 +00:00
Richard Levitte
7f19d42e9d MacOSX doesn't have ftime().
Spotted by Pieter Bowman <bowman@math.utah.edu>
2001-02-27 08:14:32 +00:00
Dr. Stephen Henson
d7bbd31efe Typo in comment. 2001-02-26 23:34:14 +00:00
Dr. Stephen Henson
fafc7f9875 Enhance OCSP_request_verify() so it finds the signers certificate
properly and supports several flags.
2001-02-26 14:17:58 +00:00
Richard Levitte
d88a26c489 make update
Note that all *_it variables are suddenly non-existant according to
libeay.num.  This is a bug that will be corrected.  Please be patient.
2001-02-26 10:54:08 +00:00
Richard Levitte
64b48877fa Add the CCITT pilot directory OIDs. 2001-02-26 10:27:41 +00:00
Dr. Stephen Henson
b31cc2d9f7 Trap an invalid ASN1_ITEM construction and print out
the errant field for more ASN1 error conditions.
2001-02-25 14:11:31 +00:00
Dr. Stephen Henson
f196522159 New function and options to check OCSP response validity. 2001-02-24 13:50:06 +00:00
Dr. Stephen Henson
4ff18c8c3e Print out OID of unknown signature or public key
algorithms.
2001-02-24 01:42:21 +00:00
Dr. Stephen Henson
db4a465974 Stop PKCS7_verify() core dumping with unknown public
key algorithms and leaking if the signature verify
fails.
2001-02-24 01:38:56 +00:00
Lutz Jänicke
3cdc8ad07a Describe new callback for session id generation. 2001-02-23 21:38:42 +00:00
Lutz Jänicke
2c1571b4ff SSL_get_version() was an easy one :-) 2001-02-23 21:05:56 +00:00
Ulf Möller
6767a53669 That statement seems to be not true. In fact, I have said that I would
like to use libtool, but not automake.

Let's investigate that further, or leave the question open for now.
2001-02-23 18:22:58 +00:00
Ulf Möller
ba93fd6a38 autoconf would be useful... 2001-02-23 18:00:06 +00:00
Dr. Stephen Henson
d7c06e9ec7 Make OCSP cert id code tolerate a missing issuer certificate
or serial number.
2001-02-23 13:04:24 +00:00
Dr. Stephen Henson
386828d029 Oops, forgot CHANGES entry for ASN1_ITEM_FUNCTIONS. 2001-02-23 13:02:56 +00:00
Dr. Stephen Henson
d339187b1a Get rid of ASN1_ITEM_FUNCTIONS dummy function
prototype hack. This unfortunately means that
every ASN1_*_END construct cannot have a
trailing ;
2001-02-23 12:47:06 +00:00
Richard Levitte
61fca8b69b make depend. 2001-02-23 11:57:35 +00:00
Dr. Stephen Henson
bb5ea36b96 Initial support for ASN1_ITEM_FUNCTION option to
change the way ASN1 modules are exported.

Still needs a bit of work for example the hack which a
dummy function prototype to avoid compilers warning about
multiple ;s.
2001-02-23 03:16:09 +00:00
Geoff Thorpe
e3a9164073 I missed one. 2001-02-23 00:09:50 +00:00
Geoff Thorpe
f85c9904c6 Fix an oversight - when checking a potential session ID for conflicts with
an SSL_CTX's session cache, it is necessary to compare the ssl_version at
the same time (a conflict is defined, courtesy of SSL_SESSION_cmp(), as a
matching id/id_length pair and a matching ssl_version). However, the
SSL_SESSION that will result from the current negotiation does not
necessarily have the same ssl version as the "SSL_METHOD" in use by the
SSL_CTX - part of the work in a handshake is to agree on an ssl version!

This is fixed by having the check function accept an SSL pointer rather
than the SSL_CTX it belongs to.

[Thanks to Lutz for illuminating the full extent of my stupidity]
2001-02-23 00:02:56 +00:00
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
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