Class FileBasedTrustListManager
java.lang.Object
org.eclipse.milo.opcua.stack.core.security.FileBasedTrustListManager
- All Implemented Interfaces:
Closeable,AutoCloseable,TrustListManager
-
Constructor Summary
ConstructorsConstructorDescriptionFileBasedTrustListManager(Path issuerCertsDir, Path issuerCrlDir, Path trustedCertsDir, Path trustedCrlDir) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddIssuerCertificate(X509Certificate certificate) Addcertificateto the Issuer Certificates list.voidaddTrustedCertificate(X509Certificate certificate) Addcertificateto the Trusted Certificates list.voidclose()static FileBasedTrustListManagercreateAndInitialize(Path baseDir) Create and initialize aFileBasedTrustListManagerat the specifiedbaseDir, creating directories as necessary.Get the list of Issuer Certificates.Get the list of Issuer CRLs.Get the last time the Trust List was updated.Get the list of Trusted Certificates.Get the list of Trusted CRLs.voidbooleanremoveIssuerCertificate(ByteString thumbprint) Remove the certificate identified bythumbprintfrom the Issuer Certificates list.booleanremoveTrustedCertificate(ByteString thumbprint) Remove the certificate identified bythumbprintfrom the Trusted Certificates list.voidsetIssuerCertificates(List<X509Certificate> issuerCertificates) Set a new list of Issuer Certificates.voidsetIssuerCrls(List<X509CRL> issuerCrls) Set a new list of Issuer CRLs.voidsetTrustedCertificates(List<X509Certificate> trustedCertificates) Set a new list of Trusted Certificates.voidsetTrustedCrls(List<X509CRL> trustedCrls) Set a new list of Trusted CRLs.
-
Constructor Details
-
FileBasedTrustListManager
-
-
Method Details
-
initialize
- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
getIssuerCrls
Description copied from interface:TrustListManagerGet the list of Issuer CRLs.- Specified by:
getIssuerCrlsin interfaceTrustListManager- Returns:
- the list of Issuer
X509CRLs.
-
getTrustedCrls
Description copied from interface:TrustListManagerGet the list of Trusted CRLs.- Specified by:
getTrustedCrlsin interfaceTrustListManager- Returns:
- the list of Trusted
X509CRLs.
-
getIssuerCertificates
Description copied from interface:TrustListManagerGet the list of Issuer Certificates.- Specified by:
getIssuerCertificatesin interfaceTrustListManager- Returns:
- the list of Issuer
X509Certificates.
-
getTrustedCertificates
Description copied from interface:TrustListManagerGet the list of Trusted Certificates.- Specified by:
getTrustedCertificatesin interfaceTrustListManager- Returns:
- the list of Trusted
X509Certificates.
-
setIssuerCrls
Description copied from interface:TrustListManagerSet a new list of Issuer CRLs. This replaces any existing Issuer CRLs.- Specified by:
setIssuerCrlsin interfaceTrustListManager- Parameters:
issuerCrls- a new list of issuerX509CRLs.
-
setTrustedCrls
Description copied from interface:TrustListManagerSet a new list of Trusted CRLs. This replaces any existing Trusted CRLs.- Specified by:
setTrustedCrlsin interfaceTrustListManager- Parameters:
trustedCrls- a new list of trustedX509CRLs.
-
setIssuerCertificates
Description copied from interface:TrustListManagerSet a new list of Issuer Certificates. This replaces any existing Issuer Certificates.- Specified by:
setIssuerCertificatesin interfaceTrustListManager- Parameters:
issuerCertificates- a new list of issuerX509Certificates.
-
setTrustedCertificates
Description copied from interface:TrustListManagerSet a new list of Trusted Certificates. This replaces any existing Trusted Certificates.- Specified by:
setTrustedCertificatesin interfaceTrustListManager- Parameters:
trustedCertificates- a new list of trustedX509Certificates.
-
addIssuerCertificate
Description copied from interface:TrustListManagerAddcertificateto the Issuer Certificates list.- Specified by:
addIssuerCertificatein interfaceTrustListManager- Parameters:
certificate- theX509Certificateto add to the Issuer Certificates list.
-
addTrustedCertificate
Description copied from interface:TrustListManagerAddcertificateto the Trusted Certificates list.- Specified by:
addTrustedCertificatein interfaceTrustListManager- Parameters:
certificate- theX509Certificateto add to the Trusted Certificates list.
-
removeIssuerCertificate
Description copied from interface:TrustListManagerRemove the certificate identified bythumbprintfrom the Issuer Certificates list.- Specified by:
removeIssuerCertificatein interfaceTrustListManager- Parameters:
thumbprint- the certificate thumbprint.- Returns:
trueif a certificate with a matching thumbprint was found.
-
removeTrustedCertificate
Description copied from interface:TrustListManagerRemove the certificate identified bythumbprintfrom the Trusted Certificates list.- Specified by:
removeTrustedCertificatein interfaceTrustListManager- Parameters:
thumbprint- the certificate thumbprint.- Returns:
trueif a certificate with a matching thumbprint was found.
-
getLastUpdateTime
Description copied from interface:TrustListManagerGet the last time the Trust List was updated.- Specified by:
getLastUpdateTimein interfaceTrustListManager- Returns:
- the last time the Trust List was updated.
-
createAndInitialize
Create and initialize aFileBasedTrustListManagerat the specifiedbaseDir, creating directories as necessary.- Parameters:
baseDir- the base directory to manage the Trust List in.- Returns:
- a new, initialized
FileBasedTrustListManagerinstance. - Throws:
IOException- if an error occurs creating directories or initializing.
-