Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(406)

Side by Side Diff: openssl/crypto/dh/dh_key.c

Issue 9254031: Upgrade chrome's OpenSSL to same version Android ships with. (Closed) Base URL: http://src.chromium.org/svn/trunk/deps/third_party/openssl/
Patch Set: '' Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « openssl/crypto/dh/dh_gen.c ('k') | openssl/crypto/dh/dh_pmeth.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* crypto/dh/dh_key.c */ 1 /* crypto/dh/dh_key.c */
2 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
5 * This package is an SSL implementation written 5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com). 6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL. 7 * The implementation was written so as to conform with Netscapes SSL.
8 * 8 *
9 * This library is free for commercial and non-commercial use as long as 9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions 10 * the following conditions are aheared to. The following conditions
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 * copied and put under another distribution licence 55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.] 56 * [including the GNU Public Licence.]
57 */ 57 */
58 58
59 #include <stdio.h> 59 #include <stdio.h>
60 #include "cryptlib.h" 60 #include "cryptlib.h"
61 #include <openssl/bn.h> 61 #include <openssl/bn.h>
62 #include <openssl/rand.h> 62 #include <openssl/rand.h>
63 #include <openssl/dh.h> 63 #include <openssl/dh.h>
64 64
65 #ifndef OPENSSL_FIPS
66
67 static int generate_key(DH *dh); 65 static int generate_key(DH *dh);
68 static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh); 66 static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh);
69 static int dh_bn_mod_exp(const DH *dh, BIGNUM *r, 67 static int dh_bn_mod_exp(const DH *dh, BIGNUM *r,
70 const BIGNUM *a, const BIGNUM *p, 68 const BIGNUM *a, const BIGNUM *p,
71 const BIGNUM *m, BN_CTX *ctx, 69 const BIGNUM *m, BN_CTX *ctx,
72 BN_MONT_CTX *m_ctx); 70 BN_MONT_CTX *m_ctx);
73 static int dh_init(DH *dh); 71 static int dh_init(DH *dh);
74 static int dh_finish(DH *dh); 72 static int dh_finish(DH *dh);
75 73
76 int DH_generate_key(DH *dh) 74 int DH_generate_key(DH *dh)
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 dh->flags |= DH_FLAG_CACHE_MONT_P; 254 dh->flags |= DH_FLAG_CACHE_MONT_P;
257 return(1); 255 return(1);
258 } 256 }
259 257
260 static int dh_finish(DH *dh) 258 static int dh_finish(DH *dh)
261 { 259 {
262 if(dh->method_mont_p) 260 if(dh->method_mont_p)
263 BN_MONT_CTX_free(dh->method_mont_p); 261 BN_MONT_CTX_free(dh->method_mont_p);
264 return(1); 262 return(1);
265 } 263 }
266
267 #endif
OLDNEW
« no previous file with comments | « openssl/crypto/dh/dh_gen.c ('k') | openssl/crypto/dh/dh_pmeth.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698