Class DefaultApplicationGroup
java.lang.Object
org.eclipse.milo.opcua.stack.core.security.DefaultApplicationGroup
- All Implemented Interfaces:
CertificateGroup
An implementation of the DefaultApplicationGroup CertificateGroup.
Supports the NodeIds0.RsaSha256ApplicationCertificateType CertificateType, which can be
used with 2048- and 4096-bit RSA keys.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.milo.opcua.stack.core.security.CertificateGroup
CertificateGroup.Entry -
Constructor Summary
ConstructorsConstructorDescriptionDefaultApplicationGroup(TrustListManager trustListManager, CertificateStore certificateStore, CertificateFactory certificateFactory, CertificateValidator certificateValidator) -
Method Summary
Modifier and TypeMethodDescriptionstatic DefaultApplicationGroupcreateAndInitialize(TrustListManager trustListManager, CertificateStore certificateStore, CertificateFactory certificateFactory, CertificateValidator certificateValidator) Create and initialize aDefaultApplicationGroup.getCertificateChain(NodeId certificateTypeId) Get theX509Certificatechain associated with the certificate of the type identified bycertificateTypeId.Get theCertificateGroup.Entrys belonging to thisCertificateGroup.Get theCertificateFactoryfor thisCertificateGroup.Get theNodeIdidentifying thisCertificateGroup.Get theCertificateValidatorfor thisCertificateGroup.getKeyPair(NodeId certificateTypeId) Get theKeyPairassociated with the certificate of the type identified bycertificateTypeId.Get theNodeIds identifying the types of certificates supported by thisCertificateGroup.Get theTrustListManagerfor thisCertificateGroup.voidvoidupdateCertificate(NodeId certificateTypeId, KeyPair keyPair, X509Certificate[] certificateChain)
-
Constructor Details
-
DefaultApplicationGroup
public DefaultApplicationGroup(TrustListManager trustListManager, CertificateStore certificateStore, CertificateFactory certificateFactory, CertificateValidator certificateValidator)
-
-
Method Details
-
initialize
- Throws:
Exception
-
getCertificateGroupId
Description copied from interface:CertificateGroupGet theNodeIdidentifying thisCertificateGroup.- Specified by:
getCertificateGroupIdin interfaceCertificateGroup- Returns:
- the
NodeIdidentifying thisCertificateGroup.
-
getSupportedCertificateTypeIds
Description copied from interface:CertificateGroupGet theNodeIds identifying the types of certificates supported by thisCertificateGroup.- Specified by:
getSupportedCertificateTypeIdsin interfaceCertificateGroup- Returns:
- the
NodeIds identifying the types of certificates supported by thisCertificateGroup.
-
getTrustListManager
Description copied from interface:CertificateGroupGet theTrustListManagerfor thisCertificateGroup.- Specified by:
getTrustListManagerin interfaceCertificateGroup- Returns:
- the
TrustListManagerfor thisCertificateGroup.
-
getCertificateEntries
Description copied from interface:CertificateGroupGet theCertificateGroup.Entrys belonging to thisCertificateGroup.- Specified by:
getCertificateEntriesin interfaceCertificateGroup- Returns:
- the
CertificateGroup.Entrys belonging to thisCertificateGroup.
-
getKeyPair
Description copied from interface:CertificateGroupGet theKeyPairassociated with the certificate of the type identified bycertificateTypeId.- Specified by:
getKeyPairin interfaceCertificateGroup- Parameters:
certificateTypeId- theNodeIdidentifying the type of certificate.- Returns:
- the
KeyPairassociated with the certificate of the type identified bycertificateTypeId.
-
getCertificateChain
Description copied from interface:CertificateGroupGet theX509Certificatechain associated with the certificate of the type identified bycertificateTypeId.- Specified by:
getCertificateChainin interfaceCertificateGroup- Parameters:
certificateTypeId- theNodeIdidentifying the type of certificate.- Returns:
- the
X509Certificatechain associated with the certificate of the type identified bycertificateTypeId.
-
updateCertificate
public void updateCertificate(NodeId certificateTypeId, KeyPair keyPair, X509Certificate[] certificateChain) throws Exception Description copied from interface:CertificateGroup- Specified by:
updateCertificatein interfaceCertificateGroup- Parameters:
certificateTypeId- theNodeIdidentifying the type of certificate.keyPair- the newKeyPair.certificateChain- the newX509Certificatechain.- Throws:
Exception- if the update fails.
-
getCertificateFactory
Description copied from interface:CertificateGroupGet theCertificateFactoryfor thisCertificateGroup.- Specified by:
getCertificateFactoryin interfaceCertificateGroup- Returns:
- the
CertificateFactoryfor thisCertificateGroup.
-
getCertificateValidator
Description copied from interface:CertificateGroupGet theCertificateValidatorfor thisCertificateGroup.- Specified by:
getCertificateValidatorin interfaceCertificateGroup- Returns:
- the
CertificateValidatorfor thisCertificateGroup.
-
createAndInitialize
public static DefaultApplicationGroup createAndInitialize(TrustListManager trustListManager, CertificateStore certificateStore, CertificateFactory certificateFactory, CertificateValidator certificateValidator) throws Exception Create and initialize aDefaultApplicationGroup.- Parameters:
trustListManager- theTrustListManagerto use.certificateStore- theCertificateStoreto use.certificateFactory- theCertificateFactoryto use.certificateValidator- theCertificateValidatorto use.- Returns:
- an initialized
DefaultApplicationGroupinstance. - Throws:
Exception- if an error occurs while initializing theDefaultApplicationGroup.
-