public class MySecurityLabelHandler extends java.lang.Object implements iaik.smime.ess.utils.SecurityLabelHandler
This demo SecurityLabelHandler implements a simple security policy based on the
default security classifications "unmarked", "unclassified", "restricted",
"confidential", "secret", "top-secret". Since the SignedData message created
by this demo
only contains an ESS
SecurityLabel
attribute with
classification "confidential", only this classification is processed by
the processESSSecurityLabel
method of this
demo handler. "unmarked" and "unclassified" are handled as "not critical"
content (i.e. the content can be accessed by any one), "secret", "top-secret"
lock the content (i.e. it is not displayed), and "restricted" and
"confidential" popup a confirmation dialog reminding the recipient about
the confidentiality of the message content.
SecurityLabelDemo
,
ESSSecurityLabel
Modifier and Type | Field and Description |
---|---|
static iaik.asn1.ObjectID |
MY_SECURITY_POLICY_ID |
Constructor and Description |
---|
MySecurityLabelHandler() |
Modifier and Type | Method and Description |
---|---|
void |
processESSSecurityLabel(iaik.smime.ess.ESSSecurityLabel securityLabel,
iaik.cms.SignerInfo[] signerInfos)
Processes the given SecurityLabel attribute.
|
public static final iaik.asn1.ObjectID MY_SECURITY_POLICY_ID
public MySecurityLabelHandler()
public void processESSSecurityLabel(iaik.smime.ess.ESSSecurityLabel securityLabel, iaik.cms.SignerInfo[] signerInfos) throws iaik.smime.ess.SecurityLabelException
processESSSecurityLabel
in interface iaik.smime.ess.utils.SecurityLabelHandler
securityLabel
- the SecurityLabel attribute to be handledsignerInfos
- the SignerInfos of the SignedData message containing
the SecurityLabel attributeiaik.smime.ess.SecurityLabelException
- if the message content has to be locked because
of the implemented security strategy