com.bea.b2b.protocol.security
Interface WLCDigitalSignatureValidator


public interface WLCDigitalSignatureValidator

This defines the plug-in interface to implement Digital Signature for Rosettanet messages.

Author:
Copyright © 2000 BEA Systems, Inc. All Rights Reserved.

Method Summary
 byte[] createSignature(byte[] msgContent, com.bea.b2b.protocol.messaging.Message msg)
          Creates a detached Digital Signature.
 void init(java.lang.String initString)
          Initializes the Digital Signature plug-in class implementation.
 void verifySender(byte[] signature, com.bea.b2b.protocol.messaging.Message msg)
          Verifies that the certificate of the signature matches the sender information in the message.
 void verifySignature(byte[] msgContent, byte[] signature)
          Verifies a detached Digital Signature against the message contents.
 

Method Detail

init

public void init(java.lang.String initString)
Initializes the Digital Signature plug-in class implementation. After instantiating the plug-in class, the protocol layer calls init(String initString) method on the instantiated class. Implementor of this class should use the initString to pass user data to the plug-in implementation.

Parameters:
initString - the initialization string for the plug-in class implementation. The value for this is specified in the enabler configuration file. The name of this optional element is: signature-validator-class-init.
Returns:
none
Throws:
none -  

createSignature

public byte[] createSignature(byte[] msgContent,
                              com.bea.b2b.protocol.messaging.Message msg)
                       throws com.bea.b2b.protocol.security.WLCDigitalSignatureException
Creates a detached Digital Signature. In the case of RosettaNet, it should be a PKCS7 Digital Signature.

Parameters:
msgContent - the content of the message to sign
msg - the message object
Returns:
byte[] the detached Digital Signature.
Throws:
com.bea.b2b.protocol.security.WLCDigitalSignatureException - If an error occurs when creating the digital signature.

verifySignature

public void verifySignature(byte[] msgContent,
                            byte[] signature)
                     throws com.bea.b2b.protocol.security.WLCDigitalSignatureException
Verifies a detached Digital Signature against the message contents. In the case of RosettaNet, it should verify a PKCS7 Digital Signature.

Parameters:
msgContent - the content of the signed message
signature - the detached Digital Signature
Throws:
com.bea.b2b.protocol.security.WLCDigitalSignatureException - If an error occurs when verifying the Digital Signature or if the Digital Signature is invalid.

verifySender

public void verifySender(byte[] signature,
                         com.bea.b2b.protocol.messaging.Message msg)
                  throws com.bea.b2b.protocol.security.WLCDigitalSignatureException
Verifies that the certificate of the signature matches the sender information in the message.

Parameters:
signature - the detached digital signature
msg - Message object with the parsed message
Throws:
com.bea.b2b.protocol.security.WLCDigitalSignatureException - If an error occurs when verifying the sender.