Package org.xipki.ca.sdk
Class SdkClient
- java.lang.Object
-
- org.xipki.ca.sdk.SdkClient
-
public class SdkClient extends Object
API client.- Since:
- 6.0.0
- Author:
- Lijun Liao (xipki)
-
-
Constructor Summary
Constructors Constructor Description SdkClient(String serverUrl, SSLSocketFactory sslSocketFactory, HostnameVerifier hostnameVerifier)SdkClient(SdkClientConf conf)
-
Method Summary
-
-
-
Constructor Detail
-
SdkClient
public SdkClient(SdkClientConf conf) throws org.xipki.util.exception.ObjectCreationException
- Throws:
org.xipki.util.exception.ObjectCreationException
-
SdkClient
public SdkClient(String serverUrl, SSLSocketFactory sslSocketFactory, HostnameVerifier hostnameVerifier)
-
-
Method Detail
-
send
public byte[] send(String ca, String command, SdkRequest request) throws IOException, SdkErrorResponseException
- Throws:
IOExceptionSdkErrorResponseException
-
healthy
public boolean healthy(String ca)
-
cacert
public byte[] cacert(String ca) throws IOException, SdkErrorResponseException
- Throws:
IOExceptionSdkErrorResponseException
-
cacerts
public byte[][] cacerts(String ca) throws IOException, SdkErrorResponseException
- Throws:
IOExceptionSdkErrorResponseException
-
profileInfo
public CertprofileInfoResponse profileInfo(String ca, String profileName) throws IOException, SdkErrorResponseException
- Throws:
IOExceptionSdkErrorResponseException
-
generateCrl
public byte[] generateCrl(String ca, String crldp) throws IOException, SdkErrorResponseException
- Throws:
IOExceptionSdkErrorResponseException
-
currentCrl
public byte[] currentCrl(String ca) throws IOException, SdkErrorResponseException
- Throws:
IOExceptionSdkErrorResponseException
-
currentCrl
public byte[] currentCrl(String ca, BigInteger crlNumber, Instant thisUpdate, String crlDp) throws IOException, SdkErrorResponseException
- Throws:
IOExceptionSdkErrorResponseException
-
enrollCert
public byte[] enrollCert(String ca, String certprofile, byte[] p10Req) throws IOException, SdkErrorResponseException
- Throws:
IOExceptionSdkErrorResponseException
-
enrollCertCaGenKeypair
public org.xipki.security.KeyCertBytesPair enrollCertCaGenKeypair(String ca, String certprofile, String subject) throws IOException, SdkErrorResponseException
- Throws:
IOExceptionSdkErrorResponseException
-
reenrollCert
public byte[] reenrollCert(String ca, String certprofile, byte[] p10Req, org.bouncycastle.asn1.x500.X500Name oldCertIssuer, BigInteger oldCertSerialNumber) throws IOException, SdkErrorResponseException
- Throws:
IOExceptionSdkErrorResponseException
-
reenrollCertCaGenKeypair
public org.xipki.security.KeyCertBytesPair reenrollCertCaGenKeypair(String ca, String certprofile, org.bouncycastle.asn1.x500.X500Name subject, String oldCertIssuer, BigInteger oldCertSerialNumber) throws IOException, SdkErrorResponseException
- Throws:
IOExceptionSdkErrorResponseException
-
enrollCerts
public EnrollOrPollCertsResponse enrollCerts(String ca, EnrollCertsRequest req) throws IOException, SdkErrorResponseException
- Throws:
IOExceptionSdkErrorResponseException
-
enrollCrossCerts
public EnrollOrPollCertsResponse enrollCrossCerts(String ca, EnrollCertsRequest req) throws IOException, SdkErrorResponseException
- Throws:
IOExceptionSdkErrorResponseException
-
reenrollCerts
public EnrollOrPollCertsResponse reenrollCerts(String ca, EnrollCertsRequest req) throws IOException, SdkErrorResponseException
- Throws:
IOExceptionSdkErrorResponseException
-
confirmCerts
public void confirmCerts(String ca, ConfirmCertsRequest req) throws IOException, SdkErrorResponseException
- Throws:
IOExceptionSdkErrorResponseException
-
revokePendingCerts
public void revokePendingCerts(String ca, String tid) throws IOException, SdkErrorResponseException
- Throws:
IOExceptionSdkErrorResponseException
-
pollCerts
public EnrollOrPollCertsResponse pollCerts(String ca, PollCertRequest req) throws IOException, SdkErrorResponseException
- Throws:
IOExceptionSdkErrorResponseException
-
revokeCerts
public RevokeCertsResponse revokeCerts(String ca, RevokeCertsRequest req) throws IOException, SdkErrorResponseException
- Throws:
IOExceptionSdkErrorResponseException
-
unsuspendCerts
public UnSuspendOrRemoveCertsResponse unsuspendCerts(String ca, UnsuspendOrRemoveRequest req) throws IOException, SdkErrorResponseException
- Throws:
IOExceptionSdkErrorResponseException
-
removeCerts
public UnSuspendOrRemoveCertsResponse removeCerts(String ca, UnsuspendOrRemoveRequest req) throws IOException, SdkErrorResponseException
- Throws:
IOExceptionSdkErrorResponseException
-
getCert
public byte[] getCert(String caName, org.bouncycastle.asn1.x500.X500Name issuer, BigInteger serialNumber) throws IOException, SdkErrorResponseException
- Throws:
IOExceptionSdkErrorResponseException
-
-