Class SignatureFilter

java.lang.Object
com.sun.xml.wss.impl.filter.SignatureFilter

public class SignatureFilter extends Object
Performs signature or verifies signature Message ANNOTATION is performed as follows: if (complete policy resolution should happen) make DynamicPolicyCallback else // assumes feature binding component is statically specified - // including targets and canonicalization algorithm if (X509CertificateBinding) resolve certificate - make SignatureKeyCallback if (X509CertificateBinding has associated SymmetricKeyBinding) resolve symmetric key - make SymmetricKeyCallback else if (X509CertificateBinding has no associated bindings || X509CertificateBinding has associated PrivateKeyBinding) create PrivateKeyBinding if req'd with private key associated with the certificate else throw Exception else throw Exception call SignatureProcessor Message (signature verification) VALIDATION is performed as follows: if (ADHOC processing mode) if (complete policy resolution should happen) make DynamicPolicyCallback call VerificationProcessor else if (POSTHOC or DEFAULT mode) call VerificationProcessor
  • Constructor Details

    • SignatureFilter

      public SignatureFilter()
  • Method Details

    • createUntBinding

      public static AuthenticationTokenPolicy.UsernameTokenBinding createUntBinding(FilterProcessingContext context, AuthenticationTokenPolicy.UsernameTokenBinding untBinding, int firstByte) throws com.sun.xml.wss.XWSSecurityException
      sets the username token in UsernameToken Binding, creates secret key for signature and sets it in username token binding
      Parameters:
      context - FilterProcessingContext
      untBinding - UsernameTokenBinding
      firstByte - int
      Returns:
      binding UsernameTokenBinding
      Throws:
      com.sun.xml.wss.XWSSecurityException
    • process

      public static void process(FilterProcessingContext context) throws com.sun.xml.wss.XWSSecurityException
      creates the suitable key for each binding type and sets the binding in the context
      Parameters:
      context - FilterProcessingContext
      Throws:
      com.sun.xml.wss.XWSSecurityException