org.opcfoundation.ua.transport.security
Class SecurityPolicy

java.lang.Object
  extended by org.opcfoundation.ua.transport.security.SecurityPolicy

public final class SecurityPolicy
extends Object

Security Policy determines which algorithms to use during asymmetric and symmetric encryption.

See Also:
for instantiating cryptographics objects

Field Summary
static SecurityPolicy BASIC128RSA15
          Constant BASIC128RSA15
static SecurityPolicy BASIC256
          Constant BASIC256
static SecurityPolicy BASIC256SHA256
          Constant BASIC256SHA256
static SecurityPolicy NONE
          Constant NONE
static String URI_BINARY_BASIC128RSA15
          Constant URI_BINARY_BASIC128RSA15="http://opcfoundation.org/UA/SecurityPol"{trunked}
static String URI_BINARY_BASIC256
          Constant URI_BINARY_BASIC256="http://opcfoundation.org/UA/SecurityPol"{trunked}
static String URI_BINARY_BASIC256SHA256
          Constant URI_BINARY_BASIC256SHA256="http://opcfoundation.org/UA/SecurityPol"{trunked}
static String URI_BINARY_NONE
          Constant URI_BINARY_NONE="http://opcfoundation.org/UA/SecurityPol"{trunked}
static String URI_XML_BASIC128RSA15
          Constant URI_XML_BASIC128RSA15="http://opcfoundation.org/UA-Profile/Sec"{trunked}
static String URI_XML_BASIC256
          Constant URI_XML_BASIC256="http://opcfoundation.org/UA-Profile/Sec"{trunked}
static String URI_XML_NONE
          Constant URI_XML_NONE="http://opcfoundation.org/UA-Profile/Sec"{trunked}
 
Method Summary
static void addSecurityPolicy(SecurityPolicy policy)
          Add new security policy to stack
 boolean equals(Object obj)
          
static SecurityPolicy[] getAllSecurityPolicies()
          Get all security policies supported by the stack
 SecurityAlgorithm getAsymmetricEncryptionAlgorithm()
          Getter for the field asymmetricEncryptionAlgorithm.
 SecurityAlgorithm getAsymmetricKeyWrapAlgorithm()
          Getter for the field asymmetricKeyWrapAlgorithm.
 SecurityAlgorithm getAsymmetricSignatureAlgorithm()
          Getter for the field asymmetricSignatureAlgorithm.
 byte[] getEncodedPolicyUri()
          Getter for the field encodedPolicyUri.
 int getEncryptionBlockSize()
          Getter for the field encryptionBlockSize.
 int getEncryptionKeySize()
          Getter for the field encryptionKeySize.
 SecurityAlgorithm getKeyDerivationAlgorithm()
          Getter for the field keyDerivationAlgorithm.
 int getMaxAsymmetricKeyLength()
          Getter for the field maxAsymmetricKeyLength.
 int getMinAsymmetricKeyLength()
          Getter for the field minAsymmetricKeyLength.
 String getPolicyUri()
          Getter for the field policyUri.
static SecurityPolicy getSecurityPolicy(String securityPolicyUri)
          Get security policy by policy uri
 int getSignatureKeySize()
          Getter for the field signatureKeySize.
 SecurityAlgorithm getSymmetricEncryptionAlgorithm()
          Getter for the field symmetricEncryptionAlgorithm.
 SecurityAlgorithm getSymmetricSignatureAlgorithm()
          Getter for the field symmetricSignatureAlgorithm.
 int getSymmetricSignatureSize()
          Getter for the field symmetricSignatureSize.
 int hashCode()
          
 boolean isUsableWith(Cert cert)
          Checks if a certificate is useable for this security policy.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

URI_BINARY_NONE

public static final String URI_BINARY_NONE
Constant URI_BINARY_NONE="http://opcfoundation.org/UA/SecurityPol"{trunked}

See Also:
Constant Field Values

URI_BINARY_BASIC128RSA15

public static final String URI_BINARY_BASIC128RSA15
Constant URI_BINARY_BASIC128RSA15="http://opcfoundation.org/UA/SecurityPol"{trunked}

See Also:
Constant Field Values

URI_BINARY_BASIC256

public static final String URI_BINARY_BASIC256
Constant URI_BINARY_BASIC256="http://opcfoundation.org/UA/SecurityPol"{trunked}

See Also:
Constant Field Values

URI_BINARY_BASIC256SHA256

public static final String URI_BINARY_BASIC256SHA256
Constant URI_BINARY_BASIC256SHA256="http://opcfoundation.org/UA/SecurityPol"{trunked}

See Also:
Constant Field Values

