summaryrefslogtreecommitdiffstats
path: root/openssl
Commit message (Collapse)AuthorAgeFilesLines
* Rewrite NativeBN_twosCompFitsIntoBytes.Elliott Hughes2009-10-302-81/+0
| | | | | | | | | | | | | | valgrind complains about invalid 4-byte reads, caused by "case 8" in the BNInterface.c function I'm removing here, which assumed that if we're checking whether a BIGNUM fits in 8 bytes, it must require more than 4 bytes (and so accessing d[1] is acceptable). We can implement this in Java using the existing BigInteger.bitLength method (which may call down to native code, but that native code looks okay). Also remove a related commented-out method. Bugs: 2223213, 2225642
* Don't throw OutOfMemoryError if it's already been thrown.Elliott Hughes2009-09-171-6/+0
| | | | | | If GetPrimitiveArrayCritical fails, it throws a suitable exception for us. Also remove dead code.
* Remove NativeBN_bn2twosComp.Elliott Hughes2009-09-102-25/+0
| | | | | | | | | | | | | | | | NativeBN_bn2twosComp doesn't do what it claims to: it's an exact copy of NativeBN_BN_bn2bin (observe which OpenSSL BN_ function it calls!), and -- from the OpenSSL documentation -- that function "converts the absolute value of [its argument] into big-endian form". OpenSSL doesn't actually sport any appropriate function to call here, but luckily this code isn't called anywhere, and so can be removed. (BigInteger.toByteArray -- the most likely caller of this code -- seems to do the right thing, using Java code to make a big-endian two's-complement byte[]. Likewise, the conversion from a big-endian two's-complement byte[] for the corresponding BigInteger constructor looks right too, using native code to twiddle the bits itself.)
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-033-0/+1080
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-033-1080/+0
|
* auto import from //branches/cupcake/...@130745The Android Open Source Project2009-02-101-6/+6
|
* Code drop from //branches/cupcake/...@124589The Android Open Source Project2008-12-171-18/+19
|
* Initial ContributionThe Android Open Source Project2008-10-213-0/+1079