Class CertificateDownloadController


  • @Controller
    @RequestMapping("/publicapi")
    public class CertificateDownloadController
    extends Object
    • Method Detail

      • getCertificatePKIX

        @RequestMapping(value="/certPKIX/{certId}/{filename}",
                        method=GET,
                        produces="application/pkix-cert")
        public org.springframework.http.ResponseEntity<byte[]> getCertificatePKIX​(@PathVariable
                                                                                  long certId,
                                                                                  @PathVariable
                                                                                  String filename)
                                                                           throws de.trustable.ca3s.core.web.rest.support.NotFoundException
        Public certificate download endpoint providing DER format
        Parameters:
        certId - the internal certificate id
        Returns:
        the binary certificate
        Throws:
        de.trustable.ca3s.core.web.rest.support.NotFoundException
      • getCertificatePEMChain

        @RequestMapping(value="/certPEMChain/{certId}/{filename}",
                        method=GET)
        public org.springframework.http.ResponseEntity<?> getCertificatePEMChain​(@PathVariable
                                                                                 long certId,
                                                                                 @PathVariable
                                                                                 String filename)
        Public certificate download endpoint providing PEM format including the certificate chain
        Parameters:
        certId - the internal certificate id
        Returns:
        the PEM-encoded certificate chain
      • getCertificatePEMPart

        @RequestMapping(value="/certPEMPart/{certId}/{filename}",
                        method=GET)
        public org.springframework.http.ResponseEntity<?> getCertificatePEMPart​(@PathVariable
                                                                                long certId,
                                                                                @PathVariable
                                                                                String filename)
        Public certificate download endpoint providing PEM format including the certificate chain
        Parameters:
        certId - the internal certificate id
        Returns:
        the PEM-encoded certificate chain
      • getCertificatePEMFull

        @RequestMapping(value="/certPEMFull/{certId}/{filename}",
                        method=GET)
        public org.springframework.http.ResponseEntity<?> getCertificatePEMFull​(@PathVariable
                                                                                long certId,
                                                                                @PathVariable
                                                                                String filename)
        Public certificate download endpoint providing PEM format including the certificate chain
        Parameters:
        certId - the internal certificate id
        Returns:
        the PEM-encoded certificate chain
      • getCertificatePEM

        @RequestMapping(value="/certPEM/{certId}/{filename}",
                        method=GET)
        public org.springframework.http.ResponseEntity<?> getCertificatePEM​(@PathVariable
                                                                            long certId,
                                                                            @PathVariable
                                                                            String filename)
        Public certificate download endpoint providing PEM format
        Parameters:
        certId - the internal certificate id
        Returns:
        the PEM-encoded certificate
      • getCertificate

        @RequestMapping(value="/cert/{certId}",
                        method=GET)
        public org.springframework.http.ResponseEntity<?> getCertificate​(@PathVariable
                                                                         long certId,
                                                                         @RequestHeader(name="Accept",defaultValue="application/pkix-cert")
                                                                         String accept)
        Public certificate download endpoint
        Parameters:
        certId - the internal certificate id
        accept - the description of the requested format
        Returns:
        the certificate in the requested encoded form
      • getKeystore

        @RequestMapping(value="/keystore/{certId}/{filename}/{alias}",
                        method=GET,
                        produces="application/x-pkcs12")
        public org.springframework.http.ResponseEntity<byte[]> getKeystore​(@PathVariable
                                                                           long certId,
                                                                           @PathVariable
                                                                           String filename,
                                                                           @PathVariable
                                                                           String alias,
                                                                           @RequestHeader(name="Accept",defaultValue="application/x-pkcs12")
                                                                           String accept)
                                                                    throws de.trustable.ca3s.core.web.rest.support.NotFoundException,
                                                                           de.trustable.ca3s.core.web.rest.support.UnauthorizedException
        Keystore download endpoint
        Parameters:
        certId - the internal certificate id
        filename - the requested file name, for logging purposes only
        alias - the identification id within the keystore
        accept - the description of the requested format
        Returns:
        the certificate in the requested encoded form
        Throws:
        de.trustable.ca3s.core.web.rest.support.NotFoundException
        de.trustable.ca3s.core.web.rest.support.UnauthorizedException
      • buildCertResponseForId

        public org.springframework.http.ResponseEntity<?> buildCertResponseForId​(long certId,
                                                                                 String accept,
                                                                                 String filename)
                                                                          throws org.springframework.web.client.HttpClientErrorException,
                                                                                 AcmeProblemException
        Parameters:
        certId -
        accept -
        filename -
        Returns:
        Throws:
        org.springframework.web.client.HttpClientErrorException
        AcmeProblemException
      • buildCertifcateResponse

        public org.springframework.http.ResponseEntity<?> buildCertifcateResponse​(String accept,
                                                                                  Certificate certDao,
                                                                                  org.springframework.http.HttpHeaders headers)
        Parameters:
        accept -
        certDao -
        headers -