public class Certificate extends AcmeResource
Modifier | Constructor and Description |
---|---|
protected |
Certificate(Session session,
URL certUrl) |
protected |
Certificate(Session session,
URL certUrl,
URL chainUrl,
X509Certificate cert) |
Modifier and Type | Method and Description |
---|---|
static Certificate |
bind(Session session,
URL location)
Creates a new instance of
Certificate and binds it to the Session . |
X509Certificate |
download()
Downloads the certificate.
|
X509Certificate[] |
downloadChain()
Downloads the issuer chain.
|
X509Certificate[] |
downloadFullChain()
Downloads the certificate and the corresponding issuer chain.
|
URL |
getChainLocation()
Returns the URL of the certificate chain.
|
void |
revoke()
Revokes this certificate.
|
void |
revoke(RevocationReason reason)
Revokes this certificate.
|
static void |
revoke(Session session,
X509Certificate cert,
RevocationReason reason)
Revoke a certificate.
|
getLocation, getSession, rebind, setLocation, setSession
protected Certificate(Session session, URL certUrl)
protected Certificate(Session session, URL certUrl, URL chainUrl, X509Certificate cert)
public static Certificate bind(Session session, URL location)
Certificate
and binds it to the Session
.session
- Session
to be usedlocation
- Location of the CertificateCertificate
bound to the session and locationpublic URL getChainLocation()
null
if not known or not
available.public X509Certificate download() throws AcmeException
The result is cached.
X509Certificate
that was downloadedAcmeRetryAfterException
- the certificate is still being created, and the server returned an
estimated date when it will be ready for download. You should wait for
the date given in AcmeRetryAfterException.getRetryAfter()
before trying again.AcmeException
downloadFullChain()
public X509Certificate[] downloadChain() throws AcmeException
The result is cached.
X509Certificate
sAcmeRetryAfterException
- the certificate is still being created, and the server returned an
estimated date when it will be ready for download. You should wait for
the date given in AcmeRetryAfterException.getRetryAfter()
before trying again.AcmeException
public X509Certificate[] downloadFullChain() throws AcmeException
The result is cached.
X509Certificate
sAcmeRetryAfterException
- the certificate is still being created, and the server returned an
estimated date when it will be ready for download. You should wait for
the date given in AcmeRetryAfterException.getRetryAfter()
before trying again.AcmeException
public void revoke() throws AcmeException
AcmeException
public void revoke(RevocationReason reason) throws AcmeException
reason
- RevocationReason
stating the reason of the revocation that is
used when generating OCSP responses and CRLs. null
to give no
reason.AcmeException
public static void revoke(Session session, X509Certificate cert, RevocationReason reason) throws AcmeException
session
- Session
to be used. Here you can also generate a session by
using the key pair that was used for signing the CSR.cert
- X509Certificate
to be revokedreason
- RevocationReason
stating the reason of the revocation that is
used when generating OCSP responses and CRLs. null
to give no
reason.AcmeException
Copyright © 2015–2019. All rights reserved.