public abstract class Client extends Object
| Modifier and Type | Field and Description |
|---|---|
protected CaCaps |
caCaps |
protected CaIdentifier |
caId |
static long |
DEFAULT_SIGNINGTIME_BIAS |
static String |
REQ_CONTENT_TYPE |
| Constructor and Description |
|---|
Client(CaIdentifier caId,
CaCertValidator caCertValidator) |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy() |
AuthorityCertStore |
getAuthorityCertStore() |
CaCaps |
getCaCaps() |
org.xipki.security.X509Cert |
getCaCert() |
CaCertValidator |
getCaCertValidator() |
CaIdentifier |
getCaId() |
long |
getMaxSigningTimeBiasInMs() |
protected abstract ScepHttpResponse |
httpGet(String url)
Send request via HTTP GET.
|
protected abstract ScepHttpResponse |
httpPost(String url,
String requestContentType,
byte[] request)
Send request via HTTP POST.
|
void |
init() |
boolean |
isHttpGetOnly() |
void |
refresh() |
EnrolmentResponse |
scepCertPoll(PrivateKey identityKey,
org.xipki.security.X509Cert identityCert,
org.bouncycastle.asn1.pkcs.CertificationRequest csr,
org.bouncycastle.asn1.x500.X500Name issuer) |
EnrolmentResponse |
scepCertPoll(PrivateKey identityKey,
org.xipki.security.X509Cert identityCert,
TransactionId transactionId,
org.bouncycastle.asn1.x500.X500Name issuer,
org.bouncycastle.asn1.x500.X500Name subject) |
EnrolmentResponse |
scepEnrol(org.bouncycastle.asn1.pkcs.CertificationRequest csr,
PrivateKey identityKey,
org.xipki.security.X509Cert identityCert) |
List<org.xipki.security.X509Cert> |
scepGetCert(PrivateKey identityKey,
org.xipki.security.X509Cert identityCert,
org.bouncycastle.asn1.x500.X500Name issuer,
BigInteger serialNumber) |
org.bouncycastle.cert.X509CRLHolder |
scepGetCrl(PrivateKey identityKey,
org.xipki.security.X509Cert identityCert,
org.bouncycastle.asn1.x500.X500Name issuer,
BigInteger serialNumber) |
AuthorityCertStore |
scepNextCaCert() |
EnrolmentResponse |
scepPkcsReq(org.bouncycastle.asn1.pkcs.CertificationRequest csr,
PrivateKey identityKey,
org.xipki.security.X509Cert identityCert) |
EnrolmentResponse |
scepRenewalReq(org.bouncycastle.asn1.pkcs.CertificationRequest csr,
PrivateKey identityKey,
org.xipki.security.X509Cert identityCert) |
void |
setHttpGetOnly(boolean httpGetOnly) |
void |
setMaxSigningTimeBiasInMs(long maxSigningTimeBiasInMs)
Set the maximal signing time bias in milliseconds.
|
public static final String REQ_CONTENT_TYPE
public static final long DEFAULT_SIGNINGTIME_BIAS
protected final CaIdentifier caId
protected CaCaps caCaps
public Client(CaIdentifier caId, CaCertValidator caCertValidator)
protected abstract ScepHttpResponse httpPost(String url, String requestContentType, byte[] request) throws ScepClientException
url - SCEP server URL. Must not be null.requestContentType - Content type of the HTTP request. Must not be null.request - HTTP request. Must not be null.ScepClientException - If error happensprotected abstract ScepHttpResponse httpGet(String url) throws ScepClientException
url - URL. Must not be null.ScepClientException - If error occurs.public boolean isHttpGetOnly()
public void setHttpGetOnly(boolean httpGetOnly)
public long getMaxSigningTimeBiasInMs()
public void setMaxSigningTimeBiasInMs(long maxSigningTimeBiasInMs)
maxSigningTimeBiasInMs - zero or negative value deactivates the message time checkpublic void init()
throws ScepClientException
ScepClientExceptionpublic void refresh()
throws ScepClientException
ScepClientExceptionpublic CaCaps getCaCaps() throws ScepClientException
ScepClientExceptionpublic org.xipki.security.X509Cert getCaCert()
public CaIdentifier getCaId() throws ScepClientException
ScepClientExceptionpublic CaCertValidator getCaCertValidator() throws ScepClientException
ScepClientExceptionpublic AuthorityCertStore getAuthorityCertStore() throws ScepClientException
ScepClientExceptionpublic org.bouncycastle.cert.X509CRLHolder scepGetCrl(PrivateKey identityKey, org.xipki.security.X509Cert identityCert, org.bouncycastle.asn1.x500.X500Name issuer, BigInteger serialNumber) throws ScepClientException
ScepClientExceptionpublic List<org.xipki.security.X509Cert> scepGetCert(PrivateKey identityKey, org.xipki.security.X509Cert identityCert, org.bouncycastle.asn1.x500.X500Name issuer, BigInteger serialNumber) throws ScepClientException
ScepClientExceptionpublic EnrolmentResponse scepCertPoll(PrivateKey identityKey, org.xipki.security.X509Cert identityCert, org.bouncycastle.asn1.pkcs.CertificationRequest csr, org.bouncycastle.asn1.x500.X500Name issuer) throws ScepClientException
ScepClientExceptionpublic EnrolmentResponse scepCertPoll(PrivateKey identityKey, org.xipki.security.X509Cert identityCert, TransactionId transactionId, org.bouncycastle.asn1.x500.X500Name issuer, org.bouncycastle.asn1.x500.X500Name subject) throws ScepClientException
ScepClientExceptionpublic EnrolmentResponse scepEnrol(org.bouncycastle.asn1.pkcs.CertificationRequest csr, PrivateKey identityKey, org.xipki.security.X509Cert identityCert) throws ScepClientException
ScepClientExceptionpublic EnrolmentResponse scepPkcsReq(org.bouncycastle.asn1.pkcs.CertificationRequest csr, PrivateKey identityKey, org.xipki.security.X509Cert identityCert) throws ScepClientException
ScepClientExceptionpublic EnrolmentResponse scepRenewalReq(org.bouncycastle.asn1.pkcs.CertificationRequest csr, PrivateKey identityKey, org.xipki.security.X509Cert identityCert) throws ScepClientException
ScepClientExceptionpublic AuthorityCertStore scepNextCaCert() throws ScepClientException
ScepClientExceptionpublic void destroy()
Copyright © 2023. All rights reserved.