Methods Summary |
---|
public static java.security.cert.CertPath | genCertPath(int howMany, int startID)Generates and returns an instance of TestCertPath.
TestCertificate-s included in the CertPath will be uniq (will have
different numbers passed to their ctor-s).
The second arguments shows which number will have the first Certificate
in the CertPath. The second certificate will have (startID+1) number
and so on.
Certificate[] certs = new Certificate[howMany];
for (int i = 0; i < howMany; i++) {
certs[i] = new TestCertificate(Integer.toString(startID + i));
}
return new TestCertPath(certs);
|
public static java.security.cert.Certificate | getCert()Returns new instance of test certificate each time the method is called.
return new TestCertificate();
|
public static java.security.cert.Certificate[] | getCertChain()Returns an array of 3 test certificates. IMP: The array returned is not
real chain of certificates, it's just an array of 3 certs. The method
returns new array each time it's called. The number of 3 was chosen
arbitrarily and is subject to change.
Certificate[] chain = { new TestCertificate(), new TestCertificate(),
new TestCertificate() };
return chain;
|
public static java.security.cert.CertPath | getCertPath()Returns a test CertPath, which uses getCertChain() to obtain a list of
certificates to store.
return new TestCertPath();
|
public static void | install_test_x509_factory()
if (provider == null) {
provider = new TestProvider(providerName, 0.01,
"Test provider for serialization testing");
Security.insertProviderAt(provider, 1);
}
|
public static void | uninstall_test_x509_factory()
if (provider != null) {
Security.removeProvider(providerName);
provider = null;
}
|