summaryrefslogtreecommitdiffstats
path: root/luni/src/test/java/tests/security
Commit message (Collapse)AuthorAgeFilesLines
* libcore: use default SecureRandom in KeyGen DSA testsSergio Giro2015-06-262-6/+2
| | | | | | | | | | | | While generating key pairs, BouncyCastle checks that random numbers are strong enough. Tests were using a mock random generator that generates the constant 10. Bug: 19657861 (cherry picked from commit 098bc41d846f847a6551209d65dbb74bfea3bb00) Change-Id: Ifd1401f9b386e4039b8f51af65e5e7dc5fad15e2
* Fix CertificateTest#testVerifyPublicKeyString2Narayan Kamath2015-06-151-8/+7
| | | | | | | Use a provider that can handle the provided public-key. bug: 21816913 Change-Id: Iee7a932a8767c4c1b781636dfb9456a1b604532f
* Use milliseconds to avoid timezonesKenny Root2014-09-121-1/+1
| | | | | | | | Using Date will interact with timezones, so use milliseconds which bypasses this. Bug: 17442302 Change-Id: I6bd73efb95f0f427f31812ce10c32a5af3987ca0
* Add CRLReason and friendsKenny Root2014-05-081-0/+167
| | | | | | | New API for getting the revocation reason. Add tests and exceptions associated with it. Change-Id: Ifd6444ab966c984312f069a6ee330d255110ea85
* Fix test since getExtendedKeyUsage doc disagreesKenny Root2013-03-151-4/+15
| | | | | | | | The documentation for X509Certificate#getExtendedKeyUsage says that it must return an unmodifiable list. The test was testing the exact opposite was true. Change-Id: I0f99ed6c8f2ddcc59ce6b90b973ccabd0dce35f6
* Remove invalid X509Certificate2Test testsKenny Root2013-02-081-25/+0
| | | | | | | | | | | | | | | The "CERT_CORRECT" is actually an invalid X.509 certificate, but these test cases are now covered in more detail by luni/src/test/java/libcore/java/security/cert/X509CertificateTest.java The decoding of the alternative names in the certificate look like this via openssl command line: X509v3 Subject Alternative Name: critical 0[..rfc@822.Name..dNSName..1.0...U. ..Organization..http://uniform.Resource.Id........*..\... Change-Id: I41d4753b926715b093f558b41d102842e6b3a2da
* Add tests for CertificateFactory byte offsetKenny Root2013-01-291-3/+4
| | | | | | | Make sure that CertificateFactory ends at the place that it should when reading an InputStream that supports mark and reset. Change-Id: I3bc20c1e9766f80f1597908707e69d65a6c3b216
* Revert "NativeCrypto: RSA fields cannot be NULL"Kenny Root2013-01-141-40/+8
| | | | | | This reverts commit 1496f006676166c1835ac859d5c4ffeb6357b4d0 Change-Id: I5869083fe6cb5f3f3de71233b466d0b1ac702e82
* NativeCrypto: RSA fields cannot be NULLKenny Root2013-01-071-8/+40
| | | | | | | | | | If an RSA field is left NULL, it will not be represented in the ASN.1 output of the RSAPrivateKey. This leads to problems trying to recreate the key since it does not emit the NULL fields and the fields are not numbered. Bug: 7920357 Change-Id: I144302925f9b080a2152a6d12f77981b3aad9495
* Fix X509Certificate.getBasicConstraints implementation for DRLCertFactoryBrian Carlstrom2012-12-212-706/+661
| | | | Change-Id: I5d1ba078b0f8f9ec8e2950e0da02481e8162a5e6
* Update test now that DNS names starting with a digit are allowedBrian Carlstrom2011-10-051-7/+31
| | | | | | | | | | | | | | | | | In change: commit 2f9e468ed4985edfd5e351faf2089d91e561e41d Author: Elliott Hughes <enh@google.com> Date: Fri Oct 9 17:21:46 2009 -0700 Update libcore/security to Harmony r823222. GeneralName.checkDNS was updated to support RFC 1123 (section 2.1) which allows DNS names to start with a digit. This updates the test to track that change by changing the negative test input for parsing DNS names to not start with a '0'. Bug: 5411722 Change-Id: Ie037e6d54e3e2c8b603af455ccde31c4558f070f
* Remove dead tests.Elliott Hughes2011-06-061-119/+0
| | | | Change-Id: Ife89885ea95de3bb2617172b95cdfd46d586a644
* resolved conflicts for merge of 7195b3b9 to dalvik-devBrian Carlstrom2011-04-291-110/+45
|\ | | | | | | Change-Id: Ie1f2d796466f1799929b010d67585fd551b6f840
| * Fix X509CertImpl.verify(PublicKey, String) to respect provider argumentBrian Carlstrom2011-04-291-110/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mostly a cleanup of CertificateTest, but it found one small bug in X509CertImpl - X509CertImpl.verify with a specific provider should use that provider, not ignore it and use the NativeCrypto fast path - Fix the bad testGetEncoded logic that was expected PEM bytes to equal a DER encodi - Remove libcore and harmony dependencies that were preventing these from running on the RI - Note testSerializationCompatibility is still failing, but is fixed by the unmerged 46c6fad9fad8f3dbbc82516232a225f37d332ca7 Bug: 1635707 Change-Id: Ib86d21d6458cf1438c6ddd715ccb5a4f8a9af9e6
* | post bouncycastle 1.46 upgrade test cleanupBrian Carlstrom2011-04-141-2/+2
|/ | | | Change-Id: I6e9be66b3f4fd4c09b31e2508236af62fa5214e3
* Removing use of @tests and @Test.* annotationsBrian Carlstrom2011-03-0288-4963/+125
| | | | Change-Id: I89243efdeebe22543c45a2166b634f40c3e78cf8
* Remove all the remaining AllTests cruft.Elliott Hughes2011-02-285-275/+0
| | | | Change-Id: Ie61022069e597d9c5c6e7ea4659fd614efe31852
* am cfac1139: Merge "Don\'t use runtime tests for compile-time checks."Jesse Wilson2011-02-221-31/+0
|\ | | | | | | | | * commit 'cfac1139ee706519cafe98485cdca4fc4601432f': Don't use runtime tests for compile-time checks.
| * Don't use runtime tests for compile-time checks.Jesse Wilson2011-02-211-31/+0
| | | | | | | | | | | | | | | | This test was performing type-unsafe operations to check whether our code redunantly performs checks at runtime. This test is bogus; we rely on the compiler to do the type checking. Change-Id: I6dd19f204007003ba4847c27fd2202e88ec7fb50
* | am fedab477: am 7be1bb6d: am 0ac85ead: Tracking jarjar of org.bouncycastle ↵Brian Carlstrom2011-01-251-1/+1
|\ \ | |/ | | | | | | | | | | to com.android.org.bouncycastle * commit 'fedab4777ec28cfb36274660b57c3753acb1df18': Tracking jarjar of org.bouncycastle to com.android.org.bouncycastle
| * Tracking jarjar of org.bouncycastle to com.android.org.bouncycastleBrian Carlstrom2011-01-241-1/+1
| | | | | | | | | | Bug: 3086427 Change-Id: I026f80bfa5e963a8e988ecd6f91c9732a4afc70c
| * Clean up/out some comments. DO NOT MERGE.Dan Bornstein2011-01-141-26/+2
| | | | | | | | Change-Id: I48e9b742a6b3a9faaf4cc8859ab43cc130f37c63
| * Remove pointless tests. DO NOT MERGE.Dan Bornstein2011-01-136-777/+0
| | | | | | | | Change-Id: Ia1bac1abaa44c6341b00005a3142e87073b16bd6
* | Rollback an inadvertent API change to X509CertSelector.Jesse Wilson2011-01-251-4/+4
| | | | | | | | Change-Id: I4ae0a881502c8240b952ca4bf574997b1a610b95
* | Use generics in Harmony's ASN.1, X.501 and X.509.Jesse Wilson2011-01-251-33/+7
| | | | | | | | | | | | | | This change cleans up this code and uses modern Java idioms. It should not change the behavior. Change-Id: Ie869ced7c9e18634409ae194aa9a2c2a5e5ca530
* | am dd5db2e2: am 9f1999c4: Clean up/out some comments.Dan Bornstein2011-01-141-26/+2
|\ \ | | | | | | | | | | | | * commit 'dd5db2e2be285ea7b15f111959fff08999d3c6b6': Clean up/out some comments.
| * | Clean up/out some comments.Dan Bornstein2011-01-141-26/+2
| | | | | | | | | | | | Change-Id: I8f251d2b1d7e2b5454c0702ae5cd836ca5507106
* | | am eee42b19: am 6241c067: Remove pointless tests.Dan Bornstein2011-01-136-777/+0
|\ \ \ | |/ / | | / | |/ |/| * commit 'eee42b19c9af8806db0745889bbc4f76f0b0d963': Remove pointless tests.
| * Remove pointless tests.Dan Bornstein2011-01-136-777/+0
| | | | | | | | Change-Id: I17ffa62ca632ff1cbcdd0847c97ce539877e8667
* | SecureRandom should be thread safeBrian Carlstrom2010-12-011-27/+28
|/ | | | | | | | | | | | | | | | | | | | | | | | | | Random is documented to be thread safe and our implementation appears to be. However, the SecureRandom subclass implementation was not. This was quite reproducible with the javax.net.ssl unit tests when run on a multicore device, but not seen on a uniprocessor. Details: Actual bug fix by adding synchronized to engine* methods luni/src/main/java/org/apache/harmony/security/provider/crypto/SHA1PRNG_SecureRandomImpl.java New testSecureRandomThreadSafety based on generateSeed errors in javax.net.ssl tests. luni/src/test/java/tests/security/SecureRandomTest.java Removing dalvik.annotation.* from assorted SecureRandom tests. luni/src/test/java/org/apache/harmony/security/tests/java/security/SecureRandom2Test.java luni/src/test/java/org/apache/harmony/security/tests/java/security/SecureRandomSpiTest.java luni/src/test/java/tests/java/security/SecureRandomTest.java luni/src/test/java/tests/security/SecureRandomTest.java Change-Id: I5e8ece4c0836b02277d7cac1b9b2f60b3c4a7755
* Remove a pointless test, which just tested a test support class.Dan Bornstein2010-10-292-293/+0
| | | | Change-Id: Ifef2b25500474f7e3b18ff97e7831717f2c9b391
* Remove tests for SecurityManager.Jesse Wilson2010-10-2125-4564/+0
| | | | | | | | | Many of the changes are to org.apache.harmony.* tests that we've copied from upstream. We'll remove these duplicated tests completely once we have the upstream Harmony tests properly integrated into CTS. Change-Id: Idd6cfbeba5345156b207b9433928ee37b662c395 http://b/3102252
* Update TestUtils certificates to fix CertPathBuilder1Test and CertPathTestBrian Carlstrom2010-10-041-151/+6
| | | | | Bug: 2322662 Change-Id: I8ad9a91f4095807bd710045eef3a97a86b560f49
* Rely on the test runner to ensure a pristine VM.Jesse Wilson2010-09-241-2/+0
| | | | | Change-Id: I6f5bfad6f861eb7b398ed7d86747d66cea4f2343 http://b/issue?id=2660429
* Moving tests to be under the libcore.* package.Jesse Wilson2010-08-101-1/+0
| | | | | | | | This is indended to make it easier to run on VMs that restrict the packages from which application classes can be loaded. For example, on the RI you need to use the bootclasspath to load these tests. Change-Id: I52193f35c5fcca18b5a3e1d280505b1e29b388af
* Scrubbing tests marked @BrokenTest.Jesse Wilson2010-06-246-1880/+311
| | | | | | | | | | | | | | | This rearranges the security test support infrastructure. We no longer rely on many top-level classes defined in CipherHelper.java to provide test support. Instead these each have their own top level class in our test support package: support/src/test/java/tests/security. Similarly for abstract classes intended to be subclassed by cipher-specific tests. Other test methods that were duplicated in Harmony have been removed. We need to pay closer attention to Harmony failures because they are now our only source of coverage for some of these tests. Change-Id: I1a1ca8a046bc9b6a33d5fa3f55fecc0d39f72c16
* Remove all trailing whitespace from the dalvik team-maintained parts of libcore.Elliott Hughes2010-05-13118-1272/+1272
| | | | | | Gentlemen, you may now set your editors to "strip trailing whitespace"... Change-Id: I85b2f6c80e5fbef1af6cab11789790b078c11b1b
* merge more modules into luniPeter Hallam2010-04-27125-0/+33191