private URL getURL() throws MalformedURLException {
return new URL("http", "localhost", port, PATH);
}
private X509Certificate getRecipient() throws Exception {
GetCaCertRequest req = new GetCaCertRequest();
Transport transport = new HttpGetTransport(getURL());
CertStore store = transport.sendRequest(req,
new GetCaCertResponseHandler());
Collection<? extends Certificate> certs = store.getCertificates(null);