Re: PATCH: crypto/openssl/crypto/engine/eng_table.c

From: Mike Tancsa <mike_at_sentex.net>
Date: Wed, 17 Sep 2008 08:13:21 -0400
At 04:06 AM 9/17/2008, Ian Freislich wrote:
>Hi
>
>I had to apply the following patch to fix the engine cache in openssl
>so that it will actually use the padlock driver for accelleration.
>It appears that the original logic was reversed.

Hi,
         For applications (eg sshd), is not
--- crypto/openssl/crypto/engine/eng_cryptodev.c        2008-02-05 
13:10:31.000000000 -0500
+++ crypto/openssl/crypto/engine/eng_cryptodev.c.good   2008-08-21 
13:10:26.000000000 -0400
_at__at_ -1127,6 +1127,7 _at__at_
         }

         ENGINE_add(engine);
+       ENGINE_set_default_ciphers(engine);
         ENGINE_free(engine);
         ERR_clear_error();
  }

also necessary ?

         ---Mike

>RCS file: /home/ncvs/src/crypto/openssl/crypto/engine/eng_table.c,v
>retrieving revision 1.1.1.2
>diff -u -d -r1.1.1.2 eng_table.c
>--- eng_table.c 29 Jul 2006 19:10:18 -0000      1.1.1.2
>+++ eng_table.c 12 Jun 2008 07:52:52 -0000
>_at__at_ -135,7 +135,7 _at__at_
>                         {
>                         fnd = OPENSSL_malloc(sizeof(ENGINE_PILE));
>                         if(!fnd) goto end;
>-                       fnd->uptodate = 0;
>+                       fnd->uptodate = 1;
>                         fnd->nid = *nids;
>                         fnd->sk = sk_ENGINE_new_null();
>                         if(!fnd->sk)
>_at__at_ -152,7 +152,7 _at__at_
>                 if(!sk_ENGINE_push(fnd->sk, e))
>                         goto end;
>                 /* "touch" this ENGINE_PILE */
>-               fnd->uptodate = 1;
>+               fnd->uptodate = 0;
>                 if(setdefault)
>                         {
>                         if(!engine_unlocked_init(e))
>_at__at_ -180,7 +180,7 _at__at_
>                 {
>                 sk_ENGINE_delete(pile->sk, n);
>                 /* "touch" this ENGINE_CIPHER */
>-               pile->uptodate = 1;
>+               pile->uptodate = 0;
>                 }
>         if(pile->funct == e)
>                 {
>
>
>--
>Ian Freislich
>
>_______________________________________________
>freebsd-current_at_freebsd.org mailing list
>http://lists.freebsd.org/mailman/listinfo/freebsd-current
>To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org"
Received on Wed Sep 17 2008 - 10:53:31 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:35 UTC