Hello

Following patch makes openssl speed -multi work with -engine 
chil and allows user interface to be set properly.

diff -r -u openssl-SNAP-20020127.orig/apps/speed.c openssl-SNAP-20020127/apps/speed.c
--- openssl-SNAP-20020127.orig/apps/speed.c     Wed Jan  2 19:00:15 2002
+++ openssl-SNAP-20020127/apps/speed.c  Tue Jan 29 11:51:45 2002
@@ -353,7 +353,7 @@
 
 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;
diff -r -u openssl-SNAP-20020127.orig/crypto/engine/hw_ncipher.c 
openssl-SNAP-20020127/crypto/engine/hw_ncipher.c
--- openssl-SNAP-20020127.orig/crypto/engine/hw_ncipher.c       Fri Jan 25 20:02:54 
2002
+++ openssl-SNAP-20020127/crypto/engine/hw_ncipher.c    Tue Jan 29 11:45:03 2002
@@ -357,7 +357,7 @@
 
 /* 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,6 +741,7 @@
                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);



I feel that HWCryptoHook_InitFlags_SimpleForkCheck really
makes sense in initflags, because:

1. it cannot be set later
2. it does not break anything (i guess)
3. for max. performance, nshield needs to be used from several
processes simultaneously (which implies fork() or something 
similar).


-v

-- 
Sed quis custodiet ipsos Custodes?
        [Who guards the Guardians?]

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to