Interface SSLTrustStoreManager

    • Method Detail

      • getCertificates

        @NotNull
        TeamCityTrustedSslCertificate[] getCertificates​(@NotNull
                                                        SProject project)
        Return all stored certificates for concrete project.
        Parameters:
        project - project where to search for certificates (for now only root project is accepted, attempt to set some other project will cause IllegalArgumentException)
        Returns:
        array or certificates.
        Since:
        2020.2
      • getCertificatesHash

        @NotNull
        String getCertificatesHash​(@NotNull
                                   SProject project)
        Return a hash of stored certificates for concrete project.
        Parameters:
        project - project where to search for certificates (for now only root project is accepted, attempt to set some other project will cause IllegalArgumentException)
        Returns:
        hash of stored certificates or default "zero hash".
        Since:
        2020.2
      • storeNewCertificate

        @NotNull
        PersistTask storeNewCertificate​(@NotNull
                                        String alias,
                                        @NotNull
                                        byte[] data,
                                        @NotNull
                                        SProject project,
                                        @NotNull
                                        ConfigAction configAction)
                                 throws Exception
        Store certificate to the specified project.
        Parameters:
        alias - name of certificate
        data - certificate data
        project - project where to store the certificate (for now only root project is accepted, attempt to set some other project will cause IllegalArgumentException)
        configAction - description of the action
        Returns:
        persist task which can be used to wait for the operation completeness
        Throws:
        Exception - if certificate data is invalid
      • deleteCertificate

        @NotNull
        PersistTask deleteCertificate​(@NotNull
                                      String alias,
                                      @NotNull
                                      SProject project,
                                      @NotNull
                                      ConfigAction configAction)
                               throws Exception
        Deletes certificate from the specified project.
        Parameters:
        alias - name of certificate
        project - project where to delete the certificate (for now only root project is accepted, attempt to set some other project will cause IllegalArgumentException)
        configAction - description of the action
        Returns:
        persist task which can be used to wait for the operation completeness
        Throws:
        Exception - if some error happens during the certificate removal
        Since:
        2020.2