Class AcmeCertificateController


  • @RestController
    @RequestMapping("/acme/{realm}/cert")
    public class AcmeCertificateController
    extends AcmeController
    • Constructor Detail

      • AcmeCertificateController

        public AcmeCertificateController​(CertificateRepository certificateRepository,
                                         BPMNUtil bpmnUtil,
                                         CertificateUtil certUtil,
                                         @Value("${ca3s.acme.backward.certificate.location:false}")
                                         boolean certificateLocationBackwardCompat)
    • 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,
                                                                             @PathVariable
                                                                             String realm,
                                                                             @RequestHeader(value="X-CA3S-Forwarded-Host",required=false)
                                                                             String forwardedHost)
      • buildCertResponseForId

        public org.springframework.http.ResponseEntity<?> buildCertResponseForId​(long certId,
                                                                                 String accept,
                                                                                 String realm,
                                                                                 String forwardedHost)
                                                                          throws org.springframework.web.client.HttpClientErrorException,
                                                                                 AcmeProblemException
        Throws:
        org.springframework.web.client.HttpClientErrorException
        AcmeProblemException
      • 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 beserved
        certDao - the certificate to serve
        headers - 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,
                                                                            @PathVariable
                                                                            String realm)
      • 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,
                                                                              @PathVariable
                                                                              String realm,
                                                                              @RequestHeader(value="X-CA3S-Forwarded-Host",required=false)
                                                                              String forwardedHost)
        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.