Package nl.clockwork.mule.ebms.xmldsig

Examples of nl.clockwork.mule.ebms.xmldsig.EbMSDataSourceResolver


    NodeList nodeList = document.getElementsByTagNameNS(org.apache.xml.security.utils.Constants.SignatureSpecNS,org.apache.xml.security.utils.Constants._TAG_SIGNATURE);
    if (nodeList.getLength() > 0)
    {
      XMLSignature signature = new XMLSignature((Element)nodeList.item(0),org.apache.xml.security.utils.Constants.SignatureSpecNS);
 
      EbMSDataSourceResolver resolver = new EbMSDataSourceResolver(dataSources);
      signature.addResourceResolver(resolver);
 
      X509Certificate certificate = signature.getKeyInfo().getX509Certificate();
      if (certificate != null)
      {
View Full Code Here


      XMLSignature signature = new XMLSignature(document,org.apache.xml.security.utils.Constants.SignatureSpecNS,XMLSignature.ALGO_ID_SIGNATURE_RSA_SHA1);
 
      Element soapHeader = getFirstChildElement(document.getDocumentElement());
      soapHeader.appendChild(signature.getElement());
     
      EbMSDataSourceResolver resolver = new EbMSDataSourceResolver(dataSources);
      signature.getSignedInfo().addResourceResolver(resolver);
       
      Transforms transforms = new Transforms(document);
      transforms.addTransform(Transforms.TRANSFORM_ENVELOPED_SIGNATURE);
      Element xpath = document.createElementNS(org.apache.xml.security.utils.Constants.SignatureSpecNS,org.apache.xml.security.utils.Constants._TAG_XPATH);
View Full Code Here

      XMLSignature signature = new XMLSignature(document,org.apache.xml.security.utils.Constants.SignatureSpecNS,XMLSignature.ALGO_ID_SIGNATURE_RSA_SHA1);
 
      Element soapHeader = getFirstChildElement(document.getDocumentElement());
      soapHeader.appendChild(signature.getElement());
     
      EbMSDataSourceResolver resolver = new EbMSDataSourceResolver(dataSources);
      signature.getSignedInfo().addResourceResolver(resolver);
       
      Transforms transforms = new Transforms(document);
      transforms.addTransform(Transforms.TRANSFORM_ENVELOPED_SIGNATURE);
      Element xpath = document.createElementNS(org.apache.xml.security.utils.Constants.SignatureSpecNS,org.apache.xml.security.utils.Constants._TAG_XPATH);
View Full Code Here

  }

  private boolean verify(X509Certificate certificate, NodeList signatureNodeList, List<EbMSDataSource> dataSources) throws XMLSignatureException, XMLSecurityException, CertificateExpiredException, CertificateNotYetValidException, KeyStoreException
  {
    XMLSignature signature = new XMLSignature((Element)signatureNodeList.item(0),org.apache.xml.security.utils.Constants.SignatureSpecNS);
    EbMSDataSourceResolver resolver = new EbMSDataSourceResolver(dataSources);
    signature.addResourceResolver(resolver);
    return signature.checkSignatureValue(certificate);
  }
View Full Code Here

TOP

Related Classes of nl.clockwork.mule.ebms.xmldsig.EbMSDataSourceResolver

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.