Package org.apache.abdera.security

Examples of org.apache.abdera.security.Signature.sign()


                    throw new IllegalArgumentException("Unexpected error: " + t);
                }
            }

            // sign the new entry
            signedNode = signer.sign(entry,
                    getSignatureOptions(signer, signingKeys));
            signatureElement = signedNode.getFirstChild(new QName(
                    "http://www.w3.org/2000/09/xmldsig#", "Signature"));
            keyInfo = signatureElement.getFirstChild(new QName(
                    "http://www.w3.org/2000/09/xmldsig#", "KeyInfo"));
View Full Code Here


                feed.setLogo(url);
            }
        }

        // sign the feed
        signedNode = signer
                .sign(feed, getSignatureOptions(signer, signingKeys));
        signatureElement = signedNode.getFirstChild(new QName(
                "http://www.w3.org/2000/09/xmldsig#", "Signature"));
        keyInfo = signatureElement.getFirstChild(new QName(
                "http://www.w3.org/2000/09/xmldsig#", "KeyInfo"));
View Full Code Here

    SignatureOptions options = sig.getDefaultSignatureOptions();   
    options.setCertificate(cert);
    options.setSigningKey(signingKey)

    // Sign the entry
    entry = sig.sign(entry, options);
    assertNotNull(
      entry.getFirstChild(
        new QName(
          "http://www.w3.org/2000/09/xmldsig#",
          "Signature")));
View Full Code Here

    SignatureOptions options = sig.getDefaultSignatureOptions();   
    options.setCertificate(cert);
    options.setSigningKey(signingKey)

    // Sign the entry
    entry = sig.sign(entry, options);
   
    resp = client.post("http://localhost:9002/feed", entry);
    assertNotNull(resp);
    assertEquals(ResponseType.SUCCESS, resp.getType());
  }
View Full Code Here

    SignatureOptions options = sig.getDefaultSignatureOptions();
    options.setCertificate(cert);
    options.setSigningKey(signingKey);
    options.setSigningAlgorithm(algorithm);
    Element element = doc.getRoot();
    element = sig.sign(element, options);
    return element.getDocument();
  }
 
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.