summaryrefslogtreecommitdiffstats
path: root/luni/src/test
diff options
context:
space:
mode:
authorGeremy Condra <gcondra@google.com>2013-01-08 17:14:25 -0800
committerGeremy Condra <gcondra@google.com>2013-01-08 17:40:54 -0800
commit0858ead74da4538c13fe0ebbbde5bc9c0586cd1d (patch)
treecbb8faa4bb42cf1d6399cca92c5a4d2b31f7bffc /luni/src/test
parent95ecd9024afcfa417911e158663ce5f31acbd839 (diff)
downloadlibcore-0858ead74da4538c13fe0ebbbde5bc9c0586cd1d.zip
libcore-0858ead74da4538c13fe0ebbbde5bc9c0586cd1d.tar.gz
libcore-0858ead74da4538c13fe0ebbbde5bc9c0586cd1d.tar.bz2
Address comments from Ibc0763f1688b9ac448990abf48c534f7fcf5056a
Change-Id: I3949c1b2bb55d945011003e2f10f6e8b1b52a065
Diffstat (limited to 'luni/src/test')
-rw-r--r--luni/src/test/java/com/android/org/bouncycastle/jce/provider/CertBlacklistTest.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/luni/src/test/java/com/android/org/bouncycastle/jce/provider/CertBlacklistTest.java b/luni/src/test/java/com/android/org/bouncycastle/jce/provider/CertBlacklistTest.java
index 9c3f915..6d033d3 100644
--- a/luni/src/test/java/com/android/org/bouncycastle/jce/provider/CertBlacklistTest.java
+++ b/luni/src/test/java/com/android/org/bouncycastle/jce/provider/CertBlacklistTest.java
@@ -157,7 +157,7 @@ public class CertBlacklistTest extends TestCase {
return results;
}
- private String getHash(PublicKey publicKey) throws Exception {
+ private static String getHash(PublicKey publicKey) throws Exception {
byte[] encoded = publicKey.getEncoded();
MessageDigest digest = MessageDigest.getInstance("SHA1");
byte[] hexlifiedHash = Hex.encode(digest.digest(encoded));
@@ -198,14 +198,14 @@ public class CertBlacklistTest extends TestCase {
blacklistToFile(result.toString());
}
- private PublicKey createPublicKey(String cert) throws Exception {
+ private static PublicKey createPublicKey(String cert) throws Exception {
byte[] derCert = Base64.decode(cert.getBytes());
InputStream istream = new ByteArrayInputStream(derCert);
CertificateFactory cf = CertificateFactory.getInstance("X.509");
return cf.generateCertificate(istream).getPublicKey();
}
- private BigInteger createSerialNumber(String cert) throws Exception {
+ private static BigInteger createSerialNumber(String cert) throws Exception {
byte[] derCert = Base64.decode(cert.getBytes());
InputStream istream = new ByteArrayInputStream(derCert);
CertificateFactory cf = CertificateFactory.getInstance("X.509");
@@ -415,11 +415,11 @@ public class CertBlacklistTest extends TestCase {
assertEquals(bl.isPublicKeyBlackListed(pk), true);
}
- public void printHash(String cert) throws Exception {
+ private static void printHash(String cert) throws Exception {
System.out.println("CERTIFICATE PUBLIC KEY HASH: " + getHash(createPublicKey(cert)));
}
- public void printSerial(String cert) throws Exception {
+ private static void printSerial(String cert) throws Exception {
System.out.println("CERTIFICATE SERIAL NUMBER: " + createSerialNumber(cert).toString(16));
}
}