Interface SSLTrustStoreManager
-
- All Known Implementing Classes:
SecureUserSSLTrustStoreManager
,UserSSLTrustStoreManager
public interface SSLTrustStoreManager
Interface for ssl trust store manager.- Since:
- 2018.1
- Author:
- Mikhail Khorkov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PersistTask
deleteCertificate(String alias, SProject project, ConfigAction configAction)
Deletes certificate from the specified project.TeamCityTrustedSslCertificate[]
getCertificates(SProject project)
Return all stored certificates for concrete project.String
getCertificatesHash(SProject project)
Return a hash of stored certificates for concrete project.PersistTask
storeNewCertificate(String alias, byte[] data, SProject project, ConfigAction configAction)
Store certificate to the specified project.
-
-
-
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 certificatedata
- certificate dataproject
- 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 certificateproject
- 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
-
-