Apply patch from Toomas Kiisk <vix@cyber.ee> and complete it.
authorRichard Levitte <levitte@openssl.org>
Tue, 29 Jan 2002 12:36:01 +0000 (12:36 +0000)
committerRichard Levitte <levitte@openssl.org>
Tue, 29 Jan 2002 12:36:01 +0000 (12:36 +0000)
CHANGES
apps/speed.c
crypto/engine/hw_ncipher.c

diff --git a/CHANGES b/CHANGES
index 38dc3dc3ff1650e448d1dcb7e5fa02b977570a64..42c32dc20ad5ae38f5c24df148b46bfd9ad6bf45 100644 (file)
--- a/CHANGES
+++ b/CHANGES
          *) applies to 0.9.6a/0.9.6b/0.9.6c and 0.9.7
          +) applies to 0.9.7 only
 
+  +) Have the CHIL engine fork-safe (as defined by nCipher) and actually
+     make the newer ENGINE framework commands for the CHIL engine work.
+     [Toomas Kiisk <vix@cyber.ee> and Richard Levitte]
+
   +) Make it possible to produce shared libraries on ReliantUNIX.
      [Robert Dahlem <Robert.Dahlem@ffm2.siemens.de> via Richard Levitte]
 
index 08d00beddbe7ddcbe309347e4bd773127ec2f853..1d62c8b87a993f1e5cb22d5a62de16adac09f72a 100644 (file)
@@ -353,7 +353,7 @@ int MAIN(int, char **);
 
 int MAIN(int argc, char **argv)
        {
-       ENGINE *e;
+       ENGINE *e = NULL;
        unsigned char *buf=NULL,*buf2=NULL;
        int mret=1;
        long count=0,save_count=0;
index e3ce53478857e6cae1029cbdfa224a7099fde78b..8d86ce20bf34e40f51910d8ddc426f06e3594c25 100644 (file)
@@ -357,7 +357,7 @@ static HWCryptoHook_CallerContext password_context = { NULL, NULL, NULL };
 
 /* Stuff to pass to the HWCryptoHook library */
 static HWCryptoHook_InitInfo hwcrhk_globals = {
-       0,                      /* Flags */
+       HWCryptoHook_InitFlags_SimpleForkCheck, /* Flags */
        &logstream,             /* logstream */
        sizeof(BN_ULONG),       /* limbsize */
        0,                      /* mslimb first: false for BNs */
@@ -741,11 +741,13 @@ static int hwcrhk_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)())
                CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);
                break;
        case ENGINE_CTRL_SET_USER_INTERFACE:
+       case HWCRHK_CMD_SET_USER_INTERFACE:
                CRYPTO_w_lock(CRYPTO_LOCK_ENGINE);
                password_context.ui_method = (UI_METHOD *)p;
                CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);
                break;
        case ENGINE_CTRL_SET_CALLBACK_DATA:
+       case HWCRHK_CMD_SET_CALLBACK_DATA:
                CRYPTO_w_lock(CRYPTO_LOCK_ENGINE);
                password_context.callback_data = p;
                CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);