Interface CryptoProvider
public interface CryptoProvider
- Since:
- 09.04.25
- Author:
- tobias
-
Method Summary
Modifier and TypeMethodDescription@NotNull Optional<CertificateBundle> getCurrentValidCertificateBundleForSubject(CertificateSelectionBySubjectQuery query, CertificateProviderUser user) Retrieves the current valid certificate bundle for the given subject for the specified client.@NotNull Optional<CertificateBundle> getCurrentValidCertificateBundleForUsageSubject(CertificateSelectionByUsageSubjectQuery query, CertificateProviderUser user) Retrieves the current valid certificate bundle for the given usage subject within the specified scope.static CryptoProviderRetrieves the singleton instance of theCryptoProvider.
-
Method Details
-
getInstance
Retrieves the singleton instance of theCryptoProvider. This method uses CDI to obtain the instance.- Returns:
- The singleton instance of the
CryptoProvider.
-
getCurrentValidCertificateBundleForSubject
@NotNull @NotNull Optional<CertificateBundle> getCurrentValidCertificateBundleForSubject(CertificateSelectionBySubjectQuery query, CertificateProviderUser user) throws FcCertificateProviderException Retrieves the current valid certificate bundle for the given subject for the specified client. The bundle contains the X.509 certificate and the corresponding private key, if available.CertificateSelectionBySubjectQuery.isPartialMatch()does not apply in this method; only exact matches are considered.- Parameters:
query- the query containing the subject, selection scope, and optional filters.user- the user requesting the certificate.- Returns:
- an
Optionalcontaining theCertificateBundleobject if the certificate exists. - Throws:
FcCertificateProviderException- if an error occurs while retrieving the certificate.
-
getCurrentValidCertificateBundleForUsageSubject
@NotNull @NotNull Optional<CertificateBundle> getCurrentValidCertificateBundleForUsageSubject(CertificateSelectionByUsageSubjectQuery query, CertificateProviderUser user) throws FcCertificateProviderException Retrieves the current valid certificate bundle for the given usage subject within the specified scope. The bundle contains the X.509 certificate and the corresponding private key, if available.CertificateSelectionByUsageSubjectQuery.isPartialMatch()does not apply in this method; only exact matches are considered.- Parameters:
query- the query containing the usage subject, selection scope, usage type, and optional filters.user- the user requesting the certificate.- Returns:
- an
Optionalcontaining theCertificateBundleobject if the certificate exists. - Throws:
FcCertificateProviderException- if an error occurs while retrieving the certificate.
-