~ubuntu-branches/ubuntu/utopic/openssl/utopic

« back to all changes in this revision

Viewing changes to crypto/bn/bn_print.c

  • Committer: Bazaar Package Importer
  • Author(s): Kurt Roeckx
  • Date: 2011-04-02 13:19:19 UTC
  • mfrom: (1.2.1 upstream) (11.2.2 experimental)
  • mto: This revision was merged to the branch mainline in revision 55.
  • Revision ID: james.westby@ubuntu.com-20110402131919-anszuslper64ey9e
Tags: 1.0.0d-1
* New upstream version
  - Fixes CVE-2011-0014
* Make libssl-doc Replaces/Breaks with old libssl-dev packages
  (Closes: #607609)
* Only export the symbols we should, instead of all.
* Add symbol file.
* Upload to unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
294
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
318
#ifndef OPENSSL_NO_BIO
298
319
#ifndef OPENSSL_NO_FP_API
299
320
int BN_print_fp(FILE *fp, const BIGNUM *a)