Commit graph

2360 commits

Author SHA1 Message Date
Richard Levitte
fb0b844a7d Document the change in req. 2000-06-22 09:19:59 +00:00
Richard Levitte
ac57d15b75 Small change to accept the command line parameter '-rand file'. This
parameter takes precedence over the RANDFILE option in the
configuration file.
2000-06-22 09:13:43 +00:00
Dr. Stephen Henson
4dd4535441 Change mkstack.pl so it now sorts each group
into lexical order. Previously it depended on
the order of files in the directory.

This should now mean that all systems will
agree on the order of safestack.h and will
not change it needlessly and avoid massive
needless commits to safestack.h in future.

It wont however avoid this one :-(
2000-06-22 00:34:27 +00:00
Ulf Möller
8415060e1e use faster version 2000-06-21 21:20:46 +00:00
Geoff Thorpe
1a797ac67c * This adds some checking to the 'dlfcn' DSO_METHOD that at least lets
it cope with OpenBSD which doesn't understand "RTLD_NOW".
* Added the dso_scheme config string entry for OpenBSD-x86 to give it
  DSO support.
* 'make update' that has also absorbed some of Steve's mkstack changes
  for the ASN-related macros.
2000-06-21 14:12:25 +00:00
Dr. Stephen Henson
130832150c Fixes for Win32 build.
This is mostly a work around for the old VC++ problem
that it treats func() as func(void).

Various prototypes had been added to 'compare' function
pointers that triggered this. This could be fixed by removing
the prototype, adding function pointer casts to every call or
changing the passed function to use the expected arguments.
I mostly did the latter.

The mkdef.pl script was modified to remove the typesafe
functions which no longer exist.

Oh and some functions called OPENSSL_freeLibrary() were
changed back to FreeLibrary(), wonder how that happened :-)
2000-06-21 02:25:30 +00:00
Dr. Stephen Henson
7ef8206859 Handle ASN1_SET_OF and PKCS12_STACK_OF using function
casts in the same way as STACK_OF.
2000-06-20 18:45:28 +00:00
Geoff Thorpe
ccd98b43ed 'make update' in the engine branch. 2000-06-20 14:12:35 +00:00
Geoff Thorpe
438fa2fdc1 'make update' 2000-06-20 14:06:06 +00:00
Geoff Thorpe
d32e8acf08 Now that the branch has been updated with the DSO changes in the head,
correct the DSO-dependant code in the engine code.
2000-06-20 13:59:48 +00:00
Bodo Möller
0f4805f515 Avoid unnecessary links and incomplete program file in apps/. 2000-06-19 17:38:22 +00:00
Richard Levitte
d8c4d0e819 Merge of stuff from main trunk, all conflicts resolved, and addition
of dynamic lock support in the nCipher code.
2000-06-19 17:35:39 +00:00
Richard Levitte
b215f70a0e Merge of stuff from main trunk, all conflicts resolved, and addition
of dynamic lock support in the nCipher code.
2000-06-19 17:28:22 +00:00
Richard Levitte
562ba1715a 'make update' 2000-06-19 16:51:41 +00:00
Richard Levitte
55b7688ef5 Add the missing callback pointer handling functions.
Also, make sure empty slots of the dynamic lock stack are used.
Actually, I'm not really sure this is the right thing to do, and may
remove it, with an endlessly growing stack as result...
2000-06-19 16:38:27 +00:00
Richard Levitte
3b21161922 The dynamic thread API changed, and so does the documentation. 2000-06-19 15:28:36 +00:00
Richard Levitte
7ed20a2158 Merge of stuff from main trunk, all conflicts resolved. 2000-06-19 14:44:57 +00:00
Bodo Möller
95a9fea711 Add OPENSSL_free at the end of CRYPTO_destroy_dynlockid. 2000-06-19 13:53:15 +00:00
Richard Levitte
e73a6965e3 Redo the support for dynamic locks. First of all, it was terribly
insecure, so a static lock is added to isolate the sensitive parts.
Also, to avoid one thread freeing a lock that is used by another, a
reference counter is added.
2000-06-19 13:38:09 +00:00
Richard Levitte
9bc629208f With the new stack hack macros, there's no need to shorten the names
any more.
2000-06-18 16:07:41 +00:00
Richard Levitte
4b88270ba8 Modifications for VMS. 2000-06-18 16:06:44 +00:00
Richard Levitte
c79223040d Add support for dynamically created and destroyed mutexes. This will
be needed in some ENGINE code, and might serve elsewhere as well.
Note that it's implemented in such a way that the locking itself is
done through the same CRYPTO_lock function as the static locks.

