Skip to content

Commit

Permalink
Update KRASystemCertClient
Browse files Browse the repository at this point in the history
The KRASystemCertClient has been updated to use JAX-RS client API
instead of the obsolete RESTEasy client API.
  • Loading branch information
edewata committed May 3, 2023
1 parent 34cacef commit 844818d
Showing 1 changed file with 2 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
//--- END COPYRIGHT BLOCK ---
package org.dogtagpki.kra;

import javax.ws.rs.core.Response;

import com.netscape.certsrv.cert.CertData;
import com.netscape.certsrv.client.Client;
import com.netscape.certsrv.client.PKIClient;
Expand All @@ -28,19 +26,11 @@
*/
public class KRASystemCertClient extends Client {

public KRASystemCertResource resource;

public KRASystemCertClient(PKIClient client, String subsystem) throws Exception {
super(client, subsystem, "systemcert");
init();
}

public void init() throws Exception {
resource = createProxy(KRASystemCertResource.class);
super(client, subsystem, "config/cert");
}

public CertData getTransportCert() throws Exception {
Response response = resource.getTransportCert();
return client.getEntity(response, CertData.class);
return get("transport", CertData.class);
}
}

0 comments on commit 844818d

Please sign in to comment.