summaryrefslogtreecommitdiffstats
path: root/openssl/src/main/native
Commit message (Collapse)AuthorAgeFilesLines
* Remove a workaround for an openssl bug that's been fixed upstream.Elliott Hughes2010-02-031-65/+6
| | | | | | | | | The >= versus > bug was fixed in openssl somewhere between .98g and .98k (we don't have _all_ versions conveniently lying around), and our removal of the disjunct was irrelevant. Call the now-correct upstream code instead of manually inlining and hacking it. Also rename BN_lshift to BN_shift, since it handles both left and right shifts.
* Fix jniThrowRuntimeException for C callers, add jniThrowNullPointerException.Elliott Hughes2010-01-281-11/+3
| | | | ...and switch all NPE throwers over to the helper.
* Rewrite NativeBN_twosCompFitsIntoBytes.Elliott Hughes2009-10-301-78/+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-101-22/+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-032-0/+896
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-032-896/+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-212-0/+895