URI_XML_NONE

public static final String URI_XML_NONE
Constant URI_XML_NONE="http://opcfoundation.org/UA-Profile/Sec"{trunked}

See Also:
Constant Field Values

URI_XML_BASIC128RSA15

public static final String URI_XML_BASIC128RSA15
Constant URI_XML_BASIC128RSA15="http://opcfoundation.org/UA-Profile/Sec"{trunked}

See Also:
Constant Field Values

URI_XML_BASIC256

public static final String URI_XML_BASIC256
Constant URI_XML_BASIC256="http://opcfoundation.org/UA-Profile/Sec"{trunked}

See Also:
Constant Field Values

NONE

public static final SecurityPolicy NONE
Constant NONE


BASIC128RSA15

public static final SecurityPolicy BASIC128RSA15
Constant BASIC128RSA15


BASIC256

public static final SecurityPolicy BASIC256
Constant BASIC256


BASIC256SHA256

public static final SecurityPolicy BASIC256SHA256
Constant BASIC256SHA256

Method Detail

addSecurityPolicy

public static void addSecurityPolicy(SecurityPolicy policy)
Add new security policy to stack

Parameters:
policy - a SecurityPolicy object.

getAllSecurityPolicies

public static SecurityPolicy[] getAllSecurityPolicies()
Get all security policies supported by the stack

Returns:
security policies

getSecurityPolicy

public static SecurityPolicy getSecurityPolicy(String securityPolicyUri)
                                        throws ServiceResultException
Get security policy by policy uri

Parameters:
securityPolicyUri - security policy uri
Returns:
security policy
Throws:
ServiceResultException - Bad_SecurityPolicyRejected if policy is unknown

equals

public boolean equals(Object obj)

Overrides:
equals in class Object

getAsymmetricEncryptionAlgorithm

public SecurityAlgorithm getAsymmetricEncryptionAlgorithm()

Getter for the field asymmetricEncryptionAlgorithm.

Returns:
a SecurityAlgorithm object.

getAsymmetricKeyWrapAlgorithm

public SecurityAlgorithm getAsymmetricKeyWrapAlgorithm()

Getter for the field asymmetricKeyWrapAlgorithm.

Returns:
a SecurityAlgorithm object.

getAsymmetricSignatureAlgorithm

public SecurityAlgorithm getAsymmetricSignatureAlgorithm()

Getter for the field asymmetricSignatureAlgorithm.

Returns:
a SecurityAlgorithm object.

getEncodedPolicyUri

public byte[] getEncodedPolicyUri()

Getter for the field encodedPolicyUri.

Returns:
an array of byte.

getEncryptionBlockSize

public int getEncryptionBlockSize()

Getter for the field encryptionBlockSize.

Returns:
the encryptionBlockSize

getEncryptionKeySize

public int getEncryptionKeySize()

Getter for the field encryptionKeySize.

Returns:
the encryptionKeySize

getKeyDerivationAlgorithm

public SecurityAlgorithm getKeyDerivationAlgorithm()

Getter for the field keyDerivationAlgorithm.

Returns:
a SecurityAlgorithm object.

getMaxAsymmetricKeyLength

public int getMaxAsymmetricKeyLength()

Getter for the field maxAsymmetricKeyLength.

Returns:
the maxAsymmetricKeyLength

getMinAsymmetricKeyLength

public int getMinAsymmetricKeyLength()

Getter for the field minAsymmetricKeyLength.

Returns:
the minAsymmetricKeyLength

getPolicyUri

public String getPolicyUri()

Getter for the field policyUri.

Returns:
a String object.

getSignatureKeySize

public int getSignatureKeySize()

Getter for the field signatureKeySize.

Returns:
the signatureKeySize

getSymmetricEncryptionAlgorithm

public SecurityAlgorithm getSymmetricEncryptionAlgorithm()

Getter for the field symmetricEncryptionAlgorithm.

Returns:
a SecurityAlgorithm object.

getSymmetricSignatureAlgorithm

public SecurityAlgorithm getSymmetricSignatureAlgorithm()

Getter for the field symmetricSignatureAlgorithm.

Returns:
a SecurityAlgorithm object.

getSymmetricSignatureSize

public int getSymmetricSignatureSize()

Getter for the field symmetricSignatureSize.

Returns:
the hmacHashSize

hashCode

public int hashCode()

Overrides:
hashCode in class Object

isUsableWith

public boolean isUsableWith(Cert cert)
Checks if a certificate is useable for this security policy.

Parameters:
cert - a Cert object.
Returns:
true if certificate is usable

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2018. All rights reserved.