Package org.graylog2.security
Class TruststoreCreator
java.lang.Object
org.graylog2.security.TruststoreCreator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddCertificates(List<X509Certificate> trustedCertificates) addFromKeystore(KeystoreInformation keystoreInformation, String alias) Originally we added only the root(=selfsigned) certificate to the truststore.static TruststoreCreatorstatic TruststoreCreatornewEmpty()
-
Constructor Details
-
TruststoreCreator
-
-
Method Details
-
newDefaultJvm
-
newEmpty
-
addFromKeystore
public TruststoreCreator addFromKeystore(KeystoreInformation keystoreInformation, String alias) throws IOException, GeneralSecurityException Originally we added only the root(=selfsigned) certificate to the truststore. But this causes problems with usage of intermediate CAs. There is nothing wrong adding the whole cert chain to the truststore.- Parameters:
keystoreInformation- access to the keystore, to obtain certificate chains by the given aliasalias- which certificate chain should we extract from the provided keystore- Throws:
IOExceptionGeneralSecurityException
-
addCertificates
-
persist
public FilesystemKeystoreInformation persist(Path truststorePath, char[] truststorePassword) throws IOException, GeneralSecurityException - Throws:
IOExceptionGeneralSecurityException
-
getTruststore
-