Class CertificateTrustPromptBeanImpl
java.lang.Object
de.xima.fc.certificate.gui.internal.trust_prompt.CertificateTrustPromptBeanImpl
- All Implemented Interfaces:
CertificateTrustPromptBean, Serializable
@Named("certificateTrustPromptBean")
@ViewScoped
public class CertificateTrustPromptBeanImpl
extends Object
implements CertificateTrustPromptBean
Bean for handling the certificate trust prompt dialog in the GUI.
- Since:
- 8.5.0
- Author:
- Norman Lorenz
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCertificateTrustPromptBeanImpl(TlsService tlsService, SessionUserManager userManager, ViewContextBean viewContextBean, KeyStoreManagementService keystoreManagementService, CertificateManagementService certificateManagementService, CryptoFileAnalyzer fileAnalyzerService, ICertificateLocalizer localizer, LocaleBean localeBean) -
Method Summary
Modifier and TypeMethodDescriptionThe certificate chain that was received from the connection test.Indicates whether the client trust validation passed during the connection test.The selected keystore for the import.voidbooleanvoidOpens the trust prompt dialog for the specified key store scope and certificate chain.booleanTests the connection with the provided socket connection test parameters.booleanTests the connection with the provided SSL connection test parameters.
-
Constructor Details
-
CertificateTrustPromptBeanImpl
@Inject public CertificateTrustPromptBeanImpl(TlsService tlsService, SessionUserManager userManager, ViewContextBean viewContextBean, KeyStoreManagementService keystoreManagementService, CertificateManagementService certificateManagementService, CryptoFileAnalyzer fileAnalyzerService, ICertificateLocalizer localizer, LocaleBean localeBean) -
CertificateTrustPromptBeanImpl
public CertificateTrustPromptBeanImpl()
-
-
Method Details
-
importCertificate
public void importCertificate() -
isUserHasPermissionToImport
public boolean isUserHasPermissionToImport() -
openDialog
Description copied from interface:CertificateTrustPromptBeanOpens the trust prompt dialog for the specified key store scope and certificate chain. This method can be used to manually trigger the trust prompt dialog for a given set of certificates. The dialog allows the user to review the certificates and decide whether to trust them by importing them into a key store.- Specified by:
openDialogin interfaceCertificateTrustPromptBean- Parameters:
params- The parameters for opening the trust prompt dialog, including the certificate chain, key store scope, and an optional preselected key store selector.- Throws:
FcCertificateManagementException- If an error occurs while opening the dialog.
-
testConnection
Description copied from interface:CertificateTrustPromptBeanTests the connection with the provided socket connection test parameters. The connection test is performed on the specified host and port using the provided key store scope.- Specified by:
testConnectionin interfaceCertificateTrustPromptBean- Parameters:
params- The parameters for testing the socket connection, including host, port, key store scope, and import result callback.- Returns:
trueif the connection test is successful and trust validation passes, otherwisefalse. If the trust validation fails, the trust prompt dialog is shown to the user to handle possible certificate trust operations, such as importing the certificate(s) into a keystore.
-
testConnection
Description copied from interface:CertificateTrustPromptBeanTests the connection with the provided SSL connection test parameters. The connection test is determined by the caller of this method, which can use the provided SSLContext to establish a connection.- Specified by:
testConnectionin interfaceCertificateTrustPromptBean- Parameters:
params- The parameters for testing the SSL connection, including the SSLContext consumer, key store scope, and import result callback.- Returns:
trueif the connection test is successful and trust validation passes, otherwisefalse. If the trust validation fails, the trust prompt dialog is shown to the user to handle possible certificate trust operations, such as importing the certificate(s) into a keystore.
-
getCertificateChain
The certificate chain that was received from the connection test. This is used to select a certificate for import. -
getSelectKeyStoreModel
The selected keystore for the import. This is either an existing keystore or a new keystore that should be created. -
getClientTrustValidationPassed
Indicates whether the client trust validation passed during the connection test. This is used to determine if the client certificate needs to be imported or created.
-