Class ACMECertificateController
- java.lang.Object
-
- de.trustable.ca3s.core.web.rest.acme.ACMEController
-
- de.trustable.ca3s.core.web.rest.acme.ACMECertificateController
-
@Controller @RequestMapping("/acme/{realm}/cert") public class ACMECertificateController extends ACMEController
-
-
Field Summary
-
Fields inherited from class de.trustable.ca3s.core.web.rest.acme.ACMEController
APPLICATION_JOSE_JSON, APPLICATION_JOSE_JSON_VALUE, APPLICATION_JWS, APPLICATION_JWS_VALUE, APPLICATION_PEM_CERT, APPLICATION_PEM_CERT_CHAIN, APPLICATION_PEM_CERT_CHAIN_VALUE, APPLICATION_PEM_CERT_VALUE, APPLICATION_PEM_FILE, APPLICATION_PEM_FILE_VALUE, APPLICATION_PKCS12, APPLICATION_PKCS12_VALUE, APPLICATION_PKIX_CERT, APPLICATION_PKIX_CERT_VALUE, APPLICATION_PROBLEM_JSON, DEFAULT_NONCE_VALID_DAYS, NO_DETAIL, NO_INSTANCE, REPLAY_NONCE_HEADER
-
-
Constructor Summary
Constructors Constructor Description ACMECertificateController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.http.ResponseEntity<?>buildCertifcateResponse(String accept, Certificate certDao)org.springframework.http.ResponseEntity<?>buildCertifcateResponse(String accept, Certificate certDao, org.springframework.http.HttpHeaders headers)org.springframework.http.ResponseEntity<?>buildCertResponseForId(long certId, String accept)org.springframework.http.ResponseEntity<?>getCertificatePKIX(long certId, String accept)org.springframework.http.ResponseEntity<?>retrieveCertificate(String requestBody, String accept, String contentType, long certId)Retrieve a certificate as a PEM structure containing the complete chain Bug in certbot: content type set to 'application/pkix-cert' despite containing a JWT in the request body, as usual.org.springframework.http.ResponseEntity<?>revokeCertificate(String requestBody)-
Methods inherited from class de.trustable.ca3s.core.web.rest.acme.ACMEController
accountResourceUriBuilderFrom, authorizationResourceUriBuilderFrom, buildNonceHeader, buildProblemResponseEntity, buildUrlFrom, certificateResourceUriBuilderFrom, challengeResourceUriBuilderFrom, checkNonce, contactsFromRequest, directoryResourceUriBuilderFrom, generateId, getBase64UrlEncodedRandom, getNewChallenge, getNewNonce, getPipelineForRealm, keyChangeResourceUriBuilderFrom, locationUriOfAuth, locationUriOfCertificate, locationUriOfOrder, locationUriOfOrderFinalize, newAccountResourceUriBuilderFrom, newAuthorizationResourceUriBuilderFrom, newNonceResourceUriBuilderFrom, newOrderResourceUriBuilderFrom, orderResourceUriBuilderFrom, revokeResourceUriBuilderFrom
-
-
-
-
Method Detail
-
getCertificatePKIX
@RequestMapping(value="/{certId}", method=GET) public org.springframework.http.ResponseEntity<?> getCertificatePKIX(@PathVariable long certId, @RequestHeader(name="Accept",defaultValue="application/pem-certificate-chain") String accept)
-
buildCertResponseForId
public org.springframework.http.ResponseEntity<?> buildCertResponseForId(long certId, String accept) throws org.springframework.web.client.HttpClientErrorException, AcmeProblemException- Throws:
org.springframework.web.client.HttpClientErrorExceptionAcmeProblemException
-
buildCertifcateResponse
public org.springframework.http.ResponseEntity<?> buildCertifcateResponse(String accept, Certificate certDao)
-
buildCertifcateResponse
public org.springframework.http.ResponseEntity<?> buildCertifcateResponse(String accept, Certificate certDao, org.springframework.http.HttpHeaders headers)
- Parameters:
accept- what mime type to beservedcertDao- the certificate to serveheaders- the list of response headers, completed with the certificate's mime type
-
revokeCertificate
@RequestMapping(value="/revoke", method=POST, consumes="application/jose+json") public org.springframework.http.ResponseEntity<?> revokeCertificate(@RequestBody String requestBody)
-
retrieveCertificate
@RequestMapping(value="/{certId}", method=POST, consumes={"application/jose+json","application/pkix-cert"}) public org.springframework.http.ResponseEntity<?> retrieveCertificate(@RequestBody String requestBody, @RequestHeader(name="Accept",defaultValue="application/pem-certificate-chain") String accept, @RequestHeader("Content-Type") String contentType, @PathVariable long certId)Retrieve a certificate as a PEM structure containing the complete chain Bug in certbot: content type set to 'application/pkix-cert' despite containing a JWT in the request body, as usual.
-
-