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

Side by Side Diff: openssl/crypto/bn/bn_print.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/bn/bn_opt.c ('k') | openssl/crypto/bn/bn_x931p.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/bn/bn_print.c */ 1 /* crypto/bn/bn_print.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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 287
288 bn_correct_top(ret); 288 bn_correct_top(ret);
289 *bn=ret; 289 *bn=ret;
290 bn_check_top(ret); 290 bn_check_top(ret);
291 return(num); 291 return(num);
292 err: 292 err:
293 if (*bn == NULL) BN_free(ret); 293 if (*bn == NULL) BN_free(ret);
294 return(0); 294 return(0);
295 } 295 }
296 296
297 int BN_asc2bn(BIGNUM **bn, const char *a)
298 {
299 const char *p = a;
300 if (*p == '-')
301 p++;
302
303 if (p[0] == '0' && (p[1] == 'X' || p[1] == 'x'))
304 {
305 if (!BN_hex2bn(bn, p + 2))
306 return 0;
307 }
308 else
309 {
310 if (!BN_dec2bn(bn, p))
311 return 0;
312 }
313 if (*a == '-')
314 (*bn)->neg = 1;
315 return 1;
316 }
317
297 #ifndef OPENSSL_NO_BIO 318 #ifndef OPENSSL_NO_BIO
298 #ifndef OPENSSL_NO_FP_API 319 #ifndef OPENSSL_NO_FP_API
299 int BN_print_fp(FILE *fp, const BIGNUM *a) 320 int BN_print_fp(FILE *fp, const BIGNUM *a)
300 { 321 {
301 BIO *b; 322 BIO *b;
302 int ret; 323 int ret;
303 324
304 if ((b=BIO_new(BIO_s_file())) == NULL) 325 if ((b=BIO_new(BIO_s_file())) == NULL)
305 return(0); 326 return(0);
306 BIO_set_fp(b,fp,BIO_NOCLOSE); 327 BIO_set_fp(b,fp,BIO_NOCLOSE);
(...skipping 22 matching lines...) Expand all
329 goto end; 350 goto end;
330 z=1; 351 z=1;
331 } 352 }
332 } 353 }
333 } 354 }
334 ret=1; 355 ret=1;
335 end: 356 end:
336 return(ret); 357 return(ret);
337 } 358 }
338 #endif 359 #endif
OLDNEW
« no previous file with comments | « openssl/crypto/bn/bn_opt.c ('k') | openssl/crypto/bn/bn_x931p.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698