WARNING: This is currently experimental and untested code (it will get
tested soon, though :-)).
2000-06-18 15:59:04 +00:00
Richard Levitte
a8b07aa4e9 First of all, with the current macros, we should never get any
type-specific stack function.  Second, even when we don't build any of
those functions, DECLARE_STACK_OF lines should not find themselves
into $def.
2000-06-18 14:06:40 +00:00
Bodo Möller
3f39e5ae6c Using speaking "variable" names in macros so that e.g. grepping for
sk_whatever_insert and sk_whatever_set immediately reveals the subtle
difference in parameter order.

Change mkstack.pl so that safestack.h is not rewritten when
nothing has changed.
2000-06-17 23:41:44 +00:00
Dr. Stephen Henson
3aceb94b9e Safe stack reorganisation in terms of function casts.
After some messing around this seems to work but needs
a few more tests. Working out the syntax for sk_set_cmp_func()
(cast it to a function that itself returns a function pointer)
was painful :-(

Needs some testing to see what other compilers think of this
syntax.

Also needs similar stuff for ASN1_SET_OF etc etc.
2000-06-16 23:29:26 +00:00
Richard Levitte
fb3e1eeb93 Change to have a single library that works on both Win9x and WinNT.
As far as I understand, it still needs to be compiled on NT...
Contributed by Arne Ansper <arne@ats.cyber.ee>
2000-06-16 15:25:41 +00:00
Bodo Möller
f03aa651c0 typo 2000-06-16 14:35:05 +00:00
Bodo Möller
5d07c20d8e In EVP_BytesToKey, replace explicit "8" by "PKCS5_SALT_LEN". 2000-06-16 14:29:51 +00:00
Bodo Möller
4ee1eb7bd4 There are compilers that complain if a variable has the same name as a
label. (Reported by Alexei Bakharevski.)
2000-06-16 14:24:37 +00:00
Geoff Thorpe
e9a68cfbc3 Currently the DSO_METHOD interface has one entry point to bind all
"symbols" including functions (of all prototypes( and variables. Whilst
casting any function type to another violates ANSI C (I believe), it is
a necessary evil in shared-library APIs. However, it is quite
conceivable that functions in general and data symbols could very well
be represented differently to each other on some systems, as Bodo said;

> Since the function/object distinction is a lot more likely to be
> important on real-life platforms supporting DSO *and* it can be quite
> easily done *and* it will silence compilers that don't like
> assignments from void pointers to function pointer variables, why
> not do it?

I agree. So this change splits the "dso_bind" handler in DSO_METHOD
into "dso_bind_var" and "dso_bind_func". Similarly the exported
function DSO_bind() has been split in two. I've also put together
changes for the various DSO_METHOD implementations, but so far only
DSO_dlfcn() has been tested. BTW: The prototype for dso_bind had been
a bit strange so I've taken the opportunity to change its shape (in
both variations).

Also, the README has been updated - particularly with a note about
using customised native name-translation for shared libraries (and that
you can't do it yet).
2000-06-16 10:45:36 +00:00
Dr. Stephen Henson
d3ed8ceb3d Add support for the modified SGC key format used in IIS. 2000-06-15 23:48:05 +00:00
Richard Levitte
569e7f6ef2 This seems to work better with enums... 2000-06-15 20:57:25 +00:00
Geoff Thorpe
6c62150674 The README for the engine code was quite out of date. Hopefully it is
now less so.
2000-06-15 17:50:08 +00:00
Geoff Thorpe
aa23a57918 (1) In the atalla initialisation, use the test from Ben's earlier
Atalla code to see if the accelerator is running.
(2) Turn some spaces into tabs.
2000-06-15 17:32:42 +00:00
Geoff Thorpe
8e2c277353 Ah, ok so my problem had been typographical rather than philosophical.
It's cute to observe that Atalla having no RSA-specific form of mod_exp
causes a DSA server to achieve about 6 times as many signatures per
second than an RSA server. :-)
2000-06-15 17:14:45 +00:00
Richard Levitte
f20ee31477 Make sure that bs is not getting free'd again.
Reported by Robert Eiglmaier <robert.eiglmaier@ixos.de>
2000-06-15 11:10:15 +00:00
Geoff Thorpe
f18ef82a9f Little typo. 2000-06-14 17:54:28 +00:00
Richard Levitte
1e55286996 Add info on what some other people are currently working on. 2000-06-14 17:27:02 +00:00
Geoff Thorpe
cc015c48db This adds Atalla support code to the ENGINE framework. If you have an
Atalla card, you should be able to compile with the "hw-atalla" switch
with "./config" or "perl Configure", and then you can use the command-
line switch "-engine atalla" inside speed, s_cient and s_server (after
checking out note (1)).

Notes:
  (1) I've turned on native name translation when loading the shared-
      library, but this means that the Unix shared library needs to be
      libatasi.so rather than atasi.so. I got around this in my testing
      by creating a symbollic link from /usr/lib/libatasi.so to the real
      library, but something better will be needed. It also assumes in
      win32 that the DLL will be called atasi.dll - but as I don't have
      a win32/atalla environment to try I have no idea yet if this is
      the case.
  (2) Currently DSA verifies are not accelerated because I haven't yet
      got a mod_exp-based variant of BN_mod_exp2_mont() that yields
      correct results.
  (3) Currently the "init()" doesn't fail if the shared library can
      load successfully but the card is not operational. In this case,
      the ENGINE_init() call will succeed, but all RSA, DSA, DH, and
      the two BN_*** operations will fail until the ENGINE is switched
      back to something that does work. I expect to correct this next.
  (4) Although the API for the Atalla card just has the one crypto
      function suggesting an RSA private key operation - this is in
      fact just a straight mod_exp function that ignores all the RSA
      key parameters except the (private) exponent and modulus. This is
      why the only accelerator work is taking place inside the mod_exp
      function and there's no optimisation of RSA private key operations
      based on CRT etc.
2000-06-14 17:04:10 +00:00
Richard Levitte
9a4051050c Geoff inspired me to nullify some pointers if initialisation went
wrong.  Additionally, just give a new value to hndidx once.
2000-06-14 16:57:57 +00:00
Geoff Thorpe
4c4ea428cc DSO_bind() is effectively a method-specific wrapper for dlopen() or
whatever the underlying API is. It must return (void *) because shared
libraries can expose functions, structures, or whatever. However, some
compilers give loads of warnings about casted function pointers through
this code, so I am explicitly casting them to the right prototypes.
2000-06-14 14:28:16 +00:00
Geoff Thorpe
28e94dc70d I'm working on Atalla ENGINE code, and the existing bn_exp.c hooks
(initiated by ./config and the presence of SDK headers) are conflicting.
2000-06-14 13:27:47 +00:00
Geoff Thorpe
f812743544 If initialisation fails for any reason, the global function pointers
should be NULL'd out.
2000-06-14 13:24:37 +00:00
Bodo Möller
9ef876f269 Report "error" (usually just "File exists", which is harmless)
when symlink() fails.
2000-06-14 10:09:46 +00:00
Geoff Thorpe
87f3435f78 This hooks the "hwcrhk" engine Richard just submitted into the default
engine list if HW_NCIPHER is defined. I want to play :-)
2000-06-13 18:11:38 +00:00
Richard Levitte
86787f93d6 - merged in the latest from the main trunk, fixed all conflicts
- implemented nCipher support via the nfhwcrhk library (not well tested).
- make update + make depend
2000-06-13 16:21:06 +00:00
Bodo Möller
24bec03beb This probably fixes a BN_rshift bug. 2000-06-13 15:07:39 +00:00
Bodo Möller
c3b1424cc0 Use BN_CTX_end when exiting early from BN_mod_exp_mont_word because
BN_mod_exp_atalla could be used.
2000-06-13 13:50:42 +00:00
Geoff Thorpe
8ba6d1b0cc The atalla functionality doesn't work with the "word" version of
BN_mod_exp. Call the regular atalla mod_exp operation instead.
2000-06-13 13:18:51 +00:00
Geoff Thorpe
1c4f90a05d Enable DSO support on alpha (OSF1), cc and gcc.
Also, "make update" has added some missing functions to libeay.num,
updated the TABLE for the alpha changes, and updated thousands of
dependancies that have changed from recent commits.
2000-06-13 12:59:38 +00:00