/[smeserver]/rpms/openssl/sme8/openssl-fips-0.9.8e-dh-check.patch
ViewVC logotype

Annotation of /rpms/openssl/sme8/openssl-fips-0.9.8e-dh-check.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Tue Feb 18 03:03:09 2014 UTC (10 years, 8 months ago) by wellsi
Branch: MAIN
CVS Tags: openssl-0_9_8e-28_el5_sme, openssl-0_9_8e-33_1_el5_sme, openssl-0_9_8e-32_1_el5_sme, openssl-0_9_8e-27_1_el5_sme, openssl-0_9_8e-27_el5_10_1, openssl-0_9_8e-31_1_el5_sme, HEAD
Branch point for: upstream
Initial import

1 wellsi 1.1 diff -up openssl-fips-0.9.8e/fips/dh/fips_dh_key.c.dh-check openssl-fips-0.9.8e/fips/dh/fips_dh_key.c
2     --- openssl-fips-0.9.8e/fips/dh/fips_dh_key.c.dh-check 2007-08-21 16:44:13.000000000 +0200
3     +++ openssl-fips-0.9.8e/fips/dh/fips_dh_key.c 2011-05-04 12:30:34.000000000 +0200
4     @@ -189,6 +189,7 @@ static int compute_key(unsigned char *ke
5     BN_MONT_CTX *mont=NULL;
6     BIGNUM *tmp;
7     int ret= -1;
8     + int check_result;
9    
10     ctx = BN_CTX_new();
11     if (ctx == NULL) goto err;
12     @@ -227,6 +228,12 @@ static int compute_key(unsigned char *ke
13     goto err;
14     }
15    
16     + if (!DH_check_pub_key(dh, pub_key, &check_result) || check_result)
17     + {
18     + DHerr(DH_F_COMPUTE_KEY,DH_R_INVALID_PUBKEY);
19     + goto err;
20     + }
21     +
22     if (!dh->meth->bn_mod_exp(dh, tmp, pub_key, dh->priv_key,dh->p,ctx,mont))
23     {
24     DHerr(DH_F_COMPUTE_KEY,ERR_R_BN_LIB);
25     @@ -235,8 +242,11 @@ static int compute_key(unsigned char *ke
26    
27     ret=BN_bn2bin(tmp,key);
28     err:
29     - BN_CTX_end(ctx);
30     - BN_CTX_free(ctx);
31     + if (ctx != NULL)
32     + {
33     + BN_CTX_end(ctx);
34     + BN_CTX_free(ctx);
35     + }
36     return(ret);
37     }
38    

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed