Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-6-0]: src/crypto/external/bsd/openssl/dist/engines/ccgost Pull up...



details:   https://anonhg.NetBSD.org/src/rev/45867c353922
branches:  netbsd-6-0
changeset: 774764:45867c353922
user:      riz <riz%NetBSD.org@localhost>
date:      Sun Feb 10 20:20:55 2013 +0000

description:
Pull up following revision(s) (requested by manu in ticket #806):
        crypto/external/bsd/openssl/dist/engines/ccgost/gost_eng.c: revision 1.2
Pull multiple free bua fix from upstream:
http://git.openssl.org/gitweb/?p=openssl.git;a=patch;h=d21bf10dea6588b63
2a65b4fe594e04f288aad83;hp=d47c01a31a67ff4370b1883a58cabd0279752bb4
Multiple copies of the ENGINE will cause problems when it is cleaned up
as
the methods are stored in static structures which will be overwritten
and
freed up more than once.
Set static methods to NULL when the ENGINE is freed so it can be
reloaded.

diffstat:

 crypto/external/bsd/openssl/dist/engines/ccgost/gost_eng.c |  12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diffs (29 lines):

diff -r a0f7145dc1d7 -r 45867c353922 crypto/external/bsd/openssl/dist/engines/ccgost/gost_eng.c
--- a/crypto/external/bsd/openssl/dist/engines/ccgost/gost_eng.c        Fri Feb 08 23:04:14 2013 +0000
+++ b/crypto/external/bsd/openssl/dist/engines/ccgost/gost_eng.c        Sun Feb 10 20:20:55 2013 +0000
@@ -64,6 +64,13 @@
 static int gost_engine_destroy(ENGINE *e)
        { 
        gost_param_free();
+
+       pmeth_GostR3410_94 = NULL;
+       pmeth_GostR3410_2001 = NULL;
+       pmeth_Gost28147_MAC = NULL;
+       ameth_GostR3410_94 = NULL;
+       ameth_GostR3410_2001 = NULL;
+       ameth_Gost28147_MAC = NULL;
        return 1;
        }
 
@@ -263,7 +270,10 @@
        
 void ENGINE_load_gost(void)
        {
-       ENGINE *toadd =engine_gost();
+       ENGINE *toadd;
+       if (pmeth_GostR3410_94)
+               return;
+       toadd = engine_gost();
        if (!toadd) return;
        ENGINE_add(toadd);
        ENGINE_free(toadd);



Home | Main Index | Thread Index | Old Index